/* WordPress-specific adjustments on top of the prototype's own styles.css.
   Nothing here overrides a design value — it only accounts for WP chrome
   (the admin bar) that the static prototype never had to deal with. */

.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

/* Mobile header (hamburger + search row, ≤980px) scrolls away with the page
   instead of staying pinned over the content. relative (not static) keeps it
   the positioning context + stacking layer for the menu panel and search
   dropdown. Desktop keeps prototype.css's sticky header. */
@media (max-width: 980px) {
	.site-header,
	.admin-bar .site-header { position: relative; top: auto; }
}

/* ---------- WooCommerce integration ----------
   WooCommerce renders its own form/notice markup (variations table, qty
   input, add-to-cart button, notices) that the prototype never had — these
   rules restyle WC's real classes with the prototype's own tokens/components
   (var(--green) etc., .qty-selector/.pdp-add-btn look) rather than replacing
   WC's functional HTML. */

/* Product page: the real <table class="variations"> stays in the DOM (WC's
   variation-form.js reads it) but is visually replaced by pdp-woo.js's
   #pdp-brand-grid selector, built from this same <select>. */
.pdp-add-to-cart-wc table.variations,
.pdp-add-to-cart-wc .reset_variations,
.pdp-add-to-cart-wc .woocommerce-variation-description,
.pdp-add-to-cart-wc .woocommerce-variation-availability { display: none; }

.pdp-add-to-cart-wc .woocommerce-variation-price .price {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(1.3rem, 2vw, 1.6rem);
	color: var(--green-darker);
}

/* pdp-woo.js wraps WooCommerce's native .quantity .qty input with the
   prototype's own .qty-selector/.qty-btn markup, so no new CSS is needed
   here — it inherits styles.css's existing rules for those classes. */
.pdp-add-to-cart-wc .quantity { margin-right: 14px; }

.pdp-add-to-cart-wc form.cart {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	gap: 0;
	/* No top margin: the tab panel's 22px margin-bottom above already spaces it.
	   (An 18px margin here used to collapse into that; since .pdp-add-to-cart-wc
	   became a flex column below, margins no longer collapse and they'd add up.) */
	margin: 0;
}
.pdp-add-to-cart-wc .single_add_to_cart_button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex: 1;
	min-width: 200px;
	background: var(--green);
	color: #0e1a12;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.92rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 15px 30px;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	box-shadow: 0 12px 26px -12px rgba(76, 194, 107, 0.5);
	transition: background 0.15s ease, transform 0.15s ease;
}
.pdp-add-to-cart-wc .single_add_to_cart_button:hover { background: var(--green-dark); color: #f4f2ec; transform: translateY(-1px); }

/* Variable products (every product here) nest the qty + button two levels down
   in .single_variation_wrap > .woocommerce-variation-add-to-cart, so the flex
   row above never reaches them — the wrap shrinks to the button's min-width and
   they stack. Stretch the wrap and make the inner block the qty/button row. */
.pdp-add-to-cart-wc .single_variation_wrap { flex: 1 1 100%; min-width: 0; }
.pdp-add-to-cart-wc .woocommerce-variation-add-to-cart { display: flex; align-items: stretch; }
.pdp-add-to-cart-wc .quantity { display: flex; }
/* WC's qty input also carries .input-text, which the generic rule further down
   gives its own border + radius — inside .qty-selector it should be a flat cell. */
.pdp-add-to-cart-wc .qty-selector .qty-input {
	border: none;
	border-left: 1px solid var(--border);
	border-right: 1px solid var(--border);
	border-radius: 0;
	padding: 0;
}
.pdp-add-to-cart-wc .qty-selector { min-height: 44px; } /* touch target once stacked on mobile */
@media (max-width: 620px) {
	/* Same stacking as the prototype's .pdp-purchase-row at this width. */
	.pdp-add-to-cart-wc form.cart,
	.pdp-add-to-cart-wc .woocommerce-variation-add-to-cart { flex-direction: column; gap: 10px; }
	.pdp-add-to-cart-wc .quantity { margin-right: 0; align-self: center; }
	.pdp-add-to-cart-wc .single_add_to_cart_button { min-width: 0; width: 100%; }
}
.pdp-add-to-cart-wc .single_add_to_cart_button.disabled { opacity: 0.5; cursor: not-allowed; }

/* Express checkout (Apple Pay / Google Pay) is injected by WooPayments or the
   Stripe gateway right after the add-to-cart form, as a sibling inside this
   container. Space it with a flex gap owned by the theme rather than relying
   on the plugins' own margin (1em in their stylesheet / inline style), which
   an optimizer (e.g. LiteSpeed CSS removal) or plugin update can drop without
   notice — this way any element a payment plugin
   adds here gets the same 14px (= the qty-to-button gap), whatever its
   selector, and nothing is added when no buttons render. The plugins' own
   margins are zeroed so they don't stack on top of the gap (!important:
   Stripe sets its margin inline). flex-basis only matters for plugin versions
   that inject inside the (flex) form instead: it then wraps onto its own line
   rather than squeezing in beside the button. */
.pdp-add-to-cart-wc { display: flex; flex-direction: column; gap: 14px; }
.pdp-add-to-cart-wc .wcpay-express-checkout-wrapper,
.pdp-add-to-cart-wc #wcpay-payment-request-wrapper,
.pdp-add-to-cart-wc #wc-stripe-express-checkout-element,
.pdp-add-to-cart-wc #wc-stripe-payment-request-wrapper {
	flex: 1 1 100%;
	margin-top: 0 !important;
}

/* Product page, two-column layout only: the main photo is square
   (prototype.css aspect-ratio 1/1), so a short buybox left a big empty gap
   under the info column. Take the gallery out of the row's height calculation
   (height 0 + min-height 100% = "as tall as the row, but don't size it"), so
   the row is exactly as tall as the buybox, and let the photo fill that with
   object-fit: cover (already set on the img). Capped at 1.45x its width so a
   very tall buybox can't turn it into a thin sliver. Below 980px the columns
   stack and the prototype's square photo is untouched. */
@media (min-width: 981px) {
	.pdp-stack > .pdp-gallery-grid {
		align-self: stretch;
		height: 0;
		min-height: 100%;
		container-type: inline-size;
	}
	.pdp-gallery-grid .pdp-gallery-main-photo {
		aspect-ratio: auto;
		align-self: stretch;
		max-height: calc((100cqw - 98px) * 1.45); /* 98px = 84px thumb rail + 14px gap */
	}
	.pdp-gallery-grid.pdp-gallery-single .pdp-gallery-main-photo { max-height: calc(100cqw * 1.45); }
	.pdp-gallery-side { align-self: start; max-height: 100%; overflow-y: auto; }
}

/* WooCommerce's own frontend stylesheet ships a `.woocommerce button.button`
   rule in its brand purple with the same specificity as a two-class
   selector, so it wins the cascade over the rule above by tie-break (one
   more element selector). !important here is a deliberate, narrow override
   of that one third-party default, not a general pattern used elsewhere.
   (Not scoped under a `.woocommerce`/`div.product` ancestor — this theme's
   single-product.php doesn't emit those wrapper classes, so such a selector
   would never match at all.) */
.pdp-add-to-cart-wc .single_add_to_cart_button.single_add_to_cart_button {
	background: var(--green) !important;
	color: #0e1a12 !important;
	/* WC also adds body.woocommerce on product pages, so its
	   `.woocommerce button.button` padding/size (0,2,1) outranks the rule above
	   too; this doubled-class selector (0,3,0) wins without !important. */
	padding: 15px 30px;
	font-size: 0.92rem;
	line-height: 1.2;
	border-radius: var(--radius-sm);
}
.pdp-add-to-cart-wc .single_add_to_cart_button.single_add_to_cart_button:hover {
	background: var(--green-dark) !important;
	color: #f4f2ec !important;
}

/* Product card "add to cart" icon button (grid/archive) — no class="button"
   here, so it never collides with WooCommerce's own purple .button default;
   already renders correctly from prototype.css's plain .cart-btn rule. */
.cart-btn.add_to_cart_button.loading { opacity: 0.6; pointer-events: none; }
.cart-btn.added::after { display: none; } /* hide WC's default "view cart" text link, icon button has no room for it */

/* Global notices (added to cart, form errors, etc.) */
.woocommerce-notices-wrapper { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
	list-style: none;
	background: var(--paper);
	border: 1px solid var(--border);
	border-left: 4px solid var(--green);
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	margin: 18px 0 0;
	color: var(--ink);
	font-size: 0.9rem;
}
.woocommerce-error { border-left-color: #c0392b; }
.woocommerce-message .button,
.woocommerce-error .button {
	display: inline-block;
	margin-left: 10px;
	color: var(--green-darker);
	font-weight: 700;
	text-decoration: none;
}

/* Shop/category toolbar (sorting dropdown) — placed by archive-product.php's .cat-shop-head */
.woocommerce-result-count { color: var(--ink-soft); font-size: 0.86rem; }
.woocommerce-ordering select {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 8px 12px;
	font-family: var(--font-body);
	color: var(--ink);
	background: var(--paper);
}

/* Cart / checkout tables */
.woocommerce-cart-form table,
.woocommerce-checkout table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
}
.woocommerce-cart-form th,
.woocommerce-cart-form td,
.woocommerce-checkout table th,
.woocommerce-checkout table td {
	padding: 12px 10px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	font-size: 0.9rem;
}
.woocommerce-cart-form img { width: 64px; border-radius: var(--radius-sm); }
#coupon_code, .input-text { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-family: var(--font-body); }
.woocommerce-cart-form .button,
.checkout-button,
#place_order {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.92rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 13px 26px;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	text-decoration: none;
}
/* Same WooCommerce-default-purple-vs-specificity collision as the PDP add-to-cart
   button above (see comment there) — same narrow, deliberate !important fix,
   same reason for not relying on a `.woocommerce` ancestor class. */
.woocommerce-cart-form .button.button,
.checkout-button.checkout-button,
#place_order {
	background: var(--green) !important;
	color: #0e1a12 !important;
}
.woocommerce-cart-form .button:hover,
.checkout-button:hover,
#place_order:hover { background: var(--green-dark) !important; color: #f4f2ec !important; }

/* prototype.css's `.cart-subtotal` (flex row + bigger last <span>) is meant for
   the header's slide-out cart panel, but WooCommerce also puts that class on a
   <tr> in the cart totals and checkout "Your order" tables — turning the row
   into a flexbox knocks its cells out of the table columns. */
tr.cart-subtotal { display: table-row; margin: 0; }
tr.cart-subtotal span:last-child { font-family: inherit; font-size: inherit; }

/* ---------- Cart page (/cart/) ----------
   CSS-only restyle of WooCommerce's own cart.php / cart-totals.php markup (no
   template override, so WC template updates never leave a stale copy here).
   Same card language as .pdp-buybox / .bundle-summary: white card, --border,
   --radius-lg, --shadow. Selectors are prefixed with the .woocommerce-cart body
   class so they outrank woocommerce.css's `.woocommerce table.shop_table td`. */
.woocommerce-cart .woocommerce { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; padding: 0; max-width: none; }
.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-cart .woocommerce-cart-form { min-width: 0; }
.woocommerce-cart .cart-collaterals { width: auto; min-width: 0; }

.woocommerce-cart table.shop_table.cart {
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	margin: 0;
}
.woocommerce-cart table.shop_table.cart th {
	font-family: var(--font-display);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-faint);
	padding: 16px 18px;
	border: 0;
	border-bottom: 1px solid var(--border);
}
.woocommerce-cart table.shop_table.cart td {
	padding: 18px;
	border: 0;
	border-top: 1px solid var(--border);
	vertical-align: middle;
	font-size: 0.92rem;
	color: var(--ink);
}
.woocommerce-cart table.shop_table.cart tbody tr:first-child td { border-top: 0; }
.woocommerce-cart table.shop_table.cart td.product-remove { width: 44px; padding-right: 0; }
.woocommerce-cart table.shop_table.cart a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	border: 1px solid var(--border);
	color: var(--ink-faint) !important; /* woocommerce.css forces `color: red !important` */
	font-size: 1.1rem;
	line-height: 1;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.woocommerce-cart table.shop_table.cart a.remove:hover { background: #fdecea; border-color: #f3c2bd; color: #c0392b !important; }
.woocommerce-cart table.shop_table.cart td.product-thumbnail { width: 96px; }
.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: cover;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: none;
}
.woocommerce-cart table.shop_table.cart td.product-name a {
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
}
.woocommerce-cart table.shop_table.cart td.product-name a:hover { color: var(--green-darker); }
.woocommerce-cart table.shop_table.cart td.product-name dl.variation { margin: 6px 0 0; font-size: 0.8rem; color: var(--ink-soft); }
.woocommerce-cart table.shop_table.cart td.product-price { color: var(--ink-soft); }
.woocommerce-cart table.shop_table.cart td.product-subtotal {
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--green-darker);
}
.woocommerce-cart table.shop_table.cart .quantity .qty {
	width: 68px;
	padding: 9px 8px;
	text-align: center;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--ink);
	background: var(--paper);
}

/* Coupon + "Update cart" footer row */
.woocommerce-cart table.shop_table.cart td.actions { background: #fafaf6; padding: 14px 18px; }
.woocommerce-cart table.shop_table.cart td.actions .coupon { display: flex; align-items: center; gap: 8px; }
.woocommerce-cart table.shop_table.cart td.actions .coupon label { display: none; }
.woocommerce-cart table.shop_table.cart td.actions #coupon_code { width: 180px; margin: 0; background: var(--paper); font-size: 0.86rem; }
.woocommerce-cart table.shop_table.cart td.actions .button { padding: 11px 20px; font-size: 0.8rem; }
/* "Update cart" is a secondary action: outlined, not the solid green CTA. */
.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"] {
	background: var(--paper) !important;
	color: var(--ink) !important;
	border: 1px solid var(--border);
}
.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"]:disabled { opacity: 0.55; cursor: not-allowed; }
.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"]:not(:disabled):hover { border-color: var(--ink) !important; }

/* Cart totals: summary card, same shape as .bundle-summary */
.woocommerce-cart .cart-collaterals .cart_totals {
	float: none;
	width: 100%;
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 24px;
	box-shadow: var(--shadow);
	position: sticky;
	top: 110px;
}
.woocommerce-cart .cart-collaterals .cart_totals h2 {
	font-size: 1.05rem;
	text-transform: uppercase;
	color: var(--ink);
	margin: 0 0 12px;
}
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table { border: 0; border-radius: 0; margin: 0; }
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table th,
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table td {
	border: 0;
	border-top: 1px solid var(--border);
	padding: 12px 0;
	vertical-align: middle;
	font-size: 0.9rem;
	background: none;
}
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table th { font-weight: 500; color: var(--ink-soft); width: auto; }
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table td { text-align: right; font-weight: 600; color: var(--ink); }
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table tr:first-child th,
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table tr:first-child td { border-top: 0; }
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table tr.order-total th { color: var(--ink); font-weight: 700; }
.woocommerce-cart .cart-collaterals .cart_totals table.shop_table tr.order-total td {
	font-family: var(--font-display);
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--green-darker);
}
.woocommerce-cart .cart-collaterals .cart_totals .order-total td strong { font-weight: inherit; }
.woocommerce-cart .cart-collaterals .cart_totals .woocommerce-shipping-destination,
.woocommerce-cart .cart-collaterals .cart_totals .woocommerce-shipping-calculator { font-size: 0.8rem; font-weight: 400; color: var(--ink-soft); }
.woocommerce-cart .wc-proceed-to-checkout { padding: 16px 0 0; }
.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
	display: flex;
	width: 100%;
	margin: 0;
	padding: 15px 24px;
	font-size: 0.92rem;
	box-shadow: 0 12px 26px -12px rgba(76, 194, 107, 0.5);
}

/* Empty cart */
.woocommerce-cart .woocommerce > .wc-empty-cart-message,
.woocommerce-cart .woocommerce > .return-to-shop { grid-column: 1 / -1; }
.woocommerce-cart .return-to-shop .button {
	display: inline-flex;
	font-family: var(--font-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 13px 26px;
	border-radius: var(--radius-sm);
	background: var(--green) !important;
	color: #0e1a12 !important;
}

@media (max-width: 960px) {
	.woocommerce-cart .woocommerce { grid-template-columns: 1fr; }
	.woocommerce-cart .cart-collaterals .cart_totals { position: static; }
}

/* ≤768px: woocommerce-smallscreen.css turns each row into a stacked block with
   data-title labels; keep that, just make each item read as a row in the card. */
@media (max-width: 768px) {
	.woocommerce-cart table.shop_table.cart tr.cart_item { display: block; position: relative; padding: 14px 16px; border-top: 1px solid var(--border); }
	.woocommerce-cart table.shop_table.cart tbody tr.cart_item:first-child { border-top: 0; }
	.woocommerce-cart table.shop_table.cart tr.cart_item td { border: 0; padding: 6px 0; background: none; }
	/* z-index + a 40px target: the × sits on top of the thumbnail row, and phones
	   must never resolve a tap there to the product link (see below). */
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-remove { position: absolute; top: 10px; right: 10px; z-index: 2; width: auto; padding: 0; }
	.woocommerce-cart table.shop_table.cart tr.cart_item a.remove { width: 40px; height: 40px; font-size: 1.45rem; color: var(--ink-soft) !important; background: #fff; }
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name { padding-right: 48px; }
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail { display: block; width: auto; text-align: left !important; /* woocommerce-smallscreen.css: right !important */ }
	/* The thumbnail <a> is inline around a block <img>, so it spanned the whole
	   row — right under the × — and taps on × opened the product page instead. */
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail a { display: inline-block; vertical-align: top; }
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail::before { display: none; }
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail img { width: 64px; height: 64px; }
	.woocommerce-cart table.shop_table.cart tr.cart_item td::before { font-weight: 500; color: var(--ink-soft); }
	.woocommerce-cart table.shop_table.cart td.actions { display: block; }
	.woocommerce-cart table.shop_table.cart td.actions .coupon { flex-wrap: wrap; margin-bottom: 10px; }
	.woocommerce-cart table.shop_table.cart td.actions #coupon_code { flex: 1; width: auto; }
	.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"] { width: 100%; }
}

/* ---------- Order received / thank-you page ----------
   Same approach: restyles WooCommerce's thankyou.php + order-details.php markup
   in place. Scoped to .woocommerce-order, which only exists on this page (and
   My Account → View order, which should look the same anyway). */
.woocommerce-order .woocommerce-thankyou-order-received {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #eaf8ee;
	border: 1px solid #cfeed8;
	border-radius: var(--radius);
	padding: 16px 20px;
	margin: 0 0 20px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--green-darker);
}
.woocommerce-order .woocommerce-thankyou-order-received::before {
	content: "";
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e1a12' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.woocommerce .woocommerce-order ul.woocommerce-order-overview {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.woocommerce .woocommerce-order ul.woocommerce-order-overview::before,
.woocommerce .woocommerce-order ul.woocommerce-order-overview::after { display: none; }
.woocommerce .woocommerce-order ul.woocommerce-order-overview li {
	float: none;
	margin: 0;
	padding: 16px 20px;
	border: 0;
	border-left: 1px solid var(--border);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-faint);
}
.woocommerce .woocommerce-order ul.woocommerce-order-overview li:first-child { border-left: 0; }
.woocommerce .woocommerce-order ul.woocommerce-order-overview li strong {
	display: block;
	margin-top: 4px;
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--ink);
}
.woocommerce-order > p:not([class]) { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 24px; }

.woocommerce-order .woocommerce-order-details,
.woocommerce-order .woocommerce-customer-details {
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	padding: 24px;
	margin: 0 0 24px;
}
.woocommerce-order .woocommerce-order-details__title,
.woocommerce-order .woocommerce-customer-details .woocommerce-column__title {
	font-size: 1.05rem;
	text-transform: uppercase;
	color: var(--ink);
	margin: 0 0 12px;
}
.woocommerce .woocommerce-order-details table.shop_table.order_details {
	border: 0;
	border-radius: 0;
	border-collapse: collapse;
	margin: 0;
}
.woocommerce .woocommerce-order-details table.shop_table.order_details th,
.woocommerce .woocommerce-order-details table.shop_table.order_details td {
	border: 0;
	border-top: 1px solid var(--border);
	padding: 12px 0;
	font-size: 0.9rem;
	background: none;
}
.woocommerce .woocommerce-order-details table.shop_table.order_details thead th {
	border-top: 0;
	font-family: var(--font-display);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-faint);
}
.woocommerce .woocommerce-order-details table.shop_table.order_details .product-total,
.woocommerce .woocommerce-order-details table.shop_table.order_details tfoot td { text-align: right; }
.woocommerce .woocommerce-order-details table.shop_table.order_details td.product-name a {
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
}
.woocommerce .woocommerce-order-details table.shop_table.order_details td.product-name a:hover { color: var(--green-darker); }
.woocommerce .woocommerce-order-details table.shop_table.order_details .product-quantity {
	display: inline-block;
	margin-left: 6px;
	font-size: 0.74rem;
	font-weight: 600;
	color: var(--green-darker);
	background: #eaf8ee;
	border-radius: 999px;
	padding: 2px 9px;
}
.woocommerce .woocommerce-order-details table.shop_table.order_details td.product-total { font-weight: 600; color: var(--ink); }
.woocommerce .woocommerce-order-details table.shop_table.order_details tfoot th { font-weight: 500; color: var(--ink-soft); }
.woocommerce .woocommerce-order-details table.shop_table.order_details tfoot td { font-weight: 600; color: var(--ink); }
/* tfoot rows carry no classes, and the grand total isn't the last one (Payment
   method follows it) — functions.php wraps its value in .mm-order-total. */
.woocommerce .woocommerce-order-details table.shop_table.order_details tfoot tr:has(.mm-order-total) th { color: var(--ink); font-weight: 700; }
.woocommerce .woocommerce-order-details table.shop_table.order_details tfoot .mm-order-total {
	font-family: var(--font-display);
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--green-darker);
}
.woocommerce .woocommerce-customer-details address {
	border: 0;
	border-radius: 0;
	padding: 0;
	font-style: normal;
	font-size: 0.92rem;
	line-height: 1.7;
	color: var(--ink);
}
.woocommerce .woocommerce-customer-details address p { color: var(--ink-soft); }
.woocommerce .woocommerce-customer-details .woocommerce-columns--addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.woocommerce .woocommerce-customer-details .woocommerce-columns--addresses .woocommerce-column { float: none; width: auto; }
.woocommerce .woocommerce-customer-details .woocommerce-columns--addresses::before,
.woocommerce .woocommerce-customer-details .woocommerce-columns--addresses::after { display: none; }

@media (max-width: 768px) {
	.woocommerce .woocommerce-order ul.woocommerce-order-overview { grid-template-columns: 1fr 1fr; }
	.woocommerce .woocommerce-order ul.woocommerce-order-overview li { border-left: 0; border-top: 1px solid var(--border); }
	.woocommerce .woocommerce-order ul.woocommerce-order-overview li:nth-child(-n+2) { border-top: 0; }
	.woocommerce .woocommerce-order ul.woocommerce-order-overview li:nth-child(even) { border-left: 1px solid var(--border); }
	.woocommerce-order .woocommerce-order-details,
	.woocommerce-order .woocommerce-customer-details { padding: 18px; }
}

/* My Account */
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce-MyAccount-navigation a {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--border);
	color: var(--ink-soft);
	text-decoration: none;
	font-size: 0.86rem;
}
.woocommerce-MyAccount-navigation .is-active a { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.woocommerce-form-login label,
.woocommerce-form-register label,
.woocommerce-form-row label { display: block; margin-bottom: 6px; font-size: 0.82rem; color: var(--ink-soft); }
.woocommerce-form-login .button,
.woocommerce-form-register .button,
.woocommerce-form-coupon .button {
	font-family: var(--font-display);
	font-weight: 700;
	border: none;
	border-radius: var(--radius-sm);
	padding: 12px 24px;
	cursor: pointer;
}
.woocommerce-form-login .button.button,
.woocommerce-form-register .button.button,
.woocommerce-form-coupon .button.button {
	background: var(--green) !important;
	color: #0e1a12 !important;
}

/* ---------- Homepage hero (front-page.php .home-hero) ----------
   Dark, industrial banner under the nav: copy + CTA on the left, a layered
   collage of real product photos on the right. Built only from the prototype's
   tokens (--dark*, --green*, --on-dark*, fonts, radii) and its .btn-primary. */
.home-hero {
	position: relative;
	overflow: hidden;
	color: var(--on-dark);
	background:
		radial-gradient(60% 90% at 78% 45%, rgba(76, 194, 107, 0.22) 0%, rgba(76, 194, 107, 0) 70%),
		radial-gradient(50% 80% at 0% 100%, rgba(76, 194, 107, 0.08) 0%, rgba(76, 194, 107, 0) 70%),
		linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
	border-top: 1px solid var(--dark-border);
	border-bottom: 3px solid var(--green);
}
/* Faint engineering grid, faded out toward the copy side. */
.home-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(244, 242, 236, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(244, 242, 236, 0.045) 1px, transparent 1px);
	background-size: 44px 44px;
	-webkit-mask-image: linear-gradient(90deg, transparent 10%, #000 70%);
	mask-image: linear-gradient(90deg, transparent 10%, #000 70%);
	pointer-events: none;
}
.home-hero-inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
	align-items: center;
	gap: 32px;
	padding-top: 48px;
	padding-bottom: 48px;
}
.home-hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	color: var(--green);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.home-hero-eyebrow::before {
	content: "";
	width: 28px;
	height: 2px;
	background: var(--green);
}
.home-hero-title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(2.5rem, 5.4vw, 5rem);
	line-height: 0.98;
	letter-spacing: -0.015em;
	text-transform: uppercase;
	color: var(--on-dark);
}
.home-hero-title span { display: block; }
.home-hero-title .accent { color: var(--green); }
.home-hero-sub {
	max-width: 30em;
	margin: 22px 0 30px;
	color: var(--on-dark-soft);
	font-size: clamp(1rem, 1.25vw, 1.15rem);
	line-height: 1.55;
}
.home-hero-cta {
	padding: 17px 44px;
	font-size: 1rem;
	box-shadow: 0 16px 34px -14px rgba(76, 194, 107, 0.65);
}
.home-hero-cta span { transition: transform 0.15s ease; }
.home-hero-cta:hover span { transform: translateX(3px); }
.home-hero-cta:focus-visible { outline-color: var(--green); }
.home-hero-brands {
	margin: 22px 0 0;
	color: var(--on-dark-soft);
	font-size: 0.88rem;
}

/* Collage: fixed-ratio stage, cards placed in % so it scales as one piece. */
.home-hero-collage {
	position: relative;
	width: 100%;
	max-width: 740px;
	justify-self: end;
	aspect-ratio: 7 / 5;
}
.home-hero-collage::before {
	/* Green ring behind the hero product for depth. */
	content: "";
	position: absolute;
	left: 25%;
	top: 0;
	width: 56%;
	aspect-ratio: 1;
	border-radius: 50%;
	border: 1px solid rgba(76, 194, 107, 0.35);
	box-shadow: 0 0 0 26px rgba(76, 194, 107, 0.04), 0 0 90px rgba(76, 194, 107, 0.18);
}
.home-hero-card {
	position: absolute;
	display: block;
	overflow: hidden;
	border-radius: var(--radius-lg);
	border: 1px solid rgba(244, 242, 236, 0.14);
	background: var(--dark-3);
	box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.85), 0 10px 20px -12px rgba(0, 0, 0, 0.6);
	text-decoration: none;
	transform: rotate(var(--tilt, 0deg));
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.home-hero-card:hover {
	transform: rotate(var(--tilt, 0deg)) translateY(-6px);
	box-shadow: 0 38px 70px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(76, 194, 107, 0.5);
}
.home-hero-card:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.home-hero-card-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.home-hero-card-label {
	position: absolute;
	left: 10px;
	bottom: 10px;
	padding: 5px 11px;
	border-radius: 999px;
	background: rgba(15, 16, 21, 0.78);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: var(--on-dark);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.72rem;
	letter-spacing: 0.02em;
	white-space: nowrap;
}
/* Stage is 7:5, so a square card of width W% is W * 1.4% of the stage height. */
/* 1: hero product, centre-right, upright */
.home-hero-card-1 { left: 28%; top: 7%; width: 46%; aspect-ratio: 1; z-index: 3; }
/* Label top-left: the bottom corners are overlapped by cards 3 and 4. */
.home-hero-card-1 .home-hero-card-label { left: 14px; top: 14px; bottom: auto; font-size: 0.8rem; padding: 6px 13px; }
/* 2: secondary, behind the hero product's upper-right shoulder */
.home-hero-card-2 { right: 0; top: 0; width: 36%; aspect-ratio: 1; z-index: 2; --tilt: 3deg; }
.home-hero-card-2 .home-hero-card-photo { filter: brightness(0.92); }
/* Label bottom-right: its left edge is tucked behind card 1. */
.home-hero-card-2 .home-hero-card-label { left: auto; right: 10px; }
/* 3-4: small supporting cards floating in front */
.home-hero-card-3 { left: 12%; bottom: 5%; width: 25%; aspect-ratio: 1; z-index: 4; --tilt: -5deg; }
.home-hero-card-4 { right: 5%; bottom: 0; width: 24%; aspect-ratio: 1; z-index: 4; --tilt: 4deg; }

@media (prefers-reduced-motion: reduce) {
	.home-hero-card,
	.home-hero-cta span { transition: none; }
}

@media (max-width: 1100px) {
	.home-hero-inner { gap: 24px; padding-top: 44px; padding-bottom: 44px; }
}

/* Stacked: copy first, collage underneath at full width. */
@media (max-width: 860px) {
	.home-hero-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
		padding-top: 40px;
		padding-bottom: 44px;
	}
	.home-hero::before {
		-webkit-mask-image: linear-gradient(180deg, transparent 30%, #000 80%);
		mask-image: linear-gradient(180deg, transparent 30%, #000 80%);
	}
	.home-hero-collage { justify-self: center; max-width: 620px; }
}

@media (max-width: 620px) {
	.home-hero-inner { padding-top: 20px; padding-bottom: 18px; gap: 14px; }
	.home-hero-eyebrow { font-size: 0.7rem; margin-bottom: 10px; }
	.home-hero-title { font-size: clamp(2.2rem, 11vw, 3rem); line-height: 0.95; }
	.home-hero-sub { margin: 12px 0 18px; font-size: 0.9rem; line-height: 1.45; text-wrap: pretty; }
	.home-hero-cta { display: flex; width: 100%; min-height: 54px; }
	.home-hero-brands { font-size: 0.84rem; line-height: 1.4; margin-top: 10px; text-wrap: pretty; }
	/* The composition leaves the stage's left 12% empty (it leans right on
	   desktop). Stacked, pull that empty strip off-screen-left so the cards span
	   ~95% of the content width, centred: 108% wide, and the cards' left edge
	   (12% of 108% = 12.96%) shifted to 2.5% => margin-left -10.46%. */
	.home-hero-collage {
		justify-self: start;
		width: 108%;
		max-width: none;
		margin-left: -10.46%;
	}
	.home-hero-card { border-radius: var(--radius); }
	.home-hero-card-label { left: 6px; bottom: 6px; padding: 3px 8px; font-size: 0.62rem; }
	.home-hero-card-1 .home-hero-card-label { left: 8px; top: 8px; padding: 4px 10px; font-size: 0.7rem; }
}

/* ---------- Homepage product grid: mobile readability ----------
   The prototype's 2-column phone tiles shrink the copy to ~8–10px and the CTA
   to a 20px pill. Scoped to .deals-tiles and phones only: layout, images and
   desktop are untouched — just larger type, a clearer price and a tappable CTA. */
@media (max-width: 620px) {
	.deals-tiles .promo-tile-copy { padding: 9px 9px 10px; }
	.deals-tiles .promo-tile-name { font-size: 0.84rem; line-height: 1.2; margin-bottom: 1px; }
	.deals-tiles .promo-tile-tag { font-size: 0.64rem; line-height: 1.25; margin-bottom: 4px; color: var(--ink-soft); }
	.deals-tiles .promo-tile-rating { font-size: 0.58rem; margin-bottom: 4px; }
	.deals-tiles .promo-tile-brands { gap: 3px; margin-bottom: 6px; }
	.deals-tiles .promo-tile-brand { font-size: 0.52rem; padding: 1px 6px; }
	/* Darker green for contrast on white at this size (the light --green is ~2.3:1). */
	.deals-tiles .promo-tile-price { font-size: 1.02rem; line-height: 1.2; color: var(--green-dark); margin-bottom: 7px; }
	.deals-tiles .promo-tile-cta {
		align-self: stretch;
		justify-content: center;
		min-height: 34px;
		padding: 0 10px;
		font-size: 0.7rem;
		letter-spacing: 0.04em;
	}
}

/* ---------- Header search + cart panel: QA fixes ---------- */
/* The desktop search overlay has its own close (X) button; hide the browser's
   native clear (x) there so two X's don't sit side by side. The mobile search
   row has no close button, so it keeps the native clear. */
#search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }

/* Cart panel line item while its +/-/remove request is in flight (cart-woo.js). */
.cart-item.is-updating { opacity: 0.55; transition: opacity 0.15s ease; }
.cart-item.is-updating button { cursor: progress; }

/* Slide-out cart: finger-sized remove and +/- (the prototype's were 20–22px). */
.cart-panel .cart-item-remove {
	width: 40px;
	height: 40px;
	margin: -6px -8px -6px 0;
	border-radius: 999px;
	color: var(--ink-soft);
}
.cart-panel .cart-item-remove svg { width: 19px; height: 19px; }
.cart-panel .cart-item-remove:active { background: #fdecea; color: #c0392b; }
.cart-panel .cart-qty-btn { width: 32px; height: 32px; font-size: 1rem; }
.cart-panel .cart-item-qty-controls { gap: 10px; }
.cart-panel .cart-item-qty-value { min-width: 18px; font-size: 0.9rem; }
@media (pointer: coarse) {
	.cart-panel .cart-qty-btn { width: 36px; height: 36px; }
}
/* Slide-out cart thumbnail: one square white frame for every product; the
   whole photo fits inside, centred, in its own proportions (never cropped or
   stretched). The image is the uncropped 'medium' size (mariomaker_cart_item_html). */
.cart-panel .cart-item-thumb {
	width: 64px;
	height: 64px;
	padding: 4px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid var(--border, #e5e5e5);
	border-radius: 10px;
	align-self: flex-start;
}
.cart-panel .cart-item-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}
.cart-note.is-error { color: #c0392b; font-weight: 600; }
/* Empty drawer: message + Continue shopping; subtotal/checkout hidden. */
.cart-items:empty { display: none; }
.cart-empty .btn { margin-top: 16px; }
.cart-empty:not([hidden]) ~ .cart-panel-foot .cart-subtotal,
.cart-empty:not([hidden]) ~ .cart-panel-foot .mm-order-compact,
.cart-empty:not([hidden]) ~ .cart-panel-foot #cart-checkout { display: none; }

/* =====================================================================
   Product page (single-product.php) — shared by every product.
   Layered on prototype.css's .pdp-* rules: gallery | buy box on desktop,
   one column below 980px. Green is reserved for the CTA, the selected
   battery tile, prices and small accents.
   ===================================================================== */
.pdp-section { padding-top: 20px; padding-bottom: 36px; }
/* The inner .wrap already supplies the side padding; the bar's own (prototype.css)
   pushed the breadcrumb 4px (desktop) / 20px (mobile) right of the product content. */
.pdp-breadcrumb-bar { padding-left: 0; padding-right: 0; }
.pdp-stack { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 48px; }
.pdp-stack > .pdp-gallery { grid-column: 1; grid-row: 1; }

/* ---- Gallery: large square main photo + thumbnail row ---- */
.pdp-gallery { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pdp-gallery .pdp-gallery-main-photo {
	aspect-ratio: 1 / 1;
	border-radius: var(--radius-lg);
	background: var(--paper);
	box-shadow: 0 24px 48px -28px rgba(20, 22, 28, 0.35);
}
/* contain, not cover: the whole photo is always visible (catalog photos are
   square, so in practice it fills the frame edge to edge). */
.pdp-gallery .pdp-gallery-main-photo img { object-fit: contain; }
.pdp-gallery .pdp-gallery-side { flex-direction: row; flex-wrap: wrap; gap: 10px; max-height: none; overflow: visible; }
.pdp-gallery .pdp-gallery-side-item {
	width: 78px;
	border: 2px solid var(--border);
	border-radius: var(--radius);
	box-shadow: none;
	opacity: 0.72;
	transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.pdp-gallery .pdp-gallery-side-item:hover { opacity: 1; transform: translateY(-2px); }
.pdp-gallery .pdp-gallery-side-item.active { opacity: 1; border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(76, 194, 107, 0.22); }
.pdp-gallery .pdp-gallery-side-item:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
@media (min-width: 981px) {
	/* Photo stays in view while the (taller) buy box scrolls past it. */
	.pdp-gallery { position: sticky; top: 92px; }
}

/* ---- Buy box ---- */
.pdp-buybox { padding: 32px; border-radius: var(--radius-lg); box-shadow: 0 24px 48px -30px rgba(20, 22, 28, 0.3); }
.pdp-head { margin-bottom: 24px; }
.pdp-buybox .pdp-rating { display: flex; align-items: center; gap: 2px; margin-bottom: 10px; }
.pdp-buybox .pdp-title {
	font-size: clamp(1.75rem, 2.7vw, 2.4rem);
	line-height: 1.05;
	letter-spacing: -0.01em;
	margin: 0 0 12px;
}
.pdp-buybox .pdp-price-line { gap: 10px; margin: 0; }
.pdp-buybox .pdp-price { font-size: clamp(1.6rem, 2.3vw, 1.95rem); }
.pdp-buybox .pdp-price del { font-size: 0.6em; color: var(--ink-faint); font-weight: 600; margin-right: 6px; }
.pdp-buybox .pdp-price ins { text-decoration: none; }
.pdp-lede { margin-top: 14px; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.6; }
.pdp-lede p { margin: 0; }

/* ---- "Choose your battery" picker ---- */
.pdp-choose { border-top: 1px solid var(--border); padding-top: 22px; margin-bottom: 22px; }
.pdp-buybox .pdp-choose-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink);
	margin: 0 0 4px;
}
.pdp-choose-title::before { content: ""; width: 18px; height: 2px; background: var(--green); border-radius: 2px; }
.pdp-choose-sub { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 16px; }

/* Text-only battery tiles: short label ("Makita LXT 18V"), no brand logos or
   lookalike marks. Consistent type, padding and alignment across all 20; names
   wrap between words only (text-wrap: balance evens out two-line labels, and
   hyphenated names use non-breaking hyphens in pdp-woo.js, so "PORTER-CABLE"
   and "X-Change" never split at the hyphen). */
.pdp-choose .pdp-brand-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
.pdp-choose .pdp-brand-card {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 52px;
	padding: 10px 14px;
	background: var(--paper);
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	text-align: left;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.pdp-choose .pdp-brand-card[hidden] { display: none; }
.pdp-choose .pdp-brand-card:hover { border-color: #a9d8b6; box-shadow: 0 8px 18px -14px rgba(20, 22, 28, 0.35); }
.pdp-choose .pdp-brand-card:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
/* Selected: green border + ring + tint + check badge. */
.pdp-choose .pdp-brand-card.active {
	border-color: var(--green-dark);
	background: #effaf2;
	box-shadow: 0 0 0 1px var(--green-dark), 0 12px 24px -18px rgba(38, 138, 73, 0.6);
}
.pdp-brand-card-label {
	display: block;
	min-width: 0;
	font-family: var(--font-body);
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--ink-soft);
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
	text-wrap: balance;
}
.pdp-brand-card.active .pdp-brand-card-label { color: var(--ink); font-weight: 700; }
/* Tiles with a battery illustration (assets/batteries/, the owner's approved artwork):
   picture on top, short name below, centred. The image keeps its own proportions
   (height-limited, width auto, object-fit: contain) — never stretched. */
.pdp-choose .pdp-brand-card.has-image { flex-direction: column; justify-content: flex-start; gap: 6px; padding: 10px 10px 12px; text-align: center; }
.pdp-brand-card-media { display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; }
.pdp-brand-card-media img { display: block; width: auto; height: 100%; max-width: 100%; object-fit: contain; }
.pdp-choose .pdp-brand-card.has-image .pdp-brand-card-label { text-align: center; }

/* "Search brands..." — phones/tablets only (≤980px); on desktop all 20 tiles fit
   in view, so the field stays out of the way. */
.pdp-battery-search { display: none; }
.pdp-battery-search-status { margin: -4px 0 10px; font-size: 0.8rem; color: var(--ink-faint); }
.pdp-battery-search-status[hidden] { display: none; }
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
@media (max-width: 980px) {
	.pdp-battery-search {
		display: flex;
		align-items: center;
		gap: 8px;
		margin: 0 0 12px;
		padding: 0 14px;
		min-height: 44px;
		background: var(--paper);
		border: 1.5px solid var(--border);
		border-radius: 999px;
	}
	.pdp-battery-search:focus-within { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(76, 194, 107, 0.18); }
	.pdp-battery-search svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--ink-faint); }
	.pdp-battery-search input {
		flex: 1;
		min-width: 0;
		border: 0;
		outline: 0;
		background: transparent;
		font-family: var(--font-body);
		font-size: 1rem; /* 16px: stops iOS zooming into the field */
		color: var(--ink);
		padding: 10px 0;
	}
}
.pdp-brand-card-check {
	position: absolute;
	top: -7px;
	right: -7px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--green-dark);
	color: #fff;
	border: 2px solid var(--paper);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(0.5);
	transition: opacity 0.15s ease, transform 0.15s ease;
}
.pdp-brand-card-check svg { width: 12px; height: 12px; }
.pdp-brand-card.active .pdp-brand-card-check { opacity: 1; transform: scale(1); }

/* ---- Quantity + Add to cart ---- */
.pdp-add-to-cart-wc .qty-selector { min-height: 54px; border-radius: var(--radius); }
.pdp-add-to-cart-wc .qty-btn { width: 42px; }
.pdp-add-to-cart-wc .qty-selector .qty-input { width: 46px; }
.pdp-add-to-cart-wc .quantity { margin-right: 12px; }
.pdp-add-to-cart-wc .single_add_to_cart_button.single_add_to_cart_button {
	min-height: 54px;
	padding: 16px 28px;
	font-size: 1rem;
	letter-spacing: 0.06em;
	border-radius: var(--radius);
	box-shadow: 0 16px 30px -14px rgba(76, 194, 107, 0.75);
}
.pdp-add-to-cart-wc .single_add_to_cart_button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---- Trust list (inside the buy box) ---- */
.pdp-trust {
	list-style: none;
	margin: 24px 0 0;
	padding: 20px 0 0;
	border-top: 1px solid var(--border);
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 16px;
}
.pdp-trust li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 0.78rem; color: var(--ink-faint); line-height: 1.35; }
.pdp-trust svg {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	padding: 8px;
	border-radius: 10px;
	background: #eef8f1;
	color: var(--green-darker);
}
.pdp-trust strong { display: block; color: var(--ink); font-size: 0.84rem; font-weight: 700; }
.pdp-trust a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
.pdp-trust a:hover { color: var(--green-darker); }

/* ---- Highlights + product information ---- */
.pdp-details-section { padding-top: 12px; padding-bottom: 28px; }
.pdp-highlights {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 12px;
}
.pdp-highlight {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	min-width: 0;
}
.pdp-highlight-icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: var(--dark);
	color: var(--green);
	display: flex;
	align-items: center;
	justify-content: center;
}
.pdp-highlight-icon svg { width: 21px; height: 21px; }
.pdp-highlight-text { display: flex; flex-direction: column; min-width: 0; color: var(--ink-faint); font-size: 0.82rem; line-height: 1.35; }
.pdp-highlight-text strong { font-family: var(--font-display); font-size: 1rem; color: var(--ink); line-height: 1.25; }

.pdp-info-card {
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 28px 32px 30px;
}
.section .pdp-section-title,
.pdp-section-title { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); margin: 0 0 16px; }
/* Segmented control: equal-width tabs that always fit — no horizontal scroll. */
.pdp-info-card .pdp-tab-list {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	justify-content: stretch;
	gap: 4px;
	max-width: 480px;
	padding: 4px;
	margin: 0 0 22px;
	border-radius: 999px;
	background: #f1f2ef;
	overflow: visible;
}
.pdp-info-card .pdp-tab { padding: 10px 12px; text-align: center; font-size: 0.86rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pdp-info-card .pdp-tab:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 1px; }
.pdp-info-card .pdp-tab.active { box-shadow: 0 6px 14px -8px rgba(20, 22, 28, 0.6); }
.pdp-info-card .pdp-tab-panel { border: 0; padding: 0; margin: 0; }

.pdp-prose { max-width: 72ch; color: var(--ink-soft); font-size: 0.97rem; line-height: 1.7; }
.pdp-prose p { margin: 0 0 12px; }
.pdp-prose p:last-child { margin-bottom: 0; }
.pdp-info-card .spec-list { margin-top: 0; max-width: 620px; }
.pdp-empty-note { color: var(--ink-faint); font-size: 0.92rem; margin: 0; }

/* ---- Reviews: compact card, form collapsed behind "Write a review" ---- */
.pdp-reviews-section { padding-top: 0; padding-bottom: 32px; }
.pdp-reviews {
	background: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 24px 32px;
}
.pdp-reviews-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pdp-eyebrow {
	font-family: var(--font-display);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--green-darker);
	margin: 0 0 4px;
}
.section .pdp-reviews-title {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-family: var(--font-display);
	font-size: 1.25rem;
	text-transform: none;
	letter-spacing: 0;
	margin: 0;
}
.pdp-reviews-average { font-size: 1.6rem; }
.pdp-reviews-title .rating { display: inline-flex; gap: 2px; }
.pdp-reviews-count { font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; color: var(--ink-faint); }
.pdp-reviews-sub { color: var(--ink-soft); font-size: 0.92rem; margin: 4px 0 0; }
.pdp-review-toggle { flex-shrink: 0; min-height: 44px; }
.pdp-review-toggle[hidden] { display: none; }

.pdp-reviews .commentlist { list-style: none; margin: 18px 0 0; padding: 0; }
.pdp-reviews .commentlist li { border-top: 1px solid var(--border); padding: 16px 0; }

.pdp-review-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.pdp-review-form[hidden] { display: none; }
.pdp-reviews #reply-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); margin-bottom: 14px; }
.pdp-reviews .comment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 0; max-width: 760px; }
.pdp-reviews .comment-form > * { grid-column: 1 / -1; margin: 0; }
.pdp-reviews .comment-form > .comment-form-author { grid-column: 1; }
.pdp-reviews .comment-form > .comment-form-email { grid-column: 2; }
.pdp-reviews .comment-form label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.pdp-reviews .comment-form .required { color: var(--green-darker); }
.pdp-reviews .comment-form input[type="text"],
.pdp-reviews .comment-form input[type="email"],
.pdp-reviews .comment-form textarea {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 12px 14px;
	font-family: var(--font-body);
	font-size: 0.95rem;
	color: var(--ink);
	background: var(--paper);
}
.pdp-reviews .comment-form textarea { min-height: 110px; resize: vertical; }
.pdp-reviews .comment-form input:focus,
.pdp-reviews .comment-form textarea:focus { outline: none; border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(76, 194, 107, 0.2); }
.pdp-reviews .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 8px; }
.pdp-reviews .comment-form-cookies-consent label { font-weight: 400; color: var(--ink-soft); margin: 0; }
.pdp-reviews .comment-form-cookies-consent input { margin-top: 3px; }
.pdp-reviews p.stars { margin: 0; font-size: 1.25rem; }
.pdp-reviews p.stars a { color: var(--green-dark); }
/* WooCommerce ships `.woocommerce #respond input#submit` in its purple; one
   extra class outranks it (same approach as the add-to-cart button above). */
.pdp-reviews #respond input#submit.submit {
	background: var(--green);
	color: #0e1a12;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 13px 26px;
	border: 0;
	border-radius: var(--radius-sm);
	cursor: pointer;
}
.pdp-reviews #respond input#submit.submit:hover { background: var(--green-dark); color: #f4f2ec; }

/* ---- Related products: homepage .promo-tile cards, inside the page width ---- */
.pdp-related-section { padding-top: 8px; padding-bottom: 56px; }
.pdp-related-section .pdp-related-grid { width: auto; margin: 0; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ---- Tablet / mobile ---- */
@media (max-width: 1200px) and (min-width: 981px) {
	.pdp-stack { gap: 32px; }
	.pdp-buybox { padding: 26px; }
}
@media (max-width: 980px) {
	.pdp-stack { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.pdp-stack > .pdp-gallery { grid-column: 1; grid-row: auto; }
	.pdp-gallery .pdp-gallery-side { order: 0; }
}
@media (max-width: 620px) {
	.pdp-section { padding-top: 8px; padding-bottom: 20px; }
	/* Main photo stays full-bleed (prototype.css); thumbnails sit under it. */
	.pdp-gallery .pdp-gallery-main-photo { border-radius: 0; box-shadow: none; }
	.pdp-gallery .pdp-gallery-side-item { width: 64px; }

	.pdp-buybox { padding: 22px 16px; border-radius: var(--radius-lg); }
	.pdp-head { margin-bottom: 20px; }
	.pdp-buybox .pdp-title { font-size: 1.7rem; }
	.pdp-choose { padding-top: 18px; margin-bottom: 18px; }
	.pdp-choose-sub { margin-bottom: 14px; }
	.pdp-choose .pdp-brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.pdp-choose .pdp-brand-card { min-height: 48px; padding: 9px 12px; }
	.pdp-brand-card-label { font-size: 0.84rem; }
	.pdp-brand-card-media { height: 46px; }
	.pdp-choose .pdp-brand-card.has-image { padding: 8px 8px 10px; gap: 4px; }

	/* Qty + button stay on one row (button takes the rest) instead of stacking. */
	.pdp-add-to-cart-wc form.cart,
	.pdp-add-to-cart-wc .woocommerce-variation-add-to-cart { flex-direction: row; gap: 10px; }
	.pdp-add-to-cart-wc .quantity { margin-right: 0; align-self: stretch; }
	.pdp-add-to-cart-wc .qty-btn { width: 38px; }
	.pdp-add-to-cart-wc .qty-selector .qty-input { width: 40px; }
	.pdp-add-to-cart-wc .single_add_to_cart_button.single_add_to_cart_button { flex: 1 1 auto; width: auto; min-width: 0; padding: 14px 12px; font-size: 0.92rem; }

	.pdp-trust { gap: 14px 10px; margin-top: 20px; padding-top: 18px; }
	.pdp-trust li { font-size: 0.72rem; gap: 8px; align-items: flex-start; }
	.pdp-trust strong { font-size: 0.78rem; }
	.pdp-trust svg { width: 28px; height: 28px; padding: 6px; border-radius: 8px; }

	.pdp-details-section { padding-top: 4px; padding-bottom: 20px; }
	.pdp-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
	.pdp-highlight { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
	.pdp-highlight:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; }
	.pdp-highlight-icon { width: 36px; height: 36px; border-radius: 10px; }
	.pdp-highlight-icon svg { width: 18px; height: 18px; }
	.pdp-highlight-text strong { font-size: 0.92rem; }
	.pdp-highlight-text { font-size: 0.76rem; }

	.pdp-info-card { padding: 20px 16px 22px; }
	.pdp-info-card .pdp-tab-list { max-width: none; margin-bottom: 18px; }
	.pdp-info-card .pdp-tab { padding: 10px 4px; font-size: 0.8rem; }

	.pdp-reviews-section { padding-bottom: 20px; }
	.pdp-reviews { padding: 20px 16px; }
	.pdp-review-toggle { width: 100%; }
	.pdp-reviews .comment-form { grid-template-columns: minmax(0, 1fr); }
	.pdp-reviews .comment-form > .comment-form-author,
	.pdp-reviews .comment-form > .comment-form-email { grid-column: 1; }

	.pdp-related-section { padding-bottom: 36px; }
	.pdp-related-section .pdp-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* ---------- Shop / category archive grid ----------
   Same .promo-tile cards as the homepage, but inside the page width (not
   full-bleed) in fixed columns: 4 on desktop, 3 on tablet, 2 on phones, filling
   row by row for any number of products. Every card is built from the same
   stacked slots — square photo, 2-line title, 2-line description, one chip row,
   price, button — so those line up across a row whatever the text lengths.
   With only 1–2 products (.promo-grid-few, --mm-n = count) the cards keep that
   same column width and sit centered instead of hugging the left edge.
   Scoped to .category-grid: the homepage and related-products tiles are untouched. */
.category-grid .promo-grid {
	--mm-cols: 4;
	--mm-gap: 22px;
	width: auto;
	margin: 0;
	grid-template-columns: repeat(var(--mm-cols), minmax(0, 1fr));
	gap: var(--mm-gap);
}
.category-grid .promo-grid-few {
	grid-template-columns: repeat(min(var(--mm-n), var(--mm-cols)), calc((100% - (var(--mm-cols) - 1) * var(--mm-gap)) / var(--mm-cols)));
	justify-content: center;
}
.category-grid .promo-tile {
	border: 1px solid var(--border);
	border-radius: var(--radius);
}
.category-grid .promo-tile-media { aspect-ratio: 1 / 1; }
.category-grid .promo-tile-photo { width: 100%; height: 100%; object-fit: cover; }
.category-grid .promo-tile-copy { --mm-name-lh: 1.2; --mm-tag-lh: 1.3; }
.category-grid .promo-tile-name,
.category-grid .promo-tile-tag {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	white-space: normal;
}
.category-grid .promo-tile-name { line-height: var(--mm-name-lh); min-height: calc(2em * var(--mm-name-lh)); }
.category-grid .promo-tile-tag { line-height: var(--mm-tag-lh); min-height: calc(2em * var(--mm-tag-lh)); }
/* Chips, price and button sit together at the bottom of every card. */
.category-grid .promo-tile-brands { margin-top: auto; flex-wrap: nowrap; overflow: hidden; }
.category-grid .promo-tile-cta { margin-top: 0; }

@media (max-width: 980px) {
	.category-grid .promo-grid { --mm-cols: 3; --mm-gap: 16px; }
}
@media (max-width: 620px) {
	.category-grid .promo-grid { --mm-cols: 2; --mm-gap: 10px; }
	.category-grid .promo-tile-copy { --mm-name-lh: 1.2; --mm-tag-lh: 1.25; }
	/* Too narrow for 3 chips on one line: let them wrap rather than clip "+N more". */
	.category-grid .promo-tile-brands { flex-wrap: wrap; overflow: visible; }
}

/* ---------- Product-category header (archive-product.php) ----------
   Compact, on the white page: breadcrumb, category title, short description and
   an optional spec strip, then the "Shop <category>" row above the grid. */
.cat-header-section { padding: 22px 0 0; background: var(--paper-alt); }
.cat-header-section .woocommerce-breadcrumb { margin: 0 0 14px; color: var(--ink-soft); font-size: 0.9rem; }
.cat-header-section .woocommerce-breadcrumb a { color: var(--ink-soft); }
.cat-title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.9rem, 3.2vw, 2.6rem);
	line-height: 1.05;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: var(--ink);
}
.cat-sub { max-width: 60ch; margin: 8px 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }

/* 1px gaps over a border-colored background draw the dividers, in 4 or 2×2 columns. */
.cat-specs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--border);
	box-shadow: var(--shadow);
}
.cat-spec { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 18px 12px; text-align: center; background: var(--paper); }
.cat-spec-value { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; line-height: 1.1; text-transform: uppercase; color: var(--ink); }
.cat-spec-label { color: var(--ink-soft); font-size: 0.8rem; line-height: 1.3; }

/* "Shop <category>" + product count, sort dropdown on the right. */
.category-grid-has-header { padding-top: 40px; }
.cat-shop-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin: 0 0 20px; }
.cat-shop-head h2 { margin: 0; }
.cat-shop-count { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.9rem; }
.cat-shop-head .woocommerce-ordering { float: none; margin: 0 0 0 auto; }

@media (max-width: 860px) {
	.cat-header-section { padding-top: 18px; }
	.cat-title { font-size: clamp(1.7rem, 7vw, 2.2rem); }
	.cat-sub { font-size: 0.95rem; }
	.cat-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
	.cat-spec { padding: 14px 10px; }
	.cat-spec-value { font-size: 1.2rem; }
	.cat-spec-label { font-size: 0.74rem; }
	.category-grid-has-header { padding-top: 32px; }
	.cat-shop-head h2 { font-size: 1.2rem; }
}
