/*
 * Astro Emerald - WooCommerce styles
 * Layered over WooCommerce defaults; bright, clean, conversion-focused.
 */

/* ------------------------------------------------------------------
 * Notices
 * ---------------------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	background: var(--ae-white);
	border-top: 3px solid var(--ae-royal-emerald);
	border-radius: var(--ae-radius-sm);
	box-shadow: var(--ae-shadow);
	color: var(--ae-charcoal);
	padding: 1em 1.5em 1em 3.25em;
}

.woocommerce-message::before,
.woocommerce-info::before { color: var(--ae-royal-emerald); }

.woocommerce-error {
	border-top-color: var(--ae-error);
}
.woocommerce-error::before { color: var(--ae-error); }

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
	background: var(--ae-royal-emerald);
	color: var(--ae-white);
	border-radius: var(--ae-radius-sm);
}

/* ------------------------------------------------------------------
 * Buttons (WooCommerce defaults re-skinned)
 * ---------------------------------------------------------------- */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order,
.wc-block-components-button {
	background: var(--ae-royal-emerald);
	color: var(--ae-white);
	border-radius: var(--ae-radius-sm);
	font-weight: 600;
	padding: 0.75em 1.4em;
	min-height: 44px;
	transition: background-color 0.18s ease, transform 0.18s ease;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #place_order:hover {
	background: var(--ae-deep-emerald);
	color: var(--ae-white);
	transform: translateY(-1px);
}

/* Primary action buttons sit on light surfaces (cream form box,
 * white checkout), so they use the champagne gold - the darker
 * .ae-btn--gold gradient reads brownish on white.
 *
 * These match .ae-btn--gold-light exactly (2px border, same hover
 * lift and shimmer) so Buy Now feels identical to the theme's own
 * buttons. Keep the two in sync if either is restyled. */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce button.single_add_to_cart_button,
.woocommerce #place_order {
	background: linear-gradient(135deg, #E2C77B 0%, #F0DFAC 50%, #E2C77B 100%);
	background-size: 200% 200%;
	color: var(--ae-dark-forest);
	border: 2px solid var(--ae-gold);
	text-shadow: none;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce button.single_add_to_cart_button:hover,
.woocommerce #place_order:hover {
	color: var(--ae-dark-forest);
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(197, 162, 83, 0.4);
	animation: ae-shimmer 1.6s ease infinite;
}

.woocommerce a.button.disabled,
.woocommerce button.button:disabled {
	background: var(--ae-sand);
	color: var(--ae-muted);
}

/* ------------------------------------------------------------------
 * Shop loop / product cards
 * (unscoped ul.products so grids also work on the homepage
 * and inside block patterns, not only on .woocommerce pages)
 * ---------------------------------------------------------------- */
/* On shop/category archives the body carries .woocommerce, and
 * WooCommerce core applies float + percentage widths with selectors
 * like `.woocommerce-page ul.products.columns-3 li.product`. The
 * scoped variants below (plus !important on the float-layout
 * properties only) make the grid win everywhere. */
ul.products,
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

ul.products::before,
ul.products::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }

ul.products li.product,
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	background: var(--ae-white);
	border: var(--ae-border);
	border-radius: var(--ae-radius);
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
	padding-bottom: 1.25rem;
	text-align: start;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

ul.products li.product:hover {
	transform: translateY(-4px);
	box-shadow: var(--ae-shadow-lift);
}

@media (min-width: 768px) {
	ul.products,
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(3, 1fr);
		gap: 1.5rem;
	}

	ul.products.columns-4,
	.woocommerce ul.products.columns-4,
	.woocommerce-page ul.products.columns-4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

ul.products li.product > a img,
ul.products li.product a img {
	display: block;
	margin: 0 0 0.75em;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	width: 100%;
}

ul.products li.product .woocommerce-loop-product__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--ae-font-display);
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--ae-deep-emerald);
	padding: 0 1.1rem 0.35em;
	line-height: 1.3;
}

ul.products li.product .price {
	color: var(--ae-charcoal);
	font-weight: 700;
	font-size: 1.05rem;
	padding: 0 1.1rem;
	display: block;
}

ul.products li.product .price del {
	color: var(--ae-muted);
	font-weight: 400;
	opacity: 1;
}

ul.products li.product .price ins {
	color: var(--ae-success);
	text-decoration: none;
}

ul.products li.product .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0.9rem 1.1rem 0;
	min-height: 44px;
	padding: 0.55em 1.2em;
	/* Light champagne gold - the hero gradient reads brownish on the
	 * white cards, so the grid uses a brighter blend of the palette's
	 * Light Antique Gold with a crisp antique-gold border. */
	background: linear-gradient(135deg, #E2C77B 0%, #F0DFAC 50%, #E2C77B 100%);
	background-size: 200% 200%;
	color: var(--ae-dark-forest);
	border: 2px solid var(--ae-gold);
	border-radius: var(--ae-radius-sm);
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

ul.products li.product .button:hover {
	color: var(--ae-dark-forest);
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(197, 162, 83, 0.4);
	animation: ae-shimmer 1.6s ease infinite;
}

ul.products li.product .onsale {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	right: auto;
	margin: 0;
	background: var(--ae-error);
	color: var(--ae-white);
	border-radius: 999px;
	min-height: 0;
	line-height: 2.2;
	padding: 0 0.9em;
	font-size: 0.78rem;
	z-index: 3;
}

/* Theme badges */
.ae-badges {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	align-items: flex-end;
	z-index: 3;
}

.ae-badge {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.35em 0.85em;
	border-radius: 999px;
}

.ae-badge--gold {
	background: linear-gradient(135deg, var(--ae-gold), var(--ae-gold-light));
	color: var(--ae-dark-forest);
}

.ae-badge--single {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 3;
}

/* Shop toolbar */
.woocommerce .woocommerce-result-count { color: var(--ae-muted); font-size: 0.9rem; }

.woocommerce .woocommerce-ordering select {
	min-height: 44px;
	border: 1.5px solid rgba(94, 98, 95, 0.45);
	border-radius: var(--ae-radius-sm);
	background: var(--ae-white);
	padding: 0.4em 0.8em;
}

/* ------------------------------------------------------------------
 * Single product - custom two-column layout
 * (woocommerce/content-single-product.php overrides the default
 * WooCommerce template; see that file's header for what changed)
 * ---------------------------------------------------------------- */
.woocommerce div.product { position: relative; }

.ae-product__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
	margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 900px) {
	.ae-product__layout {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	}

	.ae-product__gallery { position: sticky; top: 90px; }
}

.woocommerce div.product div.images img {
	border-radius: var(--ae-radius);
	border: var(--ae-border);
}

/* Grid items default to min-width:auto, which lets a child's
 * intrinsic content size (the WooCommerce gallery markup, before
 * its slider JS runs) blow out the track and cause horizontal
 * overflow on narrow screens. */
.ae-product__gallery,
.ae-product__buy { min-width: 0; }

.woocommerce div.product .product_title {
	font-family: var(--ae-font-display);
	color: var(--ae-deep-emerald);
	font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem);
}

.woocommerce div.product p.price {
	color: var(--ae-charcoal);
	font-size: 1.5rem;
	font-weight: 700;
}

.woocommerce div.product p.price del { color: var(--ae-muted); opacity: 1; }
.woocommerce div.product p.price ins { color: var(--ae-success); text-decoration: none; }

.woocommerce div.product .woocommerce-product-details__short-description {
	color: var(--ae-muted);
	margin-bottom: 1.25rem;
}

.woocommerce div.product form.cart {
	background: var(--ae-cream);
	border: var(--ae-border);
	border-radius: var(--ae-radius);
	padding: 1.25rem;
	margin-bottom: 1.5rem;
}

.woocommerce div.product form.cart .button { min-height: 52px; width: 100%; font-size: 1.05rem; }

.woocommerce div.product form.cart div.quantity { margin-bottom: 0.75rem; }

.woocommerce .quantity .qty {
	min-height: 48px;
	border: 1.5px solid rgba(94, 98, 95, 0.45);
	border-radius: var(--ae-radius-sm);
	width: 5em;
}

/* Purchase form (add-to-cart button + personalized-report fields,
 * moved off the narrow sidebar column onto its own full-width
 * section - see woocommerce/content-single-product.php - so a long
 * details form has comfortable room instead of looking cramped
 * next to the product image). */
.ae-product__purchase {
	max-width: 640px;
	margin: 0 auto clamp(2.5rem, 6vw, 4rem);
}

.ae-product__purchase .ae-pr-form legend { font-size: 1.3rem; }

/* Full-width content below the two-column layout: flowing
 * description + attributes + reviews, replacing WooCommerce's
 * default tabs. */
.ae-product__details {
	max-width: 74ch;
	margin-inline: auto;
}

.ae-product-content,
.ae-product-attributes,
.ae-product-reviews {
	padding-block: clamp(1.75rem, 4vw, 2.75rem);
	border-top: 1px dashed rgba(197, 162, 83, 0.4);
}

.ae-product__details > :first-child { border-top: 0; padding-top: 0; }

.ae-product-content__title {
	font-family: var(--ae-font-display);
	color: var(--ae-deep-emerald);
	font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
	margin-bottom: 1rem;
}

.ae-product-content p { color: var(--ae-charcoal); }

.ae-product-attributes .woocommerce-product-attributes {
	width: 100%;
	border-collapse: collapse;
}

.ae-product-attributes .woocommerce-product-attributes th,
.ae-product-attributes .woocommerce-product-attributes td {
	text-align: start;
	padding: 0.6em 0.9em;
	border-bottom: 1px solid rgba(197, 162, 83, 0.25);
}

.ae-product-attributes .woocommerce-product-attributes th {
	color: var(--ae-deep-emerald);
	font-weight: 600;
	width: 35%;
}

/* Personalized details form */
/* Same surface, border and elevation as .ae-lp-card, so the form
 * panel belongs to the same family as the report cards above it
 * rather than sitting on a flat white slab. */
.ae-pr-form {
	border: 1px solid rgba(197, 162, 83, 0.32);
	border-radius: var(--ae-radius);
	background: linear-gradient(158deg, var(--ae-white) 0%, #FCF8EF 100%);
	box-shadow:
		0 1px 2px rgba(6, 63, 55, 0.05),
		0 6px 18px rgba(6, 63, 55, 0.06);
	padding: 1.4rem 1.5rem 1.5rem;
	margin: 0 0 1.25rem;
}

.ae-pr-form legend {
	font-family: var(--ae-font-display);
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--ae-deep-emerald);
	padding-inline: 0.4em;
}

.ae-pr-form__intro { font-size: 0.9rem; color: var(--ae-muted); }

.ae-pr-form__row { margin-bottom: 1rem; position: relative; }

/* Naturally paired fields (First/Last name, Date/Time of birth) sit
 * two-up on wider screens. PHP wraps each pair in its own flex row,
 * so a pair can never wrap apart. */
.ae-pr-form__pair > .ae-pr-form__row { min-width: 0; }

@media (min-width: 620px) {
	.ae-pr-form__pair {
		display: flex;
		gap: 0.9rem;
		align-items: flex-start;
	}

	.ae-pr-form__pair > .ae-pr-form__row { flex: 1 1 0; }
}

/* Place of Birth suggestions */
.ae-place-suggest {
	position: absolute;
	inset-inline: 0;
	top: 100%;
	z-index: 30;
	margin: 2px 0 0;
	padding: 0.25rem;
	list-style: none;
	background: var(--ae-white);
	border: 1.5px solid rgba(8, 106, 88, 0.35);
	border-radius: var(--ae-radius-sm);
	box-shadow: var(--ae-shadow-lift);
	max-height: 260px;
	overflow-y: auto;
}

.ae-place-suggest li {
	padding: 0.55em 0.75em;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.95rem;
}

.ae-place-suggest li:hover,
.ae-place-suggest li.is-active {
	background: var(--ae-cream);
	color: var(--ae-deep-emerald);
}

.ae-pr-form__subheading {
	font-family: var(--ae-font-display);
	font-size: 1.05rem;
	color: var(--ae-deep-emerald);
	border-top: 1px dashed rgba(197, 162, 83, 0.45);
	padding-top: 1rem;
	margin: 1.25rem 0 0.75rem;
}

.ae-pr-form__row label {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 0.3em;
}

.ae-pr-form__hint {
	display: block;
	font-size: 0.82rem;
	color: var(--ae-muted);
	margin-top: 0.3em;
}

/* Display-only row (e.g. "Language: English") - a stated fact, not
 * an input, so it reads as one line rather than a field. */
.ae-pr-form__row--static {
	display: flex;
	align-items: baseline;
	gap: 0.5em;
	background: var(--ae-sand);
	border-radius: var(--ae-radius-sm);
	padding: 0.7em 1em;
}

.ae-pr-form__static-label {
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--ae-deep-emerald);
}

.ae-pr-form__static-label::after { content: ":"; }

.ae-pr-form__static-value { color: var(--ae-charcoal); }

.ae-pr-form__privacy {
	font-size: 0.82rem;
	color: var(--ae-muted);
	background: var(--ae-sand);
	border-radius: var(--ae-radius-sm);
	padding: 0.75em 1em;
	margin: 1rem 0 0;
}

/* Reviews (the default tabs are replaced by .ae-product-reviews above) */
.woocommerce #reviews #comments ol.commentlist li .comment-text {
	border: var(--ae-border);
	border-radius: var(--ae-radius);
	background: var(--ae-white);
}

.woocommerce .star-rating span::before,
.woocommerce p.stars a { color: var(--ae-gold); }

/* Related / upsells */
.woocommerce .related > h2,
.woocommerce .upsells > h2 {
	font-family: var(--ae-font-display);
	color: var(--ae-deep-emerald);
	text-align: center;
	margin: 2.5rem 0 1.5rem;
}

/* Sticky mobile buy bar */
.ae-sticky-buy {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 80;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	background: var(--ae-white);
	border-top: 2px solid var(--ae-gold);
	box-shadow: 0 -6px 24px rgba(6, 63, 55, 0.15);
	padding: 0.6rem var(--ae-gutter);
	padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
}

.ae-sticky-buy[hidden] { display: none; }

.ae-sticky-buy__info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ae-sticky-buy__name {
	font-weight: 600;
	font-size: 0.85rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ae-sticky-buy__price { font-size: 0.95rem; color: var(--ae-deep-emerald); font-weight: 700; }

.ae-sticky-buy .ae-btn { min-height: 44px; padding: 0.5em 1.2em; flex-shrink: 0; }

@media (min-width: 900px) {
	.ae-sticky-buy { display: none; }
}

#ae-buy-anchor { display: block; height: 0; scroll-margin-top: 90px; }

/* ------------------------------------------------------------------
 * Cart
 * ---------------------------------------------------------------- */
.woocommerce table.shop_table {
	border: var(--ae-border);
	border-radius: var(--ae-radius);
	border-collapse: separate;
	background: var(--ae-white);
}

.woocommerce table.shop_table th {
	color: var(--ae-deep-emerald);
	font-weight: 600;
}

.woocommerce table.shop_table td,
.woocommerce table.shop_table th {
	border-top: 1px solid rgba(197, 162, 83, 0.25);
	padding: 0.9em 1em;
}

.woocommerce-cart table.cart img { width: 64px; border-radius: var(--ae-radius-sm); }

.woocommerce a.remove {
	color: var(--ae-error) !important;
	width: 28px;
	height: 28px;
	line-height: 26px;
}

.woocommerce a.remove:hover {
	background: var(--ae-error);
	color: var(--ae-white) !important;
}

.woocommerce .cart_totals h2 { font-family: var(--ae-font-display); color: var(--ae-deep-emerald); }

.woocommerce #coupon_code {
	min-height: 44px;
	width: 140px;
	border: 1.5px solid rgba(94, 98, 95, 0.45);
	border-radius: var(--ae-radius-sm);
	padding-inline: 0.75em;
}

/* Confirmation page (/confirm-order/) */
.ae-confirm__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}

@media (min-width: 900px) {
	.ae-confirm__layout { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
}

.ae-confirm__item {
	background: var(--ae-white);
	border: var(--ae-border);
	border-radius: var(--ae-radius);
	padding: clamp(1.25rem, 3vw, 1.75rem);
	margin-bottom: 1.5rem;
}

.ae-confirm__product {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	margin-bottom: 1rem;
}

.ae-confirm__thumb { flex: 0 0 96px; }
.ae-confirm__thumb img {
	width: 96px;
	border-radius: var(--ae-radius-sm);
	border: var(--ae-border);
	display: block;
}

.ae-confirm__meta { min-width: 0; }

.ae-confirm__name {
	font-size: 1.3rem;
	margin-bottom: 0.2em;
}


.ae-confirm__price {
	font-weight: 700;
	color: var(--ae-deep-emerald);
	font-size: 1.1rem;
	margin: 0 0 0.3em;
}

.ae-confirm__remove {
	font-size: 0.82rem;
	color: var(--ae-error);
}

.ae-confirm__hint {
	font-size: 0.88rem;
	color: var(--ae-muted);
	background: var(--ae-sand);
	border-radius: var(--ae-radius-sm);
	padding: 0.6em 1em;
}

.ae-pr-cart-edit { font-size: 0.92rem; }
.ae-pr-cart-edit summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--ae-royal-emerald); font-weight: 600; }
.ae-pr-cart-edit .ae-pr-form { margin: 0.5rem 0 0; padding: 1.1rem; }

.ae-confirm__summary {
	background: var(--ae-cream);
	border: var(--ae-border);
	border-radius: var(--ae-radius);
	padding: clamp(1.25rem, 3vw, 1.75rem);
	position: sticky;
	top: 90px;
}

.ae-confirm__summary h2 { font-size: 1.25rem; margin-bottom: 1rem; }

.ae-confirm__lines {
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0;
}

.ae-confirm__lines li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.45em 0;
	border-bottom: 1px dashed rgba(197, 162, 83, 0.35);
	font-size: 0.95rem;
}

.ae-confirm__total {
	display: flex;
	justify-content: space-between;
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--ae-deep-emerald);
	margin: 0.75rem 0 1.25rem;
}

.ae-confirm__submit { width: 100%; }

.ae-confirm__note {
	font-size: 0.82rem;
	color: var(--ae-muted);
	text-align: center;
	margin: 0.9rem 0 0;
}

/* Empty cart */
.cart-empty.woocommerce-info {
	text-align: center;
	font-family: var(--ae-font-display);
	font-size: 1.3rem;
	border-top-color: var(--ae-gold);
}

.woocommerce .return-to-shop { text-align: center; }

/* ------------------------------------------------------------------
 * Checkout
 * ---------------------------------------------------------------- */
.woocommerce form .form-row label { font-weight: 600; font-size: 0.92rem; }

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single {
	min-height: 48px;
	border: 1.5px solid rgba(94, 98, 95, 0.45);
	border-radius: var(--ae-radius-sm);
	padding: 0.55em 0.9em;
	background: var(--ae-white);
}

.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 45px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 45px; }

.woocommerce form .form-row.woocommerce-invalid input.input-text { border-color: var(--ae-error); }
.woocommerce form .form-row.woocommerce-validated input.input-text { border-color: var(--ae-success); }

#order_review_heading,
.woocommerce-billing-fields > h3,
.woocommerce-additional-fields > h3 {
	font-family: var(--ae-font-display);
	color: var(--ae-deep-emerald);
}

.woocommerce-checkout #order_review {
	background: var(--ae-cream);
	border: var(--ae-border);
	border-radius: var(--ae-radius);
	padding: 1.5rem;
}

.woocommerce-checkout #payment {
	background: var(--ae-white);
	border-radius: var(--ae-radius);
}

.woocommerce-checkout #payment div.payment_box {
	background: var(--ae-sand);
	color: var(--ae-charcoal);
}

.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--ae-sand); }

.ae-disclaimer-field {
	background: var(--ae-sand);
	border-radius: var(--ae-radius-sm);
	padding: 0.9em 1em !important;
	margin-top: 0.75rem;
}

.ae-disclaimer-field label { font-weight: 500 !important; font-size: 0.88rem !important; }

.ae-pr-thankyou {
	background: var(--ae-cream);
	border: var(--ae-border);
	border-radius: var(--ae-radius-sm);
	padding: 1em 1.25em;
}

/* ------------------------------------------------------------------
 * My Account
 * ---------------------------------------------------------------- */
.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.woocommerce-MyAccount-navigation li a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.4em 1.1em;
	background: var(--ae-white);
	border: var(--ae-border);
	border-radius: 999px;
	color: var(--ae-deep-emerald);
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 500;
}

.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
	background: var(--ae-royal-emerald);
	border-color: var(--ae-royal-emerald);
	color: var(--ae-white);
}

@media (min-width: 900px) {
	.woocommerce-account .woocommerce-MyAccount-navigation {
		float: left;
		width: 25%;
	}
	.woocommerce-account .woocommerce-MyAccount-navigation ul { flex-direction: column; }
	.woocommerce-account .woocommerce-MyAccount-navigation li a { border-radius: var(--ae-radius-sm); width: 100%; }
	.woocommerce-account .woocommerce-MyAccount-content { float: right; width: 72%; }
}

.woocommerce-account .woocommerce-MyAccount-content {
	background: var(--ae-white);
	border: var(--ae-border);
	border-radius: var(--ae-radius);
	padding: clamp(1.25rem, 3vw, 2rem);
}

/* Order status chips in account tables */
.woocommerce-orders-table__cell-order-status { font-weight: 600; color: var(--ae-royal-emerald); }

/* Login / register */
.woocommerce form.login,
.woocommerce form.register,
.woocommerce form.lost_reset_password {
	border: var(--ae-border);
	border-radius: var(--ae-radius);
	background: var(--ae-white);
	padding: clamp(1.25rem, 3vw, 2rem);
	max-width: 480px;
	margin-inline: auto;
}

.woocommerce-account h2 {
	font-family: var(--ae-font-display);
	color: var(--ae-deep-emerald);
	text-align: center;
}

/* Customer review of submitted details */
.ae-pr-review {
	margin: 0.5em 0;
	font-size: 0.9rem;
}

.ae-pr-review summary {
	cursor: pointer;
	color: var(--ae-royal-emerald);
	font-weight: 600;
	min-height: 44px;
	display: flex;
	align-items: center;
	gap: 0.5em;
	/* The default triangle is replaced by the chevron below. */
	list-style: none;
}

.ae-pr-review summary::-webkit-details-marker { display: none; }

/* Chevron after the label, pointing down when closed and up when
 * open. Drawn with a rotated border so it inherits the text colour
 * and needs no asset. */
.ae-pr-review summary::after {
	content: "";
	width: 0.45em;
	height: 0.45em;
	border-inline-end: 2px solid currentColor;
	border-block-end: 2px solid currentColor;
	transform: translateY(-0.15em) rotate(45deg);
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.ae-pr-review[open] summary::after {
	transform: translateY(0.1em) rotate(-135deg);
}

@media (prefers-reduced-motion: reduce) {
	.ae-pr-review summary::after { transition: none; }
}

.ae-pr-details-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0.5em 0;
	background: var(--ae-cream);
	border-radius: var(--ae-radius-sm);
	overflow: hidden;
}

.ae-pr-details-table th,
.ae-pr-details-table td {
	text-align: start;
	padding: 0.5em 0.9em;
	border-bottom: 1px solid rgba(197, 162, 83, 0.25);
	font-size: 0.88rem;
}

.ae-pr-details-table th { color: var(--ae-deep-emerald); width: 40%; }

.ae-pr-review__note { font-size: 0.82rem; color: var(--ae-muted); }

.ae-pr-admin-details { margin-top: 0.5em; max-width: 480px; }

/* Downloads */
.woocommerce-MyAccount-downloads .button,
.woocommerce table.shop_table .woocommerce-MyAccount-downloads-file {
	background: var(--ae-royal-emerald);
	color: var(--ae-white);
}

/* ------------------------------------------------------------------
 * Responsive guards
 * ---------------------------------------------------------------- */
@media (max-width: 640px) {
	.woocommerce table.shop_table_responsive tr td { padding: 0.7em 0.9em; }

	.woocommerce-cart table.cart td.actions .coupon {
		display: flex;
		gap: 0.5rem;
	}

	.woocommerce-cart table.cart td.actions .coupon #coupon_code {
		flex: 1;
		width: auto;
	}
}

/* Keep long product names and prices from overflowing */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce div.product .product_title {
	overflow-wrap: break-word;
}
