/*
 * WooCommerce — theme-side overrides.
 *
 * Loaded site-wide whenever WooCommerce is active (see inc/enqueue.php) so
 * the shop loop, related products and the eqx-product-grid block all share
 * a single product-card style. Card rules are scoped to `ul.products
 * li.product` — the markup WC produces for every loop context.
 */

/* Page heading injected by inc/woocommerce.php on cart / checkout. */
.eqx-page-heading {
	font-family: var(--ff-display);
	font-size: var(--font-display);
	margin: 0 0 var(--spacing-md);
}

/* Cart / checkout gutters.
   Both pages are ordinary pages whose content is a single WooCommerce block,
   so page.php emits the_content() with no theme container — the block runs
   edge to edge. Give <main> the same max-width and gutters every other page
   gets from .eqx-container. Covers order-received too, which carries the
   woocommerce-checkout body class. */
body.woocommerce-cart .eqx-main,
body.woocommerce-checkout .eqx-main,
body.woocommerce-account .eqx-main {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--spacing-md);
	padding-block: var(--spacing-lg);
}

/* Delivery banner above the shop archive. */
.eqx-shop__delivery-banner {
	background: var(--eqx-brand-light);
	color: var(--eqx-brand-dark);
	padding: var(--spacing-xs) var(--spacing-md);
	border-radius: var(--radius-button);
	font-size: var(--font-small);
	letter-spacing: 0.04em;
	text-align: center;
	margin-bottom: var(--spacing-md);
}

/* Category banner — full-bleed image above the product grid on product
   category archives. The image is the whole banner (composed in design
   software), so the markup is just <img> in a wrapper that handles the
   rounded corners, shadow, and optional link affordance. */
.eqx-cat-banner {
	display: block;
	margin: 0 0 var(--spacing-lg);
	border-radius: var(--radius-card);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	background: var(--eqx-brand-light);
	line-height: 0;
}
.eqx-cat-banner__img {
	display: block;
	width: 100%;
	height: auto;
}
a.eqx-cat-banner {
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}
a.eqx-cat-banner:hover,
a.eqx-cat-banner:focus-visible {
	transform: translateY(-2px);
	box-shadow: var(--shadow-overlay);
}
a.eqx-cat-banner:focus-visible {
	outline: 2px solid var(--eqx-brand-accent);
	outline-offset: 3px;
}

/* Shop archive grid — the eqx-product-grid block has its own grid scoped to
   `.eqx-product-grid ul.products`; this rule covers shop archives, the
   [sale_products]/[products] shortcodes (which wrap output in a bare
   `.woocommerce` div), and related/upsell rows where no eqx wrapper exists. */
.eqx-shop ul.products,
.woocommerce ul.products,
.related ul.products,
.up-sells ul.products,
.cross-sells ul.products {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--spacing-md);
}
@media (max-width: 900px) {
	.eqx-shop ul.products,
	.woocommerce ul.products,
	.related ul.products,
	.up-sells ul.products,
	.cross-sells ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.eqx-shop ul.products,
	.woocommerce ul.products,
	.related ul.products,
	.up-sells ul.products,
	.cross-sells ul.products { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────────────
   Canonical product card
   Used everywhere a product appears: shop archive, related products,
   upsells/cross-sells, and the eqx-product-grid block.
   ───────────────────────────────────────────────────────────────────── */

/* Override WooCommerce's default float-based loop layout (from its
   woocommerce-layout.css and woocommerce-smallscreen.css). Those rules
   set `width: 30.75%` / `width: 48%` and floats on `li.product`,
   which collapse our cards inside the CSS Grid. The rule is body-scoped
   to .woocommerce / .woocommerce-page so it only fires where those
   plugin styles actually apply — i.e. shop / category / single-product
   archives, not the homepage product-grid block (which is on a regular
   WP page without those body classes). */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product,
.woocommerce-page ul.products[class*="columns-"] li.product {
	width: auto;
	float: none;
	clear: none;
	margin: 0;
}

/* WC also adds `ul.products::before` and `ul.products::after` with
   `display: table` for its float-clearfix. With `display: grid` on the
   UL those pseudo-elements become grid items — the ::before steals
   row-1 col-1, shifting the first product across by one cell. Hide
   them so auto-placement starts at col 1 row 1. */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after,
ul.products::before,
ul.products::after {
	display: none;
}

/* Every canonical card rule is prefixed with `body[class]` to win against
   WooCommerce's plugin CSS, which uses `.woocommerce ul.products li.product …`
   selectors at specificity (0,4,2). `body[class]` adds (0,1,1), lifting
   our rules to (0,4,3)+ and beating WC's loop colours, paddings, margins
   etc. without needing `!important`. The body always has a class via
   `body_class()` so this prefix matches on every WordPress page —
   shop archive, single product, cart cross-sells, and the homepage
   product-grid block. */
body[class] ul.products li.product {
	background: var(--eqx-warm-white);
	border: 1px solid var(--eqx-border);
	border-radius: var(--radius-card);
	padding: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
	position: relative;
}
body[class] ul.products li.product:hover {
	border-color: rgba(var(--eqx-brand-dark-rgb), 0.18);
	box-shadow: var(--shadow-card);
}

/* WC wraps image+title+price in a single anchor (`woocommerce-LoopProduct-link`).
   We strip its underline and let it fill the card top-to-price. */
body[class] ul.products li.product a.woocommerce-LoopProduct-link {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
	flex: 1 1 auto;
}
body[class] ul.products li.product a.woocommerce-LoopProduct-link:hover {
	color: inherit;
}

/* Image — sits at the top of the card, tinted off-white surface so PNGs of
   product packaging on transparent / white backgrounds read cleanly. Fixed
   aspect ratio keeps every card the same height regardless of source ratio.
   The card already has `overflow: hidden`, so the hover-zoom below clips
   cleanly to the rounded corners. */
body[class] ul.products li.product img,
body[class] ul.products li.product .wp-post-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: var(--eqx-brand-light);
	border-radius: 0;
	margin: 0;
	display: block;
	transition: transform 400ms ease-out;
	transform-origin: center center;
	will-change: transform;
}
body[class] ul.products li.product:hover img,
body[class] ul.products li.product:focus-within img {
	transform: scale(1.04);
}
@media (prefers-reduced-motion: reduce) {
	body[class] ul.products li.product img,
	body[class] ul.products li.product .wp-post-image { transition: none; }
	body[class] ul.products li.product:hover img,
	body[class] ul.products li.product:focus-within img { transform: none; }
}

/* Sale flash — top-left corner of the image. */
body[class] ul.products li.product .onsale {
	position: absolute;
	top: var(--spacing-sm);
	left: var(--spacing-sm);
	right: auto;
	background: var(--eqx-brand-accent);
	color: var(--eqx-warm-white);
	padding: 4px 10px;
	border-radius: var(--radius-pill);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0;
	min-height: 0;
	min-width: 0;
	line-height: 1.4;
	z-index: 2;
}

/* Body — title, rating, price, cart button. Category eyebrow has been
   removed from cards (categories live on the single-product page only).
   The title therefore carries the top padding the eyebrow used to. */
body[class] ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--ff-display);
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--eqx-brand-dark);
	margin: 0;
	padding: var(--spacing-md) var(--spacing-md) 0;
	line-height: 1.35;
}

/* Review stars row — sits between the title and the price. Rendered by
   eqx_loop_product_rating() in inc/woocommerce.php which always emits
   stars (empty when a product has no reviews yet) plus a count / "No
   reviews yet" label, so cards never have a blank gap while the
   Judge.me import is in progress. */
body[class] ul.products li.product .eqx-product-card__rating {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px var(--spacing-md) 0;
	line-height: 1;
}
/* Override WC's default `float: right; margin: 4px 0 0 0` on .star-rating
   so the stars sit inline with the count text inside our flex row.

   The star glyphs themselves are re-declared below rather than inherited,
   because every rule WooCommerce ships is scoped to `.woocommerce` on the
   body. Pages that render the eqx/product-grid block outside a shop context
   — the homepage above all — never get that class, so the stars fell back to
   their screen-reader sentence ("Rated 4.96 out of 5 based on 114 customer
   ratings"), which wrapped to two lines and shoved the count out of line.
   The @font-face for `WooCommerce` is global, so only the rules need copying. */
body[class] ul.products li.product .star-rating {
	float: none;
	margin: 0;
	color: var(--eqx-brand-accent);
	font-size: 0.85em;
	font-family: WooCommerce;
	position: relative;
	overflow: hidden;
	height: 1em;
	line-height: 1;
	width: 5.4em;
	flex-shrink: 0;
}
body[class] ul.products li.product .star-rating::before {
	content: "sssss";
	color: var(--eqx-border);
	float: left;
	top: 0;
	left: 0;
	position: absolute;
}
body[class] ul.products li.product .star-rating span {
	overflow: hidden;
	float: left;
	top: 0;
	left: 0;
	position: absolute;
	padding-top: 1.5em;
}
body[class] ul.products li.product .star-rating span::before {
	content: "SSSSS";
	top: 0;
	left: 0;
	position: absolute;
}
body[class] ul.products li.product .eqx-product-card__rating-count {
	font-size: 0.8125rem;
	color: var(--eqx-text-muted);
	font-weight: 500;
}
body[class] ul.products li.product .eqx-product-card__rating-count--empty {
	font-style: italic;
}

/* Price + cart-button row — sit at the bottom of the card, evenly split.
   The price block is structurally inside the WC loop link, the cart button
   is a sibling outside it; flex on the parent <li> places them side-by-side
   via auto-margins on the cart button. */
body[class] ul.products li.product .price {
	font-family: var(--ff-body);
	font-size: 1rem;
	font-weight: 700;
	color: var(--eqx-brand-dark);
	margin: var(--spacing-sm) 0 var(--spacing-md);
	padding: 0 var(--spacing-md);
	display: block;
}
body[class] ul.products li.product .price del {
	color: var(--eqx-text-muted);
	font-weight: 500;
	margin-right: 0.4em;
	text-decoration-thickness: 1px;
	opacity: 1;
}
body[class] ul.products li.product .price ins {
	background: transparent;
	text-decoration: none;
	color: var(--eqx-brand-dark);
	font-weight: 700;
}
body[class] ul.products li.product .price .woocommerce-Price-amount { color: inherit; }

/* Cart button — circular navy pill in the bottom-right of the card,
   icon-only. Rendered by the woocommerce_loop_add_to_cart_link filter in
   inc/woocommerce.php. */
body[class] ul.products li.product a.eqx-product-card__cta,
body[class] ul.products li.product a.add_to_cart_button.eqx-product-card__cta,
body[class] ul.products li.product a.button.eqx-product-card__cta {
	position: absolute;
	right: var(--spacing-md);
	bottom: var(--spacing-md);
	width: 38px;
	height: 38px;
	background: var(--eqx-brand-dark);
	color: var(--eqx-warm-white);
	border: 0;
	border-radius: var(--radius-pill);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	font-size: 0;
	line-height: 1;
	text-decoration: none;
	transition: background var(--transition-base), transform var(--transition-base);
	z-index: 2;
}
body[class] ul.products li.product a.eqx-product-card__cta:hover,
body[class] ul.products li.product a.eqx-product-card__cta:focus {
	background: var(--eqx-brand-accent);
	color: var(--eqx-warm-white);
	transform: translateY(-1px);
}
body[class] ul.products li.product .eqx-product-card__cta-icon {
	width: 18px;
	height: 18px;
}
/* "Added" / loading states — keep the same circular footprint. */
body[class] ul.products li.product a.eqx-product-card__cta.added,
body[class] ul.products li.product a.eqx-product-card__cta.loading {
	font-size: 0;
}
body[class] ul.products li.product a.eqx-product-card__cta.added::after,
body[class] ul.products li.product a.eqx-product-card__cta.loading::after {
	margin: 0;
	font-size: 16px;
}
body[class] ul.products li.product .added_to_cart {
	position: absolute;
	right: calc(var(--spacing-md) + 46px);
	bottom: calc(var(--spacing-md) + 4px);
	font-size: 0.8125rem;
	color: var(--eqx-brand-accent);
	text-decoration: none;
	font-weight: 600;
	z-index: 2;
}

/* ── Shop archive: header ──────────────────────────────────────────── */

.eqx-shop__header {
	margin-bottom: var(--spacing-lg);
}
.eqx-shop__title {
	font-family: var(--ff-display);
	font-size: var(--font-h1);
	font-weight: 700;
	color: var(--eqx-brand-dark);
	margin: 0 0 var(--spacing-xs);
	line-height: 1.15;
}
.eqx-shop__subtitle {
	color: var(--eqx-text-muted);
	font-size: var(--font-body);
	margin: 0;
}

/* ── Shop: category cards across the top (main shop page only) ─────── */
.eqx-shop-cats { margin-bottom: var(--spacing-2xl); }
.eqx-shop-cats__header { text-align: center; margin-bottom: var(--spacing-lg); }
.eqx-shop-cats__header h2 { margin: 0; }
.eqx-shop-cats__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--spacing-md);
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) { .eqx-shop-cats__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .eqx-shop-cats__grid { grid-template-columns: repeat(2, 1fr); } }

/* Square image-overlay tile — mirrors the home range-cards look. */
.eqx-shop-cats__card {
	position: relative;
	display: flex;
	align-items: flex-end;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background-color: var(--eqx-brand-dark);
	background-size: cover;
	background-position: center;
	text-decoration: none;
	isolation: isolate;
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.eqx-shop-cats__card::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(
		180deg,
		rgba(var(--eqx-brand-dark-rgb), 0)    35%,
		rgba(var(--eqx-brand-dark-rgb), 0.55) 70%,
		rgba(var(--eqx-brand-dark-rgb), 0.88) 100%
	);
}
.eqx-shop-cats__card:hover { transform: translateY(-3px); box-shadow: var(--shadow-overlay); }
.eqx-shop-cats__card:focus-visible { outline: 3px solid var(--eqx-brand-teal); outline-offset: 2px; }
.eqx-shop-cats__label {
	position: relative;
	z-index: 1;
	padding: var(--spacing-md);
	color: var(--eqx-warm-white);
	font-family: var(--ff-display);
	font-weight: 700;
	font-size: 1.125rem;
	line-height: 1.2;
}

/* ── Shop archive: two-column layout ──────────────────────────────── */

.eqx-shop__layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: var(--spacing-lg);
	align-items: start;
}
/* Main column gets min-width:0 so its inner grid can size its tracks
   from available space, not from card min-content. Without this, very
   long product titles can force the cards to overflow / shrink. */
.eqx-shop__main { min-width: 0; }

@media (max-width: 900px) {
	.eqx-shop__layout { grid-template-columns: 1fr; }
}

/* ── Shop archive: filter sidebar ─────────────────────────────────── */

.eqx-shop__sidebar {
	position: sticky;
	top: calc(var(--header-h) + var(--spacing-md));
}
.eqx-shop__sidebar-head {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--eqx-border);
	padding: 0 0 var(--spacing-sm);
	margin-bottom: var(--spacing-md);
	font-family: var(--ff-display);
	font-size: 1rem;
	font-weight: 700;
	color: var(--eqx-brand-dark);
	text-align: left;
	cursor: default; /* turns into a tap target only on mobile (below) */
}
.eqx-shop__sidebar-head .eqx-icon {
	width: 18px;
	height: 18px;
	color: var(--eqx-brand-accent);
	flex-shrink: 0;
}
/* Collapse chevron — hidden on desktop where filters are always shown. */
.eqx-shop__filter-chevron { display: none; }
.eqx-shop__sidebar-empty {
	font-size: var(--font-small);
	color: var(--eqx-text-muted);
	margin: 0;
}

/* Widget area — override WC defaults to match sidebar style */
.eqx-shop__sidebar-body .widget { margin-bottom: var(--spacing-md); }
.eqx-shop__sidebar-body .widget:last-child { margin-bottom: 0; }
.eqx-shop__sidebar-body .widget-title,
.eqx-shop__sidebar-body .widgettitle {
	font-family: var(--ff-display);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--eqx-brand-dark);
	text-transform: uppercase;
	letter-spacing: 0.09em;
	margin: 0 0 var(--spacing-sm);
}
.eqx-shop__sidebar-body ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.eqx-shop__sidebar-body ul li {
	font-size: 0.9375rem;
	padding: 3px 0;
}
.eqx-shop__sidebar-body ul li a {
	color: var(--eqx-text-muted);
	text-decoration: none;
	transition: color var(--transition-base);
}
.eqx-shop__sidebar-body ul li a:hover,
.eqx-shop__sidebar-body ul li.current-cat > a,
.eqx-shop__sidebar-body ul li.chosen > a {
	color: var(--eqx-brand-dark);
}
.eqx-shop__sidebar-body ul li .count {
	color: var(--eqx-text-muted);
	font-size: 0.8125rem;
	margin-left: 4px;
	opacity: 0.7;
}

/* Price slider widget */
.eqx-shop__sidebar-body .price_slider_wrapper { margin-top: var(--spacing-xs); }
.eqx-shop__sidebar-body .price_slider_amount {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: var(--spacing-sm);
	font-size: 0.875rem;
	color: var(--eqx-text-muted);
}
.eqx-shop__sidebar-body .price_slider_amount .button {
	background: var(--eqx-brand-dark);
	color: var(--eqx-warm-white);
	border: 0;
	border-radius: var(--radius-button);
	padding: 6px 14px;
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
	font-family: var(--ff-body);
	transition: background var(--transition-base);
}
.eqx-shop__sidebar-body .price_slider_amount .button:hover {
	background: var(--eqx-brand-accent);
}

/* On mobile, the filters collapse behind the "Filters" button so product
   images sit near the top of the page; tapping the head expands them. */
@media (max-width: 900px) {
	.eqx-shop__sidebar { position: static; }
	.eqx-shop__sidebar-head { cursor: pointer; }
	.eqx-shop__filter-chevron {
		display: inline-block;
		margin-left: auto;
		width: 8px;
		height: 8px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		transition: transform var(--transition-base);
	}
	.eqx-shop__sidebar.is-open .eqx-shop__filter-chevron { transform: rotate(-135deg); }
	.eqx-shop__sidebar-body { display: none; }
	.eqx-shop__sidebar.is-open .eqx-shop__sidebar-body { display: block; }
}

/* ── No products found ─────────────────────────────────────────────── */

.eqx-no-products {
	padding: var(--spacing-xl) var(--spacing-md);
	text-align: center;
}
.eqx-no-products__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--eqx-brand-light);
	color: var(--eqx-brand-dark);
	margin-bottom: var(--spacing-md);
}
.eqx-no-products__heading {
	font-family: var(--ff-display);
	font-size: var(--font-h3);
	font-weight: 700;
	color: var(--eqx-brand-dark);
	margin: 0 0 var(--spacing-sm);
}
.eqx-no-products__body {
	color: var(--eqx-text-muted);
	font-size: 1rem;
	max-width: 36ch;
	margin: 0 auto var(--spacing-md);
	line-height: 1.6;
}

/* ── Single product page ───────────────────────────────────────────── */

/* Two-column layout: gallery left, summary right. Overrides WC's
   default float-based layout from woocommerce-layout.css. */
body[class].single-product .product.type-product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: var(--spacing-xl);
	row-gap: var(--spacing-xl);
	margin-bottom: var(--spacing-xl);
}
body[class].single-product .product.type-product::before,
body[class].single-product .product.type-product::after { display: none; }
body[class].single-product .product .images,
body[class].single-product .product .summary {
	float: none;
	width: auto;
	margin: 0;
}
/* Tabs, related products, upsells are siblings of the gallery + summary
   inside .product. Make them span the full row so they sit underneath
   the gallery+summary at full container width. */
body[class].single-product .product.type-product > .woocommerce-tabs,
body[class].single-product .product.type-product > .related,
body[class].single-product .product.type-product > .upsells {
	grid-column: 1 / -1;
}
@media (max-width: 768px) {
	body[class].single-product .product.type-product {
		grid-template-columns: 1fr;
		row-gap: var(--spacing-lg);
	}
}

/* Gallery — no background tint or padding; the product photo sits
   directly on the page so transparent product packaging PNGs blend in
   with the surrounding white. */
body[class].single-product .woocommerce-product-gallery {
	background: transparent;
	padding: 0;
}
body[class].single-product .woocommerce-product-gallery img {
	border-radius: 0;
}

/* Summary content stack */
body[class].single-product .summary > * { margin-top: 0; }

/* Category eyebrow */
body[class].single-product .eqx-product-eyebrow {
	display: block;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--eqx-brand-accent);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 0 0 var(--spacing-xs);
	text-decoration: none;
}
body[class].single-product .eqx-product-eyebrow:hover { color: var(--eqx-brand-dark); }

/* Title */
body[class].single-product .product_title {
	font-family: var(--ff-display);
	font-size: clamp(1.75rem, 3.2vw, 2.5rem);
	font-weight: 700;
	color: var(--eqx-brand-dark);
	margin: 0 0 var(--spacing-sm);
	line-height: 1.15;
}

/* Price */
body[class].single-product .product p.price,
body[class].single-product .product .price {
	font-family: var(--ff-display);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--eqx-brand-dark);
	margin: 0 0 var(--spacing-md);
}
body[class].single-product .eqx-price-prefix {
	font-family: var(--ff-display);
	font-weight: 700;
	color: var(--eqx-brand-dark);
}
body[class].single-product .product .price del {
	color: var(--eqx-text-muted);
	margin-right: 0.4em;
	font-weight: 500;
	opacity: 1;
}
body[class].single-product .product .price ins {
	background: transparent;
	color: var(--eqx-brand-dark);
	text-decoration: none;
}

/* Short description */
body[class].single-product .woocommerce-product-details__short-description {
	color: var(--eqx-text-muted);
	line-height: 1.65;
	margin: 0 0 var(--spacing-md);
}
body[class].single-product .woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }

/* Trust badges row */
.eqx-product-trust {
	list-style: none;
	margin: 0 0 var(--spacing-md);
	padding: 0;
}
.eqx-product-trust li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 0;
	color: var(--eqx-brand-dark);
	font-weight: 600;
	font-size: 0.9375rem;
}
.eqx-product-trust li .eqx-icon {
	color: var(--eqx-brand-accent);
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

/* Variations table → flex rows */
body[class].single-product .variations_form .variations {
	display: block;
	width: 100%;
	margin: 0 0 var(--spacing-md);
	border: 0;
}
body[class].single-product .variations_form .variations tbody { display: block; }
body[class].single-product .variations_form .variations tr {
	display: grid;
	grid-template-columns: 140px 1fr;
	align-items: center;
	gap: var(--spacing-sm);
	margin-bottom: 10px;
}
body[class].single-product .variations_form .variations th.label,
body[class].single-product .variations_form .variations td.value {
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
}
/* The select is followed by an inline "Clear" link inside td.value.
   That link adds height to the cell which knocks the label off-centre
   with the dropdown. Position it absolutely so the cell height equals
   the select height and the label centres perfectly. */
body[class].single-product .variations_form .variations td.value {
	position: relative;
}
body[class].single-product .variations_form .variations td.value .reset_variations {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	margin: 0;
}
body[class].single-product .variations_form .variations th.label label {
	font-family: var(--ff-display);
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--eqx-brand-dark);
	text-transform: capitalize;
	margin: 0;
}
body[class].single-product .variations_form select {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--eqx-border);
	border-radius: var(--radius-button);
	background: var(--eqx-warm-white);
	color: var(--eqx-brand-dark);
	font-family: var(--ff-body);
	font-size: 0.9375rem;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23100C55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 14px;
	padding-right: 38px;
}
body[class].single-product .variations_form select:focus {
	outline: none;
	border-color: var(--eqx-brand-accent);
}
body[class].single-product .variations_form .reset_variations {
	display: inline-block;
	margin-top: 6px;
	font-size: 0.8125rem;
	color: var(--eqx-text-muted);
	text-decoration: underline;
}

/* Quantity + add-to-cart row */
body[class].single-product .single_variation_wrap { margin-top: var(--spacing-md); }
body[class].single-product form.cart {
	margin: 0;
}
body[class].single-product .woocommerce-variation-add-to-cart,
body[class].single-product form.cart:not(.variations_form) {
	display: flex;
	gap: 12px;
	align-items: stretch;
	margin: 0;
}
body[class].single-product .quantity {
	display: flex;
	flex-shrink: 0;
	margin: 0;
}
body[class].single-product .quantity input.qty {
	width: 70px;
	height: 52px;
	padding: 0 12px;
	border: 1px solid var(--eqx-border);
	border-radius: var(--radius-button);
	background: var(--eqx-warm-white);
	color: var(--eqx-brand-dark);
	text-align: center;
	font-family: var(--ff-body);
	font-size: 1rem;
	font-weight: 600;
}
body.single-product div.product button.single_add_to_cart_button,
body.single-product div.product button.single_add_to_cart_button.alt {
	flex: 1;
	min-width: 0;
	background: var(--eqx-brand-dark);
	color: var(--eqx-warm-white);
	border: 0;
	border-radius: var(--radius-button);
	padding: 0 32px;
	height: 52px;
	font-family: var(--ff-display);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background var(--transition-base), transform var(--transition-base);
}
body.single-product div.product button.single_add_to_cart_button:hover,
body.single-product div.product button.single_add_to_cart_button.alt:hover,
body.single-product div.product button.single_add_to_cart_button:focus {
	background: var(--eqx-brand-accent);
	color: var(--eqx-warm-white);
}

/* ── Related products / upsells / cross-sells section heading ──────── */
/* Matches the .eqx-product-grid__title-block h2 on the homepage so all
   "row of cards" sections share the same heading scale. */
body[class] .related.products > h2,
body[class] .upsells.products > h2,
body[class] .cross-sells > h2 {
	font-family: var(--ff-display);
	font-size: var(--font-h2);
	font-weight: 700;
	color: var(--eqx-brand-dark);
	margin: 0 0 var(--spacing-lg);
	line-height: 1.15;
}

body[class].single-product .related.products,
body[class].single-product .upsells.products {
	margin-top: var(--spacing-xl);
}

/* ── Single product tabs ───────────────────────────────────────────── */
/* WC's defaults use `.woocommerce div.product .woocommerce-tabs ul.tabs li`
   selectors at specificity (0,4,3). Each rule below adds `body.woocommerce`
   to lift my matching rules to (0,4,4) so they always win. */

body.woocommerce div.product .woocommerce-tabs.wc-tabs-wrapper {
	margin-top: var(--spacing-xl);
	clear: both;
}
body.woocommerce div.product .woocommerce-tabs ul.tabs {
	list-style: none;
	margin: 0 0 var(--spacing-lg);
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-lg);
	border-bottom: 1px solid var(--eqx-border);
	overflow: visible;
}
body.woocommerce div.product .woocommerce-tabs ul.tabs::before,
body.woocommerce div.product .woocommerce-tabs ul.tabs::after { display: none; }
body.woocommerce div.product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	display: block;
}
body.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
body.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
body.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 12px 0;
	font-family: var(--ff-display);
	font-size: 1rem;
	font-weight: 700;
	color: var(--eqx-text-muted);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color var(--transition-base), border-color var(--transition-base);
}
body.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
	color: var(--eqx-brand-dark);
}
body.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
body.woocommerce div.product .woocommerce-tabs ul.tabs li.active a:hover {
	color: var(--eqx-brand-dark);
	border-bottom-color: var(--eqx-brand-accent);
}
body.woocommerce div.product .woocommerce-tabs .panel,
body.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel {
	padding: 0;
	margin: 0;
	color: var(--eqx-text-default);
	line-height: 1.7;
}
body.woocommerce div.product .woocommerce-tabs .panel h2,
body.woocommerce div.product .woocommerce-tabs .panel h3,
body.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel h2,
body.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel h3 {
	font-family: var(--ff-display);
	color: var(--eqx-brand-dark);
	margin-top: 0;
}
body.woocommerce div.product .woocommerce-tabs .panel h2,
body.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel h2 {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: var(--spacing-sm);
}
body.woocommerce div.product .woocommerce-tabs .panel p:last-child,
body.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel p:last-child { margin-bottom: 0; }

/* Reviews pagination — the reviews tab is broken into pages of
   EQX_REVIEWS_PER_PAGE (see inc/woocommerce.php); WC renders
   paginate_comments_links() as a `type: list` <ul> above and below the
   list. WC's own CSS gives it a bordered box; replace that with pills. */
body.woocommerce div.product #reviews nav.woocommerce-pagination {
	margin: var(--spacing-md) 0 0;
	text-align: center;
}
/* Paginated links land on #comments; keep that anchor clear of the sticky
   header so the first review isn't hidden behind it. */
body.woocommerce div.product #reviews,
body.woocommerce div.product #comments {
	scroll-margin-top: calc(var(--header-h) + var(--spacing-md));
}
body.woocommerce div.product #reviews nav.woocommerce-pagination ul {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
	border: 0;
	white-space: normal;
}
body.woocommerce div.product #reviews nav.woocommerce-pagination ul li {
	border: 0;
	margin: 0;
	padding: 0;
	overflow: visible;
	float: none;
}
body.woocommerce div.product #reviews nav.woocommerce-pagination ul li a.page-numbers,
body.woocommerce div.product #reviews nav.woocommerce-pagination ul li span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--eqx-border);
	border-radius: var(--radius-button);
	background: var(--eqx-warm-white);
	color: var(--eqx-brand-dark);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}
body.woocommerce div.product #reviews nav.woocommerce-pagination ul li a.page-numbers:hover,
body.woocommerce div.product #reviews nav.woocommerce-pagination ul li a.page-numbers:focus-visible {
	background: var(--eqx-brand-light);
	border-color: var(--eqx-brand-accent);
	color: var(--eqx-brand-dark);
}
body.woocommerce div.product #reviews nav.woocommerce-pagination ul li span.page-numbers.current {
	background: var(--eqx-brand-dark);
	border-color: var(--eqx-brand-dark);
	color: var(--eqx-warm-white);
}
body.woocommerce div.product #reviews nav.woocommerce-pagination ul li span.page-numbers.dots {
	border-color: transparent;
	background: transparent;
	color: var(--eqx-text-muted);
}

/* Ingredients block — appended inside the Description tab beneath the main
   product description. Hairline divider + breathing room to separate it
   from the prose above. Three sub-sections (Composition / Additives /
   Analytical Constituents) render under h4 sub-headings. */
.eqx-product-ingredients {
	margin-top: var(--spacing-lg);
	padding-top: var(--spacing-md);
	border-top: 1px solid rgba(var(--eqx-brand-dark-rgb), 0.12);
}
.eqx-product-ingredients h3 {
	font-family: var(--ff-display);
	color: var(--eqx-brand-dark);
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0 0 var(--spacing-sm);
}
.eqx-product-ingredients h4 {
	font-family: var(--ff-display);
	color: var(--eqx-brand-dark);
	font-size: 1rem;
	font-weight: 600;
	margin: var(--spacing-md) 0 var(--spacing-xs);
}
.eqx-product-ingredients h4:first-of-type { margin-top: 0; }
.eqx-product-ingredients p:last-child { margin-bottom: 0; }

/* Analytical Constituents table — 2-col table inside the Ingredients
   block. Constituent name on the left, declared value on the right; rows
   separated by a hairline rule. The PHP renderer omits rows whose value
   is blank, so Moisture only appears where it's been filled in. */
.eqx-constituents {
	width: 100%;
	max-width: 32rem;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.95rem;
	line-height: 1.5;
}
.eqx-constituents th,
.eqx-constituents td {
	padding: var(--spacing-xs) var(--spacing-sm);
	text-align: left;
	border-bottom: 1px solid rgba(var(--eqx-brand-dark-rgb), 0.08);
	vertical-align: top;
}
.eqx-constituents th {
	font-weight: 600;
	color: var(--eqx-brand-dark);
	width: 60%;
}
.eqx-constituents td {
	color: var(--eqx-text-default);
	font-variant-numeric: tabular-nums;
}
.eqx-constituents tr:last-child th,
.eqx-constituents tr:last-child td { border-bottom: 0; }

/* Feeding Guidelines tab — structured layout matching the client's spec:
   one serving-size line, one or more weight-banded rate tables (each with
   an optional group title), an optional highlighted callout, then notes /
   cautions paragraphs. */
.eqx-feeding {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-md);
}
.eqx-feeding__serving {
	margin: 0;
	font-weight: 500;
	color: var(--eqx-text-default);
}
.eqx-feeding__group { margin: 0; }
.eqx-feeding__group-title {
	font-family: var(--ff-display);
	color: var(--eqx-brand-dark);
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 var(--spacing-sm);
}
.eqx-feeding__rates {
	width: 100%;
	max-width: 32rem;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.95rem;
	line-height: 1.5;
}
.eqx-feeding__rates th,
.eqx-feeding__rates td {
	padding: var(--spacing-xs) var(--spacing-sm);
	text-align: left;
	border-bottom: 1px solid rgba(var(--eqx-brand-dark-rgb), 0.08);
	vertical-align: top;
}
.eqx-feeding__rates th {
	font-weight: 500;
	color: var(--eqx-text-default);
	width: 45%;
	white-space: nowrap;
}
.eqx-feeding__rates td {
	color: var(--eqx-text-default);
	font-variant-numeric: tabular-nums;
}
.eqx-feeding__rates tr:last-child th,
.eqx-feeding__rates tr:last-child td { border-bottom: 0; }
.eqx-feeding__highlight {
	margin: 0;
	font-weight: 700;
	color: var(--eqx-brand-dark);
}
.eqx-feeding__notes { color: var(--eqx-text-default); }
.eqx-feeding__notes p:last-child { margin-bottom: 0; }

/* FAQ accordion — repeater-backed, rendered as native <details>/<summary>
   so it works without JS and stays fully keyboard accessible. */
.eqx-faq {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-xs);
}
.eqx-faq__item {
	border: 1px solid rgba(var(--eqx-brand-dark-rgb), 0.12);
	border-radius: var(--radius-card);
	background: var(--eqx-warm-white);
	overflow: hidden;
}
.eqx-faq__item + .eqx-faq__item { margin-top: 0; }
.eqx-faq__q {
	list-style: none;
	cursor: pointer;
	padding: var(--spacing-sm) var(--spacing-md);
	font-family: var(--ff-display);
	font-weight: 600;
	color: var(--eqx-brand-dark);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--spacing-sm);
	transition: background var(--transition-base);
}
.eqx-faq__q::-webkit-details-marker { display: none; }
.eqx-faq__q::after {
	content: "";
	flex: 0 0 0.6rem;
	width: 0.6rem;
	height: 0.6rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transform-origin: 60% 60%;
	transition: transform var(--transition-base);
}
.eqx-faq__item[open] .eqx-faq__q::after { transform: rotate(-135deg); }
.eqx-faq__item[open] .eqx-faq__q { background: var(--eqx-brand-light); }
.eqx-faq__q:hover { background: var(--eqx-brand-light); }
.eqx-faq__q:focus-visible {
	outline: 2px solid var(--eqx-brand-accent);
	outline-offset: -2px;
}
.eqx-faq__a {
	padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
	color: var(--eqx-text-default);
	line-height: 1.7;
}
.eqx-faq__a p:last-child { margin-bottom: 0; }

/* Reset WC purple buttons on cart/checkout/etc. The single-product
   add-to-basket button is styled separately above (navy). */

.woocommerce a.button,
.woocommerce-page a.button,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background: var(--eqx-brand-accent);
	color: var(--eqx-warm-white);
	border-radius: var(--radius-button);
	font-family: var(--ff-body);
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: background var(--transition-base), color var(--transition-base);
}
.woocommerce a.button:hover,
.woocommerce button.button.alt:hover {
	background: var(--eqx-brand-accent-dk);
	color: var(--eqx-warm-white);
}

/* Cart and Checkout are the *block* templates, whose buttons carry
   .wc-block-components-button — a class the classic-button rules above never
   match. Left alone they render in WooCommerce's default charcoal (#32373c)
   with square corners, so the two most important buttons in the funnel were
   the only off-brand ones on the site. Doubled class to out-specify
   .wc-block-components-button.wp-element-button. */
.wc-block-cart__submit-button.wc-block-components-button,
.wc-block-components-checkout-place-order-button.wc-block-components-button {
	background-color: var(--eqx-brand-accent);
	color: var(--eqx-warm-white);
	border-radius: var(--radius-button);
	border: 2px solid var(--eqx-brand-accent);
	font-family: var(--ff-body);
	font-weight: 600;
	font-size: var(--font-body);
	letter-spacing: 0.02em;
	min-height: 52px;
	transition: background-color var(--transition-base), border-color var(--transition-base);
}
.wc-block-cart__submit-button.wc-block-components-button:hover,
.wc-block-cart__submit-button.wc-block-components-button:focus,
.wc-block-components-checkout-place-order-button.wc-block-components-button:hover,
.wc-block-components-checkout-place-order-button.wc-block-components-button:focus {
	background-color: var(--eqx-brand-accent-dk);
	border-color: var(--eqx-brand-accent-dk);
	color: var(--eqx-warm-white);
}

/* ── WooCommerce notices: the "added to your cart" bar ─────────────── */
/* Core WooCommerce styles the notice's View-cart link via `.woocommerce
   a.button`, but that padding does not survive here, so the link renders as
   bare underlined text sitting on the brand background — it reads as a
   mis-rendered link rather than a button. Set the box explicitly rather than
   relying on core, and lay the bar out as a row so the button sits against the
   right edge instead of wrapping oddly on narrow screens. */
body[class] .woocommerce-message,
body[class] .woocommerce-info,
body[class] .woocommerce-error {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	flex-wrap: wrap;
}
body[class] .woocommerce-message a.button,
body[class] .woocommerce-info a.button,
body[class] .woocommerce-error a.button {
	margin-left: auto;
	flex-shrink: 0;
	padding: 10px 20px;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

/* ── PayPal express buttons on the single product page ─────────────── */
/* PPCP injects `.ppcp-messages` and `.ppc-button-wrapper` as siblings straight
   after `form.cart`, with no margin of their own. They land flush against the
   add-to-cart button, so the pay-later message reads as part of it. Space them
   from the form and from each other. */
body[class].single-product .ppcp-messages:not(:empty) {
	margin-top: var(--spacing-md);
}
body[class].single-product .ppc-button-wrapper {
	margin-top: var(--spacing-sm);
}
body[class].single-product .ppcp-messages:empty + .ppc-button-wrapper {
	margin-top: var(--spacing-md);
}
