:root {
	--hec-green: #1f5c3d;
	--hec-green-soft: #e7f0ea;
	--hec-border: #dfe3e0;
	--hec-field-border: #cdd4cf;
	--hec-text: #1f2a24;
	--hec-muted: #8a938c;
	--hec-red: #e0463b;
	--hec-radius: 10px;
}

/* Layout: breadcrumbs + sidebar + content */
.hec-account-shell {
	margin: 0 auto;
	color: var(--hec-text);
}

.hec-account {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 40px;
	align-items: start;
	margin: 0 auto;
	color: var(--hec-text);
}

/* Sidebar */
.hec-account__sidebar {
	background: #fff;
	border: 1px solid var(--hec-border);
	border-radius: var(--hec-radius);
	padding: 14px;
	position: sticky;
	top: 24px;
}
.hec-account__user {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 8px 14px;
	margin-bottom: 8px;
	border-bottom: 1px solid var(--hec-border);
}
.hec-account__avatar { border-radius: 50%; }
.hec-account__user-meta { display: flex; flex-direction: column; overflow: hidden; }
.hec-account__user-name { font-weight: 600; font-size: 14px; }
.hec-account__user-email { font-size: 12px; color: var(--hec-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hec-account__menu { list-style: none; margin: 0; padding: 0; }
.hec-account__menu li { margin: 1px 0; }
.hec-account__menu li a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 12px;
	border-radius: 8px;
	color: #1c1c1b;
	text-decoration: none;
	font-size: 15px;
	transition: background .15s ease, color .15s ease;
}
.hec-account__menu li a:hover { background: #f4f7f5; color: #215630; }
.hec-account__menu li.is-active a,
.hec-account__menu li.woocommerce-MyAccount-navigation-link--is-active a {
	color: #215630;
	font-weight: 600;
}

.hec-account__menu-icon {
	display: inline-flex;
	flex: 0 0 24px;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: #1c1c1b;
	transition: color .15s ease;
}
.hec-account__menu-icon svg {
	display: block;
	width: 24px;
	height: 24px;
}

.hec-account__menu li a:hover .hec-account__menu-icon,
.hec-account__menu li.is-active a .hec-account__menu-icon,
.hec-account__menu li.woocommerce-MyAccount-navigation-link--is-active a .hec-account__menu-icon {
	color: #215630;
}

/* Sign out — icon and label always red */
.hec-account__menu li.woocommerce-MyAccount-navigation-link--customer-logout a,
.hec-account__menu li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
	color: #e93023;
}
.hec-account__menu li.woocommerce-MyAccount-navigation-link--customer-logout a .hec-account__menu-icon,
.hec-account__menu li.woocommerce-MyAccount-navigation-link--customer-logout a:hover .hec-account__menu-icon {
	color: #e93023;
}

/* Content */
.hec-account__content { min-width: 0; }

.hec-account__breadcrumbs {
	margin: 0 0 24px;
}

.hec-account__breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 24px;
	color: #454541;
}

.hec-account__breadcrumb-item {
	display: inline-flex;
	align-items: center;
}

.hec-account__breadcrumb-item:not(.is-current)::after {
	content: "/";
	margin-left: 8px;
	color: #c5cbc7;
}

.hec-account__breadcrumb-item a {
	color: var(--hec-muted);
	text-decoration: none;
	transition: color .15s ease;
}

.hec-account__breadcrumb-item.is-current {
	color: #215630;
}
.woocommerce-account .woocommerce-MyAccount-navigation {
	max-height: 320px;
	width: 100%;
}
.woocommerce-account .woocommerce-MyAccount-content {
	max-width: 1135px;
	width: 100%;
}
.woocommerce-account .woocommerce-MyAccount-navigation {
	max-height: none!important;
}
.hec-profile__title {
	font-size: 26px;
	font-weight: 700;
	color: var(--hec-green);
	margin: 0 0 18px;
}

/* Cards */
.hec-card {
	background: #fff;
	border: 1px solid transparent;
	border-radius: var(--hec-radius);
	margin-bottom: 26px;
}
.hec-card__title {
	font-size: 17px;
	font-weight: 600;
	margin: 0 0 16px;
}

/* Grid + fields */
.hec-grid { display: grid; gap: 16px; }
.hec-grid--2 { grid-template-columns: 1fr 1fr; }
.hec-grid--3 { grid-template-columns: 1fr 1fr 1fr; margin-top: 18px; }

.hec-field { margin: 0; }
.hec-field label {
	display: block;
	font-size: 13px;
	color: var(--hec-muted);
	margin-bottom: 8px;
}
.hec-field input[type="text"],
.hec-field input[type="email"],
.hec-field input[type="tel"],
.hec-field input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--hec-field-border);
	border-radius: 8px;
	padding: 13px 14px;
	font-size: 15px;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.hec-field input:focus {
	outline: none;
	border-color: var(--hec-green);
	box-shadow: 0 0 0 3px rgba(31, 92, 61, .12);
}

.hec-fieldset { border: 0; margin: 0; padding: 0; }
.hec-password__fields { display: flex; flex-direction: column; gap: 16px; max-width: 480px; margin-top: 18px; }
.hec-password__toggle { margin: 0; }
.hec-password__actions { margin: 8px 0 0; }

.hec-field--password .hec-field__wrap {
	position: relative;
	display: block;
}

.hec-field--password input[type="password"],
.hec-field--password input[type="text"] {
	padding-right: 44px;
}

.hec-field__toggle {
	position: absolute!important;
	right: 12px!important;
	top: 50%!important;
	transform: translateY(-50%)!important;
	border: 0!important;
	background: none!important;
	padding: 4px!important;
	margin: 0!important;
	color: #6b756e;
	cursor: pointer!important;
	line-height: 0;
	display: inline-flex;
	align-items: center!important;
	justify-content: center!important;
	transition: color .15s ease;
}

.hec-field__toggle:hover { color: var(--hec-text)!important; }

.hec-field__toggle svg {
	display: block;
	width: 20px!important;
	height: 20px!important;
}

.hec-password__fields[hidden] { display: none; }

.hec-password__fields .hec-profile__actions,
.hec-password__actions .primary-button[disabled] {
	opacity: 0.55;
	cursor: default;
}

.hec-password .hec-card__title { margin-bottom: 20px; }

/* Buttons */
.hec-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 12px 30px;
	font-size: 15px;
	cursor: pointer;
	transition: background .15s ease, opacity .15s ease;
}
.hec-profile__actions { margin: 22px 0 0; }

/* Outline button */
.hec-btn--outline { background: #fff; color: var(--hec-green); border-color: var(--hec-green); }
.hec-btn--outline:hover { background: var(--hec-green-soft); }

/* -------------------------------------------------------------------------
 * My orders
 * ---------------------------------------------------------------------- */

/* Filter pills */
.hec-order-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.hec-pill {
	border: 1px solid var(--hec-border);
	background: #fff;
	color: #46514a;
	border-radius: 999px;
	padding: 7px 18px;
	font-size: 14px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.hec-pill:hover { border-color: #c2c9c4; }
.hec-pill.is-active { background: #f4c84a; border-color: #f4c84a; color: #1f2a24; font-weight: 600; }

/* Order list */
.hec-orders { display: flex; flex-direction: column; gap: 16px; }

.hec-order {
	position: relative;
	background: #fff;
	border: 1px solid var(--hec-border);
	border-radius: var(--hec-radius);
	overflow: hidden;
}
.hec-order::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 4px;
	background: var(--hec-muted);
}
.hec-order--completed::before { background: #1f8a4c; }
.hec-order--processing::before { background: #2f6fed; }
.hec-order--cancelled::before { background: var(--hec-red); }

/* Head (clickable accordion) */
.hec-order__head {
	display: grid;
	grid-template-columns: 1.4fr 1.4fr 1fr 32px;
	align-items: center;
	gap: 16px;
	width: 100%;
	border: 0;
	background: transparent;
	padding: 18px 20px 18px 24px;
	cursor: pointer;
	text-align: left;
}
.hec-order__col { display: flex; flex-direction: column; gap: 4px; }
.hec-order__date { font-size: 13px; color: #46514a; }
.hec-order__status { font-weight: 600; font-size: 15px; }
.hec-order__status--completed { color: #1f8a4c; }
.hec-order__status--processing { color: #2f6fed; }
.hec-order__status--cancelled { color: var(--hec-red); }
.hec-order__muted { font-size: 12px; color: var(--hec-muted); }
.hec-order__num, .hec-order__total { font-size: 15px; font-weight: 500; }
.hec-order__chevron { color: #9aa39d; transition: transform .2s ease; justify-self: end; }
.hec-order.is-open .hec-order__chevron { transform: rotate(180deg); }

/* Body */
.hec-order__body { padding: 4px 24px 22px; border-top: 1px solid var(--hec-border); }

.hec-order__items { display: grid; grid-template-columns: 1fr 220px; gap: 18px 24px; padding: 18px 0; }
.hec-order__item {
	grid-column: 1;
	display: grid;
	grid-template-columns: 56px 1.6fr repeat(4, 1fr);
	align-items: center;
	gap: 14px;
	padding: 10px 0;
	border-bottom: 1px solid #f0f2f0;
}
.hec-order__thumb img { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; }
.hec-order__item-name { display: flex; flex-direction: column; gap: 3px; }
.hec-order__item-title { font-size: 14px; font-weight: 500; }
.hec-order__item-meta { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }

.hec-order__shipto {
	grid-column: 2;
	grid-row: 1 / span 99;
	font-size: 13px;
	line-height: 1.5;
}
.hec-order__shipto address { font-style: normal; margin-top: 4px; }

/* Totals */
.hec-order__totals { border-top: 1px solid var(--hec-border); padding: 14px 0; max-width: 420px; margin-left: auto; }
.hec-order__totals-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.hec-order__totals-row--grand { font-weight: 700; font-size: 16px; border-top: 1px solid var(--hec-border); margin-top: 6px; padding-top: 10px; }

/* Actions */
.hec-order__actions { display: flex; align-items: center; gap: 14px; padding-top: 6px; }
.hec-order__view { margin-left: auto; color: var(--hec-green); font-size: 13px; text-decoration: underline; }

.hec-orders__pagination { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

@media (max-width: 860px) {
	.hec-order__head { grid-template-columns: 1fr 1fr 28px; }
	.hec-order__head .hec-order__col:nth-child(3) { grid-column: 1 / -1; }
	.hec-order__items { grid-template-columns: 1fr; }
	.hec-order__item { grid-template-columns: 48px 1fr 1fr; }
	.hec-order__shipto { grid-column: 1; grid-row: auto; }
}

/* -------------------------------------------------------------------------
 * Shipping address book
 * ---------------------------------------------------------------------- */

.hec-addresses { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 320px)); gap: 18px; margin-bottom: 22px; }

.hec-address-card {
	background: #fff;
	border: 1px solid var(--hec-border);
	border-radius: var(--hec-radius);
	overflow: hidden;
}
.hec-address-card.is-default { border-color: var(--hec-green); }
.hec-address-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f4f6f4;
	padding: 12px 16px;
	border-bottom: 1px solid var(--hec-border);
}
.hec-address-card__title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.hec-address-card__badge {
	font-size: 11px;
	font-weight: 600;
	color: var(--hec-green);
	background: var(--hec-green-soft);
	border-radius: 999px;
	padding: 2px 10px;
}
.hec-address-card__actions { display: flex; gap: 6px; }
.hec-address-card__body { display: flex; flex-direction: column; gap: 4px; padding: 16px; font-size: 13px; color: #46514a; line-height: 1.5; }
.hec-address-card__body span:first-child { font-weight: 600; color: var(--hec-text); margin-bottom: 2px; }

.hec-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px; height: 30px;
	border-radius: 6px;
	color: #6b756e;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.hec-icon-btn:hover { background: #eef1ee; color: var(--hec-green); }
.hec-icon-btn--danger { color: var(--hec-red); }
.hec-icon-btn--danger:hover { background: #fdeceb; color: var(--hec-red); }
.hec-icon-btn .dashicons { font-size: 18px; width: 18px; height: 18px; }

.hec-add-address.secondary-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 24px!important;
	color: #215630!important;
	font-size: 16px !important;
    font-weight: 600 !important;
	line-height: 24px!important;
}
.hec-add-address .hec-add-icon {
	display: block;
	width: 24px;
	height: 24px;
	flex: 0 0 auto;
}
.hec-add-address .hec-add-icon path {
	fill: #215630!important;
}

/* Address form */
.hec-address-form .hec-field--select select,
.hec-card-form .hec-field--select select {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--hec-field-border);
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 15px;
	background: #fff;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b756e' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px;
}
.hec-address-form .hec-checkbox { margin-top: 18px; font-size: 14px; }
.hec-address-form .hec-checkbox label { display: flex; align-items: center; gap: 8px; color: #46514a; }
.hec-address-form .hec-checkbox input { width: 16px; height: 16px; }

/* WooCommerce Select2 (country / state) — match .hec-field inputs */
.hec-address-form .select2-container,
.hec-card-form .select2-container,
.hec-address-form .select2-country-container,
.hec-card-form .select2-country-container {
	width: 100% !important;
}

.hec-address-form .select2-container .select2-selection--single,
.hec-card-form .select2-container .select2-selection--single,
.hec-address-form .select2-country-container .select2-selection--single,
.hec-card-form .select2-country-container .select2-selection--single {
	box-sizing: border-box;
	height: auto;
	min-height: 48px;
	border: 1px solid var(--hec-field-border) !important;
	border-radius: 8px;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.hec-address-form .select2-container--default .select2-selection--single .select2-selection__rendered,
.hec-card-form .select2-container--default .select2-selection--single .select2-selection__rendered,
.hec-address-form .select2-country-container .select2-selection__rendered,
.hec-card-form .select2-country-container .select2-selection__rendered {
	padding: 13px 40px 13px 14px;
	font-size: 15px;
	line-height: 1.4;
	color: var(--hec-text);
}

.hec-address-form .select2-container--default .select2-selection--single .select2-selection__arrow,
.hec-card-form .select2-container--default .select2-selection--single .select2-selection__arrow,
.hec-address-form .select2-country-container .select2-selection__arrow,
.hec-card-form .select2-country-container .select2-selection__arrow {
	top: 0;
	right: 10px;
	height: 100%;
}

.hec-address-form .select2-container--default .select2-selection--single .select2-selection__arrow b,
.hec-card-form .select2-container--default .select2-selection--single .select2-selection__arrow b,
.hec-address-form .select2-country-container .select2-selection__arrow b,
.hec-card-form .select2-country-container .select2-selection__arrow b {
	border-color: #6b756e transparent transparent transparent;
}

.hec-address-form .select2-container--default.select2-container--open .select2-selection--single,
.hec-card-form .select2-container--default.select2-container--open .select2-selection--single,
.hec-address-form .select2-container--default.select2-container--focus .select2-selection--single,
.hec-card-form .select2-container--default.select2-container--focus .select2-selection--single,
.hec-address-form .select2-country-container.select2-container--open .select2-selection--single,
.hec-card-form .select2-country-container.select2-container--open .select2-selection--single {
	border-color: var(--hec-green) !important;
	box-shadow: 0 0 0 3px rgba(31, 92, 61, .12);
	outline: none;
}

.hec-address-form .select2-dropdown,
.hec-card-form .select2-dropdown {
	border: 1px solid var(--hec-field-border);
	border-radius: 8px;
	font-size: 15px;
	overflow: hidden;
}

.hec-address-form .select2-container--default .select2-results__option--highlighted[aria-selected],
.hec-card-form .select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: var(--hec-green);
}

@media (max-width: 860px) {
	.hec-grid--3 { grid-template-columns: 1fr; }
	.hec-addresses { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
 * Payment cards
 * ---------------------------------------------------------------------- */

.hec-cards { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }

.hec-card-item {
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: 360px;
	padding: 14px 16px;
	border: 1px solid var(--hec-border);
	border-radius: var(--hec-radius);
	background: #fff;
}
.hec-card-item__visual {
	flex: 0 0 auto;
	width: 76px;
	height: 48px;
	border-radius: 8px;
	background: linear-gradient(135deg, #e3e6e3, #cfd4cf);
}
.hec-card-item__info { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
.hec-card-item__brand { font-weight: 600; font-size: 15px; color: var(--hec-text); }
.hec-card-item__meta { font-size: 13px; color: var(--hec-muted); }
.hec-card-item__actions { display: flex; gap: 6px; }

/* Add/edit card form */
.hec-card-form__subtitle { font-size: 15px; font-weight: 600; margin: 0 0 14px; color: var(--hec-text); }

.hec-pay-methods { display: flex; flex-direction: column; gap: 16px; }

.hec-radio { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--hec-text); cursor: pointer; }
.hec-radio input[type="radio"] { width: 18px; height: 18px; accent-color: var(--hec-green); margin: 0; }

.hec-card-fields { margin: 2px 0 6px; }
.hec-card-fields[hidden] { display: none; }

.hec-grid--card { grid-template-columns: 2fr 1fr 1fr; align-items: end; margin-bottom: 16px; }

.hec-field--cvc { position: relative; }
.hec-cvc-hint {
	position: absolute;
	right: 12px;
	bottom: 13px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1px solid var(--hec-field-border);
	color: var(--hec-muted);
	font-size: 11px;
	line-height: 16px;
	text-align: center;
	cursor: help;
}

@media (max-width: 860px) {
	.hec-grid--card { grid-template-columns: 1fr 1fr; }
	.hec-field--card-number { grid-column: 1 / -1; }
}

/* Responsive */
@media (max-width: 860px) {
	.hec-account { grid-template-columns: 1fr; gap: 24px; }
	.hec-account__sidebar { position: static; }
	.hec-grid--2 { grid-template-columns: 1fr; }
}
