/*
 * WooCommerce in the brand: shop grid, single product, cart, checkout, my account, notices,
 * forms and buttons, for the classic templates and the Cart/Checkout blocks.
 * Loaded only on WooCommerce views (functions.php → ahc_is_woo_view()), after WooCommerce's CSS.
 * Tokens (--aht-*) come from templates.css. Selectors start with "body.ah-theme" so they beat
 * WooCommerce's ".woocommerce ul.products li.product …" without !important.
 */

body.ah-theme:is(.woocommerce, .woocommerce-page) :is(.aht-woo, .aht-woo-top),
body.ah-theme :is(.woocommerce, .woocommerce-page, .wc-block-components-main, .wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) {
	font-family: var(--aht-f-body);
	color: var(--aht-ink);
}

/* ---------- notices ---------- */
body.ah-theme :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
	position: relative;
	margin: 0 0 24px;
	padding: 16px 20px;
	padding-inline-start: 52px;
	border: 1px solid var(--aht-card-line);
	border-inline-start: 3px solid var(--aht-gold);
	border-top-color: var(--aht-line);
	border-radius: var(--aht-r);
	background: var(--aht-card);
	box-shadow: var(--aht-shadow);
	color: var(--aht-ink);
	font-size: .95rem;
	line-height: 1.7;
	list-style: none;
}
/* WooCommerce places the icon with left: 1.5em; clear both sides first, then the logical start
   (a left: auto after inset-inline-start cancelled it on English pages and put it on the text). */
body.ah-theme :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)::before { top: 16px; left: auto; right: auto; inset-inline-start: 20px; color: var(--aht-ink-gold); }
body.ah-theme .woocommerce-error { border-inline-start-color: var(--ah-red, #9B3B2A); }
body.ah-theme .woocommerce-error::before { color: var(--ah-red, #9B3B2A); }
body.ah-theme :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button { float: inline-end; margin-inline-start: 16px; }
body.ah-theme :is(.woocommerce-message, .woocommerce-info) a:not(.button) { color: var(--aht-ink-gold); }

/* ---------- buttons ---------- */
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(a.button, button.button, input.button, #respond input#submit),
body.ah-theme :is(a.button, button.button).wc-forward,
:is(body.ah-theme.woocommerce-page, body.ah-theme .woocommerce-page) :is(a.button, button.button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border: 1px solid var(--aht-navy);
	border-radius: 999px;
	background: var(--aht-navy);
	color: var(--aht-on-navy);
	font-family: var(--aht-f-body);
	font-weight: 700;
	font-size: .95rem;
	line-height: 1.5;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	transition: background-color .25s, color .25s, border-color .25s;
}
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(a.button, button.button, input.button, #respond input#submit):hover,
:is(body.ah-theme.woocommerce-page, body.ah-theme .woocommerce-page) :is(a.button, button.button):hover { border-color: var(--aht-navy-2); background: var(--aht-navy-2); color: var(--aht-gold-hi); }
/* primary actions in gold */
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(a.button.alt, button.button.alt, input.button.alt, .single_add_to_cart_button, .checkout-button, #place_order),
:is(body.ah-theme.woocommerce-page, body.ah-theme .woocommerce-page) :is(a.button.alt, button.button.alt, #place_order) {
	border-color: var(--aht-gold);
	background: var(--aht-gold);
	color: var(--aht-deep);
}
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(a.button.alt, button.button.alt, input.button.alt, .single_add_to_cart_button, .checkout-button, #place_order):hover,
:is(body.ah-theme.woocommerce-page, body.ah-theme .woocommerce-page) :is(a.button.alt, button.button.alt, #place_order):hover { border-color: var(--aht-gold-hi); background: var(--aht-gold-hi); color: var(--aht-deep); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(.button, button):disabled,
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .button.disabled { opacity: .55; cursor: not-allowed; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--aht-gold); outline-offset: 3px; }

/* ---------- forms ---------- */
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(input.input-text, textarea, select, .select2-container .select2-selection),
:is(body.ah-theme.woocommerce-page, body.ah-theme .woocommerce-page) :is(input.input-text, textarea, select) {
	width: 100%;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid var(--aht-line);
	border-radius: 12px;
	background: var(--aht-paper);
	color: var(--aht-ink);
	font-family: var(--aht-f-body);
	font-size: 1rem;
	line-height: 1.5;
	box-shadow: none;
}
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .select2-container .select2-selection--single { height: 48px; display: flex; align-items: center; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .select2-container .select2-selection__arrow { top: 11px; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(input.input-text, textarea, select):focus { border-color: var(--aht-ink-gold); outline: 2px solid var(--aht-gold); outline-offset: 1px; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) form .form-row { margin: 0 0 16px; padding: 0; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) form .form-row label { margin-bottom: 6px; font-size: .9rem; font-weight: 600; line-height: 1.5; color: var(--aht-ink); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) form .form-row .required { color: var(--ah-red, #9B3B2A); text-decoration: none; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) form :is(.form-row-first, .form-row-last) { width: calc(50% - 8px); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) form .form-row-first { float: inline-start; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) form .form-row-last { float: inline-end; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .quantity .qty { width: 76px; min-height: 48px; padding: 8px; border: 1px solid var(--aht-line); border-radius: 12px; background: var(--aht-paper); font-family: var(--aht-f-mono); text-align: center; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(form.login, form.register, form.checkout_coupon, form.lost_reset_password) {
	margin: 0 0 24px;
	padding: 24px;
	border: 1px solid var(--aht-line);
	border-radius: 16px;
	background: var(--aht-paper);
}

/* ---------- prices, ratings, badges ---------- */
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(.price, .amount) { font-family: var(--aht-f-mono); font-weight: 600; color: var(--aht-ink); font-variant-numeric: tabular-nums; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .price del { opacity: .55; font-weight: 400; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .price ins { text-decoration: none; color: var(--aht-ink-gold); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .star-rating,
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .star-rating::before { color: var(--aht-gold); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) span.onsale {
	top: 12px;
	inset-inline-start: 12px;
	left: auto;
	right: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--aht-gold);
	color: var(--aht-deep);
	font-size: .78rem;
	font-weight: 700;
	line-height: 1.6;
}

/* ---------- shop grid ---------- */
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .woocommerce-result-count { margin: 0 0 20px; font-size: .88rem; color: var(--aht-soft); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .woocommerce-ordering { margin: 0 0 20px; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .woocommerce-ordering select { min-height: 42px; padding: 8px 14px; border-radius: 999px; width: auto; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; margin: 0; padding: 0; clear: both; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products::before,
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products::after { display: none; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	float: none;
	width: auto;
	margin: 0;
	padding: 0 0 20px;
	overflow: hidden;
	border: 1px solid var(--aht-card-line);
	border-radius: var(--aht-r, 14px);
	background: var(--aht-card);
	text-align: start;
	transition: transform .45s var(--aht-ease), box-shadow .45s var(--aht-ease), border-color .3s;
}
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product:hover { transform: translateY(-4px); border-color: var(--aht-tint-line); box-shadow: var(--aht-shadow-hi); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product a img { width: 100%; height: auto; margin: 0 0 6px; aspect-ratio: 4 / 3; object-fit: cover; background: var(--aht-navy); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product :is(.woocommerce-loop-product__title, h2, h3) {
	margin: 0;
	padding: 0 20px;
	font-family: var(--aht-f-display);
	font-weight: 700;
	font-size: 1.08rem;
	line-height: 1.5;
	color: var(--aht-ink);
}
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product .woocommerce-LoopProduct-link { color: inherit; text-decoration: none; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product .price { margin: 0; padding: 0 20px; font-size: .95rem; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product .star-rating { margin: 0 20px; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product .button { align-self: flex-start; margin: auto 20px 0; padding: 9px 18px; font-size: .88rem; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product .added_to_cart { margin-inline: 20px; font-size: .85rem; color: var(--aht-ink-gold); }

:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) nav.woocommerce-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 48px 0 0; border: 0; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) nav.woocommerce-pagination ul li { float: none; border: 0; overflow: visible; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) nav.woocommerce-pagination ul li :is(a, span) { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border: 1px solid var(--aht-line); border-radius: 999px; background: var(--aht-paper); color: var(--aht-ink); font-family: var(--aht-f-mono); line-height: 1; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) nav.woocommerce-pagination ul li span.current { border-color: var(--aht-navy); background: var(--aht-navy); color: var(--aht-gold-hi); }

/* ---------- single product ---------- */
body.ah-theme.single-product .aht-woo div.product:not(.ahp) { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px 56px; align-items: start; }
body.ah-theme.single-product .aht-woo div.product:not(.ahp) > :is(.woocommerce-tabs, .related, .upsells, .up-sells) { grid-column: 1 / -1; }
/* WooCommerce floats these at 48% with ".woocommerce #content div.product div.summary" (an ID), and the
   theme's main is #content: the ID here keeps the grid cells full width. */
body.ah-theme.single-product #content .aht-woo div.product:not(.ahp) div:is(.images, .summary) { float: none; width: auto; margin: 0; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product div.images { overflow: hidden; border: 1px solid var(--aht-card-line); border-radius: var(--aht-r); background: var(--aht-card); box-shadow: var(--aht-shadow); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product div.images img { border-radius: 0; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .product_title {
	margin: 0 0 12px;
	font-family: var(--aht-f-display);
	font-weight: 800;
	font-size: clamp(1.8rem, 3.2vw, 2.6rem);
	line-height: 1.3;
	letter-spacing: 0;
	color: var(--aht-ink);
}
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product :is(p.price, span.price) { margin: 0 0 18px; font-size: 1.4rem; color: var(--aht-ink); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-product-details__short-description { margin-bottom: 20px; color: var(--aht-muted); line-height: 1.85; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product form.cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 24px; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product form.cart::before,
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product form.cart::after { display: none; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product form.cart :is(.quantity, .button) { float: none; margin: 0; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .product_meta { display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--aht-line); font-size: .86rem; color: var(--aht-soft); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .product_meta a { color: var(--aht-ink-gold); }

:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; padding: 6px; border: 1px solid var(--aht-card-line); border-radius: var(--aht-r); background: var(--aht-card); box-shadow: var(--aht-shadow); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-tabs ul.tabs::before,
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-tabs ul.tabs li::before,
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-tabs ul.tabs li::after { display: none; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 0; border-radius: 12px; background: none; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-tabs ul.tabs li a { display: block; padding: 9px 18px; color: var(--aht-muted); font-weight: 700; font-size: .95rem; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-tabs ul.tabs li.active { background: var(--aht-navy); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-tabs ul.tabs li.active a { color: var(--aht-on-navy); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-tabs .panel { max-width: 760px; margin: 0; font-size: 1.05rem; line-height: 1.9; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) div.product .woocommerce-tabs .panel > h2:first-child { font-family: var(--aht-f-display); font-weight: 800; font-size: 1.4rem; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(.related, .upsells, .up-sells) > h2 { margin: 24px 0 20px; font-family: var(--aht-f-display); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: 0; }

/* ---------- cart and checkout (classic) ---------- */
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) table.shop_table {
	margin: 0 0 24px;
	overflow: hidden;
	border: 1px solid var(--aht-card-line);
	border-collapse: separate;
	border-radius: var(--aht-r);
	background: var(--aht-card);
	box-shadow: var(--aht-shadow);
	font-size: .95rem;
}
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) table.shop_table :is(th, td) { padding: 14px 16px; border-top: 1px solid var(--aht-line); text-align: start; vertical-align: middle; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) table.shop_table thead th { border-top: 0; background: var(--aht-navy); color: var(--aht-on-navy); font-weight: 700; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) table.shop_table td.product-name a { color: var(--aht-ink); font-weight: 600; text-decoration: none; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) table.shop_table img { width: 64px; border-radius: 10px; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) a.remove { color: var(--ah-red, #9B3B2A) !important; border: 1px solid var(--aht-line); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) a.remove:hover { background: var(--ah-red, #9B3B2A); color: #fff !important; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) table.cart td.actions .coupon { display: flex; gap: 8px; align-items: center; }
/* WooCommerce sets 80px with "#content table.cart td.actions .coupon .input-text" (an ID). */
body.ah-theme #content table.cart td.actions .coupon .input-text { width: 200px; min-height: 44px; margin: 0; }
/* Sold-one-at-a-time items: WooCommerce prints only a hidden field, so the count is written out. */
body.ah-theme .aht-qty-fixed { font-family: var(--aht-f-mono); font-variant-numeric: tabular-nums; color: var(--aht-muted); }
/* Totals beside the suggestions: the suggestions get the wide column, the totals card the narrow one. */
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 32px 40px; align-items: start; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals::before,
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals::after { display: none; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals :is(.cross-sells, .cart_totals) { float: none; width: auto; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals .cart_totals { grid-column: 2; grid-row: 1; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals .cross-sells { grid-column: 1; grid-row: 1; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cross-sells > h2 { margin: 0 0 16px; font-family: var(--aht-f-display); font-weight: 800; font-size: 1.3rem; letter-spacing: 0; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cross-sells ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cross-sells ul.products li.product :is(.woocommerce-loop-product__title, h2, h3) { padding-inline: 16px; font-size: .95rem; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cross-sells ul.products li.product .price { padding-inline: 16px; font-size: .88rem; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cross-sells ul.products li.product .button { margin-inline: 16px; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals .cart_totals { padding: 24px; border: 1px solid var(--aht-card-line); border-radius: var(--aht-r); background: var(--aht-card); box-shadow: var(--aht-shadow); }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals .cart_totals h2,
body.ah-theme .woocommerce-checkout :is(#order_review_heading, .woocommerce-billing-fields > h3, .woocommerce-shipping-fields h3, .woocommerce-additional-fields > h3) { margin: 0 0 16px; font-family: var(--aht-f-display); font-weight: 800; font-size: 1.3rem; letter-spacing: 0; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals .cart_totals table.shop_table { border: 0; border-radius: 0; }
:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .wc-proceed-to-checkout .checkout-button { width: 100%; padding: 15px 24px; font-size: 1.05rem; }
body.ah-theme .woocommerce-checkout #payment { border: 1px solid var(--aht-card-line); border-radius: var(--aht-r); background: var(--aht-card); box-shadow: var(--aht-shadow); }
body.ah-theme .woocommerce-checkout #payment ul.payment_methods { padding: 18px 20px; border-bottom: 1px solid var(--aht-line); }
body.ah-theme .woocommerce-checkout #payment div.payment_box { border-radius: 12px; background: var(--aht-sand); color: var(--aht-ink); }
body.ah-theme .woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--aht-sand); }
body.ah-theme .woocommerce-checkout #payment div.form-row { padding: 18px 20px; }
body.ah-theme .woocommerce-checkout #place_order { width: 100%; padding: 15px 24px; font-size: 1.05rem; }

/* Checkout in two columns: details on the start side, the order and payment on the end side.
   Error notices that WooCommerce adds to the top of the form span both columns. */
body.ah-theme form.woocommerce-checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
	grid-template-areas: "notes notes" "details head" "details review";
	grid-template-rows: auto auto 1fr;
	column-gap: 48px;
	align-items: start;
}
body.ah-theme form.woocommerce-checkout > * { grid-column: 1 / -1; }
body.ah-theme form.woocommerce-checkout > .woocommerce-NoticeGroup { grid-area: notes; }
body.ah-theme form.woocommerce-checkout > #customer_details { grid-area: details; }
body.ah-theme form.woocommerce-checkout > #order_review_heading { grid-area: head; }
body.ah-theme form.woocommerce-checkout > #order_review { grid-area: review; }
body.ah-theme form.woocommerce-checkout #customer_details > :is(.col-1, .col-2) { float: none; width: auto; }
body.ah-theme form.woocommerce-checkout #customer_details > .col-2 { margin-block-start: 8px; }
body.ah-theme form.woocommerce-checkout #order_review table.shop_table { font-size: .92rem; }
body.ah-theme form.woocommerce-checkout #order_review .product-name { color: var(--aht-ink); }
body.ah-theme .woocommerce-checkout #payment ul.payment_methods li { line-height: 1.6; }
body.ah-theme .woocommerce-checkout #payment ul.payment_methods li > label { font-weight: 700; }
body.ah-theme .woocommerce-checkout #payment .woocommerce-privacy-policy-text { font-size: .86rem; line-height: 1.7; color: var(--aht-muted); }
body.ah-theme .woocommerce-checkout #payment .woocommerce-privacy-policy-text a,
body.ah-theme .woocommerce-checkout #payment .woocommerce-terms-and-conditions-link { color: var(--aht-ink-gold); }

/* "Pay online" transfer details (payment box of the cheque gateway, scripts/server/apply_checkout.php). */
body.ah-theme .ahc-pay { display: grid; gap: 12px; margin: 4px 0 0; }
body.ah-theme .ahc-pay p { margin: 0; }
body.ah-theme .ahc-pay__opt { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--aht-card-line); border-radius: var(--aht-r); background: var(--aht-card); box-shadow: var(--aht-shadow); }
body.ah-theme .ahc-pay__k { font-family: var(--aht-f-display); font-weight: 700; font-size: .98rem; color: var(--aht-ink); }
body.ah-theme .ahc-pay__ids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
body.ah-theme .ahc-pay__ids > div { padding: 10px 12px; border-radius: 10px; background: var(--aht-ivory); }
body.ah-theme .ahc-pay__ids dt { font-size: .78rem; color: var(--aht-soft); }
body.ah-theme .ahc-pay__ids dd { margin: 2px 0 0; font-family: var(--aht-f-mono); font-weight: 600; font-size: .95rem; color: var(--aht-ink); direction: ltr; text-align: start; unicode-bidi: plaintext; }
body.ah-theme .ahc-pay__note { font-size: .9rem; line-height: 1.7; color: var(--aht-muted); }
body.ah-theme .ahc-pay__acts { display: flex; flex-wrap: wrap; gap: 8px; }
body.ah-theme .ahc-pay__acts a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 18px; border: 1px solid var(--aht-navy); border-radius: 999px; background: var(--aht-navy); color: var(--aht-on-navy); font-weight: 700; font-size: .88rem; text-decoration: none; }
body.ah-theme .ahc-pay__acts a:hover { background: var(--aht-navy-2); color: var(--aht-gold-hi); }
body.ah-theme .ahc-pay__acts a.is-ghost { background: transparent; color: var(--aht-ink); }
body.ah-theme .ahc-pay__acts a.is-ghost:hover { border-color: var(--aht-ink-gold); color: var(--aht-ink-gold); }

/* ---------- my account ---------- */
body.ah-theme.woocommerce-account .woocommerce { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
body.ah-theme.woocommerce-account .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
/* WooCommerce's clearfix pseudo-elements would take the first grid cells */
body.ah-theme.woocommerce-account .woocommerce::before,
body.ah-theme.woocommerce-account .woocommerce::after { content: none; display: none; }
body.ah-theme.woocommerce-account:not(.logged-in) .woocommerce { display: block; }
body.ah-theme.woocommerce-account .woocommerce-MyAccount-navigation,
body.ah-theme.woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; }
body.ah-theme.woocommerce-account .woocommerce-MyAccount-navigation ul { display: grid; gap: 4px; margin: 0; padding: 8px; border: 1px solid var(--aht-card-line); border-radius: var(--aht-r); background: var(--aht-card); box-shadow: var(--aht-shadow); list-style: none; }
body.ah-theme.woocommerce-account .woocommerce-MyAccount-navigation li a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--aht-muted); font-weight: 600; text-decoration: none; }
body.ah-theme.woocommerce-account .woocommerce-MyAccount-navigation li a:hover { background: var(--aht-sand); color: var(--aht-ink); }
body.ah-theme.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { background: var(--aht-navy); color: var(--aht-on-navy); }
body.ah-theme.woocommerce-account .woocommerce-MyAccount-content { padding: 28px; border: 1px solid var(--aht-card-line); border-radius: var(--aht-r); background: var(--aht-card); box-shadow: var(--aht-shadow); }
body.ah-theme.woocommerce-account .woocommerce-MyAccount-content a:not(.button):not(.ah-btn) { color: var(--aht-ink-gold); }
body.ah-theme.woocommerce-account .woocommerce-Addresses .woocommerce-Address { padding: 20px; border: 1px solid var(--aht-line); border-radius: 14px; }

/* ---------- Cart and Checkout blocks ---------- */
body.ah-theme :is(.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button) {
	min-height: 52px;
	border: 0;
	border-radius: 999px;
	background: var(--aht-gold);
	color: var(--aht-deep);
	font-family: var(--aht-f-body);
	font-weight: 700;
	text-decoration: none;
}
body.ah-theme :is(.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button):hover { background: var(--aht-gold-hi); color: var(--aht-deep); }
body.ah-theme :is(.wc-block-components-text-input input, .wc-block-components-combobox .wc-block-components-combobox-control input, .wc-blocks-components-select__select) { border-color: var(--aht-line); border-radius: 12px; background: var(--aht-paper); }
body.ah-theme .wc-block-components-sidebar :is(.wc-block-components-totals-wrapper, .wp-block-woocommerce-checkout-order-summary-block) { border-color: var(--aht-line); }
body.ah-theme :is(.wp-block-woocommerce-checkout-order-summary-block, .wc-block-cart__sidebar .wc-block-components-panel, .wp-block-woocommerce-cart-order-summary-block) { border-radius: 16px; background: var(--aht-paper); }
body.ah-theme .wc-block-components-title.wc-block-components-title { font-family: var(--aht-f-display); font-weight: 800; letter-spacing: 0; }
body.ah-theme .wc-block-formatted-money-amount { font-family: var(--aht-f-mono); font-variant-numeric: tabular-nums; }

/* ---------- breakpoints ---------- */
@media (max-width: 1200px) {
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products.columns-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products,
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products.columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
	body.ah-theme.single-product .aht-woo div.product:not(.ahp) { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	body.ah-theme.woocommerce-account .woocommerce { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	body.ah-theme form.woocommerce-checkout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "notes" "details" "head" "review"; grid-template-rows: none; }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals { grid-template-columns: minmax(0, 1fr); }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals .cart_totals { grid-column: 1; grid-row: 1; }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cart-collaterals .cross-sells { grid-column: 1; grid-row: 2; }
	body.ah-theme.woocommerce-account .woocommerce-MyAccount-navigation ul { display: flex; overflow-x: auto; scrollbar-width: none; }
	body.ah-theme.woocommerce-account .woocommerce-MyAccount-navigation li a { white-space: nowrap; }
}
@media (max-width: 767px) {
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products,
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products.columns-4 { gap: 14px 12px; }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product :is(.woocommerce-loop-product__title, h2, h3) { padding: 0 14px; font-size: .98rem; }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product :is(.price, .button, .added_to_cart) { margin-inline: 14px; padding-inline: 14px; }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product .price { padding: 0; }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) form :is(.form-row-first, .form-row-last) { float: none; width: 100%; }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) table.cart td.actions .coupon { flex-wrap: wrap; }
	body.ah-theme #content table.cart td.actions .coupon .input-text { width: 100%; }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) .cross-sells ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	body.ah-theme .ahc-pay__ids { grid-template-columns: minmax(0, 1fr); }
	body.ah-theme.woocommerce-account .woocommerce-MyAccount-content { padding: 20px; }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) :is(form.login, form.register, form.checkout_coupon) { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product { transition: none; }
	:is(body.ah-theme.woocommerce, body.ah-theme .woocommerce) ul.products li.product:hover { transform: none; }
}

/* ---------- currency switcher (WooCommerce Multilingual, EGP / AED) ---------- */
body.ah-theme .wcml_currency_switcher { width: auto; max-width: 320px; margin: 18px 0 0; font-family: var(--aht-f-body); font-size: .9rem; }
body.ah-theme select.wcml_currency_switcher { min-width: 240px; padding-inline-end: 40px; white-space: nowrap; text-overflow: ellipsis; }
body.ah-theme .wcml_currency_switcher :is(ul, li) { margin: 0; padding: 0; border: 0; list-style: none; }
body.ah-theme .wcml_currency_switcher .wcml-cs-item-toggle,
body.ah-theme .wcml_currency_switcher a { display: block; width: 100%; padding: 9px 14px; border: 1px solid var(--aht-card-line); border-radius: var(--aht-r-sm); background: var(--aht-card); color: var(--aht-ink); font: inherit; text-align: start; cursor: pointer; }
body.ah-theme .wcml_currency_switcher .wcml-cs-submenu { border: 1px solid var(--aht-card-line); border-radius: var(--aht-r-sm); background: var(--aht-card); box-shadow: var(--aht-shadow); overflow: hidden; }
body.ah-theme .wcml_currency_switcher .wcml-cs-submenu a { border: 0; border-radius: 0; }
body.ah-theme .wcml_currency_switcher a:hover { background: var(--aht-sand, #EEECE4); }

/* Product descriptions written in the editor: headings in the brand faces, not the kit's Cairo. */
body.ah-theme .woocommerce-Tabs-panel :is(h2, h3, h4) { font-family: var(--aht-f-display); font-weight: 800; letter-spacing: 0; }
body.ah-theme .woocommerce-Tabs-panel :is(p, li) { font-family: var(--aht-f-body); }
