/*
Theme Name: Willow
Description: Editorial jewelry storefront for Willow. Layout, spacing and type scale reproduced from the documented reference audit in REFERENCE-MAP.md.
Author: Willow
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: willow
*/

/* ==========================================================================
   1. TOKENS
   Every value here traces to a measurement in REFERENCE-MAP.md. Change a
   token, not a component; the brand identity lands here later.
   ========================================================================== */

:root {
	/* Colour */
	--color-background: #ffffff;
	--color-text: #000000;
	--color-muted: #6b6b6b;
	--color-border: rgba(0, 0, 0, 0.15);
	--color-rule: rgba(0, 0, 0, 0.08);
	--color-accent: #fa9303;
	--color-highlight: #ffce65;
	--color-sale: #fa9303;
	--color-footer: #ffffff;
	--color-inverse: #ffffff;

	/* Type */
	--font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-display: var(--font-body);

	--fs-body: 14px;
	--fs-small: 11.9px;
	--fs-section: 18.92px;
	--fs-statement: 28px;
	--fs-product-title: 12px;
	--fs-nav: 14px;
	--fs-button: 13px;
	--fs-eyebrow: 11.55px;
	--fs-feature-head: 16.94px;
	--fs-feature-body: 15.4px;

	--lh-body: 1.6;
	--lh-tight: 1.3;

	/* The wide tracking is the most recognisable part of this design. */
	--ls-body: 0.025em;
	--ls-wide: 0.05em;
	--ls-wider: 0.2em;
	--ls-widest: 0.3em;

	/* Spacing */
	--page-padding: 40px;
	--section-spacing: 65px;
	--grid-gap: 22px;
	--header-height: 70px;
	--announcement-height: 36px;

	/* Motion — subtle, and only where the reference actually animates. */
	--ease: cubic-bezier(0.4, 0, 0.2, 1);
	--speed: 0.25s;
	--speed-drawer: 0.35s;
}

@media (max-width: 768px) {
	:root {
		--page-padding: 17px;
		--section-spacing: 45px;
		--grid-gap: 17px;
	}
}

/* ==========================================================================
   2. BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--color-background);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	letter-spacing: var(--ls-body);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--color-text); outline-offset: 2px; }

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.page-width {
	padding-left: var(--page-padding);
	padding-right: var(--page-padding);
}

.section-spacing { margin-top: var(--section-spacing); margin-bottom: var(--section-spacing); }

/* Scroll reveal. Neutralised when the user prefers reduced motion, and when
   JS is unavailable, so content is never hidden permanently. */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible, .no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
	.reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   3. TYPOGRAPHY PRIMITIVES
   ========================================================================== */

.section-heading {
	font-size: var(--fs-section);
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	text-align: center;
}

.eyebrow {
	font-size: var(--fs-eyebrow);
	line-height: 1.6;
	letter-spacing: var(--ls-widest);
	text-transform: uppercase;
	margin: 0 0 10px;
}

.text-link {
	display: inline-block;
	border-bottom: 1px solid var(--color-border);
	padding-bottom: 1px;
	transition: border-color var(--speed) var(--ease);
}
.text-link:hover { border-bottom-color: var(--color-text); }

.btn {
	display: inline-block;
	padding: 11px 20px;
	font-size: var(--fs-button);
	font-weight: 700;
	line-height: 1.42;
	letter-spacing: var(--ls-widest);
	text-transform: uppercase;
	text-align: center;
	border: 1px solid transparent;
	background: var(--color-accent);
	color: var(--color-inverse);
	transition: opacity var(--speed) var(--ease);
}
.btn:hover { opacity: 0.85; }

.btn--outline {
	background: transparent;
	color: var(--color-text);
	border-color: var(--color-text);
}
.btn--outline:hover { background: var(--color-text); color: var(--color-inverse); opacity: 1; }

.btn--solid-dark { background: var(--color-text); color: var(--color-inverse); }

/* ==========================================================================
   4. ANNOUNCEMENT BAR
   ========================================================================== */

.announcement {
	background: var(--color-text);
	color: var(--color-inverse);
	font-size: var(--fs-small);
	/* 1.36 not 1.6: the reference bar measures 36.2px total (10px padding
	   either side + 16.2px of content). A 1.6 line-height overshoots by ~3px
	   and pushes every section below it out of register. */
	line-height: 1.36;
	padding: 10px 0;
}
.announcement__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
}
.announcement__contact { justify-self: start; text-transform: uppercase; }
.announcement__promo { grid-column: 2; text-transform: uppercase; }

@media (max-width: 768px) {
	/* The reference drops the contact message on mobile and centres the promo. */
	.announcement { font-size: 10.5px; }
	.announcement__inner { grid-template-columns: 1fr; text-align: center; }
	.announcement__contact { display: none; }
	.announcement__promo { grid-column: 1; }
}

/* ==========================================================================
   5. HEADER
   ========================================================================== */

.site-header { background: var(--color-background); padding: 2px 0; }
.site-header__inner {
	display: flex;
	align-items: center;
	min-height: var(--header-height);
	gap: 10px;
}

/* Brand lockup: emblem left, wordmark right.
   Sized by height rather than width — the wordmark is a very wide 12.7:1 crop,
   so driving it off height is the only way to keep it optically balanced
   against the circular emblem across breakpoints. */
.site-header__logo { flex: 0 0 auto; }
.site-header__logo-link { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
/* max-width:none defeats the global `img { max-width:100% }`, which otherwise
   squashes the 12.7:1 wordmark horizontally and breaks its aspect ratio once
   the header row runs short of space. */
.site-header__logo-icon,
.site-header__logo-word { width: auto; max-width: none; flex-shrink: 0; }
.site-header__logo-icon { height: 40px; }
.site-header__logo-word { height: 19px; }

@media (max-width: 1200px) {
	.site-header__logo-link { gap: 11px; }
	.site-header__logo-icon { height: 34px; }
	.site-header__logo-word { height: 16px; }
}

@media (max-width: 768px) {
	.site-header__logo-link { gap: 9px; }
	.site-header__logo-icon { height: 30px; }
	.site-header__logo-word { height: 14px; }
}

/* 375px (iPhone SE / mini) is ~2px short for the 768 tier, so step the lockup
   down once more rather than let the icons push into the page padding. */
@media (max-width: 400px) {
	.site-header__logo-link { gap: 8px; }
	.site-header__logo-icon { height: 28px; }
	.site-header__logo-word { height: 13px; }
}

/* Below ~365px even that collides; the emblem alone still reads as the brand. */
@media (max-width: 365px) {
	.site-header__logo-word { display: none; }
}

.site-header__nav { flex: 1 1 auto; }
/* margin-left:auto, not a flex-grow spacer on the nav: below 1024 the nav is
   display:none and stops holding the icons over to the right edge. */
.site-header__icons { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-header__icons a, .site-header__icons button { padding: 10px; display: flex; align-items: center; }
.site-header__icons svg { width: 20px; height: 20px; }

.cart-toggle { position: relative; }
.cart-toggle__count {
	position: absolute; top: 4px; right: 2px;
	min-width: 16px; height: 16px; padding: 0 4px;
	border-radius: 8px;
	background: var(--color-accent); color: var(--color-inverse);
	font-size: 9px; font-weight: 700; letter-spacing: 0;
	display: flex; align-items: center; justify-content: center;
}
.cart-toggle__count[data-count="0"] { display: none; }

/* --- Desktop navigation --- */

.main-nav > ul { display: flex; margin: 0; padding: 0 0 0 10px; list-style: none; }
.main-nav li { position: relative; }
.main-nav > ul > li > a {
	display: inline-block;
	padding: 7.5px 25px;
	font-size: var(--fs-nav);
	letter-spacing: var(--ls-wider);
	text-transform: uppercase;
	position: relative;
}
/* Underline grows from the centre on hover. */
.main-nav > ul > li > a::after {
	content: ""; position: absolute; left: 25px; right: 25px; bottom: 2px;
	height: 1px; background: currentColor;
	transform: scaleX(0); transition: transform var(--speed) var(--ease);
}
.main-nav > ul > li:hover > a::after,
.main-nav > ul > li.current-menu-item > a::after { transform: scaleX(1); }

/* An item can be flagged accent in the menu editor by adding the `is-accent`
   CSS class — the reference colours its SALE item this way. */
.main-nav .is-accent > a { color: var(--color-accent); }

.main-nav .sub-menu {
	position: absolute; top: 100%; left: 12px; z-index: 20;
	min-width: 220px; margin: 0; padding: 14px 0; list-style: none;
	background: var(--color-background);
	border: 1px solid var(--color-rule);
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease), visibility var(--speed);
}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a {
	display: block; padding: 7px 24px;
	font-size: var(--fs-small); letter-spacing: var(--ls-body); text-transform: none;
	transition: opacity var(--speed) var(--ease);
}
.main-nav .sub-menu a:hover { opacity: 0.6; }

/* Scoped to beat `.site-header__icons button`, which sets display:flex and
   would otherwise win on specificity and leave the burger visible at desktop. */
.site-header__icons .header-mobile-toggle { display: none; }

@media (max-width: 1023px) {
	.main-nav, .site-header__icons .account-link { display: none; }
	.site-header__icons .header-mobile-toggle { display: flex; }
	.site-header__inner { min-height: 60px; }
	/* No width here: the lockup is sized by the height of its two images, and
	   a fixed width would clamp the box while the images overflow it. */
	.site-header__nav { flex: 1 1 auto; }
}

/* These two overrides live here, after the base .main-nav and
   .site-header__icons rules, because they are equal-specificity and only win
   by source order. Putting them up with the logo block silently does nothing. */

/* The wide lockup costs the nav room the reference's stacked logo did not
   need; trimming 9px a side keeps the icons inside the page padding at 1024
   without touching the reference's 25px spacing on wide screens. */
@media (max-width: 1200px) {
	.main-nav > ul > li > a { padding-left: 16px; padding-right: 16px; }
	.main-nav > ul > li > a::after { left: 16px; right: 16px; }
}

/* Buys back ~20px so the lockup clears the icons at 375–390px. */
@media (max-width: 768px) {
	.site-header__icons a, .site-header__icons button { padding: 8px; }
}

/* ==========================================================================
   6. OVERLAYS — mobile nav, search, cart drawer
   ========================================================================== */

.overlay-backdrop {
	position: fixed; inset: 0; z-index: 90;
	background: rgba(0, 0, 0, 0.4);
	opacity: 0; visibility: hidden;
	transition: opacity var(--speed-drawer) var(--ease), visibility var(--speed-drawer);
}
.overlay-backdrop.is-open { opacity: 1; visibility: visible; }
body.is-locked { overflow: hidden; }

.drawer {
	position: fixed; top: 0; bottom: 0; z-index: 100;
	width: min(400px, 88vw);
	background: var(--color-background);
	display: flex; flex-direction: column;
	transition: transform var(--speed-drawer) var(--ease);
	visibility: hidden;
}
.drawer.is-open { visibility: visible; }
.drawer--right { right: 0; transform: translateX(100%); }
.drawer--left  { left: 0;  transform: translateX(-100%); }
.drawer.is-open { transform: none; }

.drawer__header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 20px var(--page-padding);
	border-bottom: 1px solid var(--color-rule);
	flex: 0 0 auto;
}
.drawer__title {
	font-size: var(--fs-body); letter-spacing: var(--ls-wide); text-transform: uppercase;
}
.drawer__close { padding: 6px; display: flex; }
.drawer__close svg { width: 18px; height: 18px; }
.drawer__body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.drawer__footer { flex: 0 0 auto; padding: 20px var(--page-padding); border-top: 1px solid var(--color-rule); }

/* --- Mobile navigation --- */

.mobile-nav ul { margin: 0; padding: 0; list-style: none; }
.mobile-nav__item { border-bottom: 1px solid var(--color-rule); }
.mobile-nav__row { display: flex; align-items: stretch; }
.mobile-nav__row > a, .mobile-nav__row > span {
	flex: 1 1 auto;
	padding: 16px var(--page-padding);
	font-size: var(--fs-body); letter-spacing: var(--ls-wide); text-transform: uppercase;
}
.mobile-nav__expand {
	flex: 0 0 auto; width: 54px;
	display: flex; align-items: center; justify-content: center;
	border-left: 1px solid var(--color-rule);
}
.mobile-nav__expand svg { width: 12px; height: 12px; transition: transform var(--speed) var(--ease); }
.mobile-nav__expand[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Height animated by JS so the transition has a value to move between. */
.mobile-nav__sub { overflow: hidden; height: 0; transition: height var(--speed) var(--ease); background: rgba(0,0,0,0.02); }
.mobile-nav__sub a { display: block; padding: 12px var(--page-padding) 12px calc(var(--page-padding) + 16px); font-size: var(--fs-small); }

.mobile-nav__utility { padding: 20px var(--page-padding); }
.mobile-nav__utility a { display: block; padding: 8px 0; font-size: var(--fs-small); letter-spacing: var(--ls-wide); text-transform: uppercase; }

/* --- Search overlay --- */

.search-overlay {
	position: fixed; inset: 0 0 auto; z-index: 100;
	background: var(--color-background);
	padding: 40px var(--page-padding);
	transform: translateY(-100%);
	transition: transform var(--speed-drawer) var(--ease), visibility var(--speed-drawer);
	visibility: hidden;
}
.search-overlay.is-open { transform: none; visibility: visible; }
.search-overlay__form { display: flex; align-items: center; gap: 16px; max-width: 720px; margin: 0 auto; }
.search-overlay__input {
	flex: 1 1 auto;
	border: 0; border-bottom: 1px solid var(--color-border);
	background: none; padding: 12px 0;
	font-family: inherit; font-size: 20px; letter-spacing: var(--ls-body);
}
.search-overlay__input:focus { outline: none; border-bottom-color: var(--color-text); }

/* --- Cart drawer --- */

.cart-drawer__list { margin: 0; padding: 0; list-style: none; }
.cart-drawer__item {
	display: grid; grid-template-columns: 80px 1fr; gap: 16px;
	padding: 20px var(--page-padding);
	border-bottom: 1px solid var(--color-rule);
}
.cart-drawer__item img { width: 80px; height: 80px; object-fit: cover; }
.cart-drawer__name { font-size: var(--fs-small); letter-spacing: var(--ls-wider); text-transform: uppercase; line-height: 1.5; }
.cart-drawer__variant { font-size: var(--fs-small); color: var(--color-muted); margin-top: 4px; }
.cart-drawer__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: var(--fs-small); }
.cart-drawer__remove { font-size: var(--fs-small); color: var(--color-muted); border-bottom: 1px solid var(--color-border); }
.cart-drawer__remove:hover { color: var(--color-text); }
.cart-drawer__qty { display: inline-flex; align-items: center; border: 1px solid var(--color-border); }
.cart-drawer__qty button { width: 28px; height: 28px; line-height: 1; }
.cart-drawer__qty input {
	width: 34px; height: 28px; text-align: center; border: 0; background: none;
	font-family: inherit; font-size: var(--fs-small); -moz-appearance: textfield;
}
.cart-drawer__qty input::-webkit-outer-spin-button,
.cart-drawer__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cart-drawer__subtotal {
	display: flex; justify-content: space-between; align-items: center;
	font-size: var(--fs-body); letter-spacing: var(--ls-wide); text-transform: uppercase;
	margin-bottom: 14px;
}
.cart-drawer__actions { display: grid; gap: 10px; }
.cart-drawer__actions .btn { display: block; width: 100%; }
.cart-drawer__continue { text-align: center; font-size: var(--fs-small); }
.cart-drawer__empty { padding: 60px var(--page-padding); text-align: center; color: var(--color-muted); }
.cart-drawer.is-loading .drawer__body { opacity: 0.5; pointer-events: none; }

/* ==========================================================================
   7. HOME — editorial hero grid
   ========================================================================== */

.editorial-hero { display: flex; flex-wrap: wrap; }
.editorial-hero__tile {
	position: relative;
	/* Column count comes from --hero-columns set on the section. Kept in CSS
	   rather than an inline width so the mobile rule below can override it. */
	flex: 1 1 calc(100% / var(--hero-columns, 2));
	max-width: calc(100% / var(--hero-columns, 2));
	height: 580px;
	display: flex; align-items: flex-end; justify-content: center;
	overflow: hidden;
}
.editorial-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.editorial-hero__label {
	position: relative; z-index: 1;
	margin-bottom: 40px;
	background: rgba(255, 255, 255, 0.001);
}

@media (max-width: 768px) {
	.editorial-hero__tile { flex: 1 1 100%; max-width: 100%; height: 348px; }
	.editorial-hero__tile + .editorial-hero__tile { margin-top: 10px; }
	.editorial-hero__label { margin-bottom: 30px; }
}

/* --- Editorial banner (single image + centred chip) --- */

.editorial-banner {
	position: relative; height: 650px;
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
}
.editorial-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.editorial-banner .btn { position: relative; z-index: 1; }

@media (max-width: 768px) { .editorial-banner { height: 420px; } }

/* ==========================================================================
   8. HOME — brand statement
   ========================================================================== */

.brand-statement { margin: var(--section-spacing) 0 40px; }
.brand-statement__band {
	max-width: 960px; margin: 0 auto;
	background: var(--color-highlight);
	/* 48px keeps the band at the reference's measured 219.5px section height. */
	padding: 48px 48px;
	text-align: center;
}
.brand-statement__heading {
	font-size: var(--fs-statement);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	margin: 0 0 15px;
}
.brand-statement__sub { margin: 0 0 20px; }

@media (max-width: 768px) {
	.brand-statement__band { padding: 40px 24px; }
	.brand-statement__heading { font-size: 15.5px; }
}

/* ==========================================================================
   9. PRODUCT GRID + CARD
   ========================================================================== */

.product-section { margin-bottom: var(--section-spacing); }
.product-section__heading { margin-bottom: 22px; }
.product-section__footer { text-align: center; margin-top: 10px; }

/* Negative left margin + per-card left padding reproduces the reference's
   gutter model exactly, including the flush outer edges. */
.product-grid {
	display: flex; flex-wrap: wrap;
	margin: 0 0 0 calc(var(--grid-gap) * -1);
	padding: 0; list-style: none;
}
.product-grid__item {
	flex: 0 0 25%; max-width: 25%;
	padding-left: var(--grid-gap);
	margin-bottom: 30px;
}
.product-grid--3 .product-grid__item { flex-basis: 33.3333%; max-width: 33.3333%; }

.product-card { position: relative; text-align: center; }
.product-card__media {
	position: relative; display: block;
	aspect-ratio: 1 / 1; overflow: hidden;
	background: #fafafa;
	margin-bottom: 12px;
}
.product-card__media img {
	position: absolute; inset: 0;
	width: 100%; height: 100%; object-fit: cover;
}
.product-card__img--secondary { opacity: 0; transition: opacity 0.4s var(--ease); }
.product-card__media:hover .product-card__img--secondary { opacity: 1; }

.product-card__badge {
	position: absolute; top: 0; right: 0; z-index: 2;
	background: var(--color-sale); color: var(--color-inverse);
	font-size: var(--fs-small); line-height: 1;
	padding: 7px 7px 7px 9px;
	margin: 0 5px 0 0;
}

.product-card__title {
	font-size: var(--fs-product-title);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: var(--ls-wider);
	text-transform: uppercase;
	margin: 0;
}
.product-card__rating { margin-top: 4px; }
.product-card__price { margin-top: 5px; font-size: var(--fs-small); line-height: 1.5; }
.product-card__price del { color: var(--color-muted); margin-left: 4px; }
.product-card__price ins { text-decoration: none; }

/* Star rating, shared by card and product page. */
.stars { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-small); }
.stars__glyphs { position: relative; display: inline-block; color: var(--color-accent); letter-spacing: 1px; }
.stars__glyphs::before { content: "★★★★★"; color: var(--color-rule); }
.stars__fill { position: absolute; inset: 0; overflow: hidden; white-space: nowrap; }
.stars__fill::before { content: "★★★★★"; }
.stars__count { color: var(--color-muted); }

@media (max-width: 1023px) {
	.product-grid__item { flex-basis: 33.3333%; max-width: 33.3333%; }
}

@media (max-width: 768px) {
	/* On the homepage the reference turns the featured row into a horizontal
	   scroller (~85vw cards, one plus a peek). Archive grids stay 2-up. */
	.product-grid--scroller {
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
	}
	.product-grid--scroller::-webkit-scrollbar { display: none; }
	.product-grid--scroller .product-grid__item {
		flex: 0 0 85%; max-width: 85%;
		scroll-snap-align: start;
	}
	.product-grid:not(.product-grid--scroller) .product-grid__item {
		flex-basis: 50%; max-width: 50%;
	}
	.product-card__title { font-size: 11px; }
}

/* ==========================================================================
   10. HOME — feature row (values / editorial story)
   ========================================================================== */

.feature-row { display: flex; align-items: stretch; margin: var(--section-spacing) 0; }
.feature-row--reverse { flex-direction: row-reverse; }
.feature-row__media { flex: 0 0 50%; max-width: 50%; }
.feature-row__media img { width: 100%; height: 100%; object-fit: cover; }
.feature-row__content {
	flex: 0 0 50%; max-width: 50%;
	display: flex; flex-direction: column; justify-content: center;
	padding: 40px 60px;
}
.feature-row__heading {
	font-size: var(--fs-feature-head);
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	margin: 0 0 15px;
}
.feature-row__block { margin-bottom: 25px; }
.feature-row__block:last-child { margin-bottom: 0; }
.feature-row__block h4,
.feature-row__block p {
	font-size: var(--fs-feature-body);
	font-weight: 400;
	line-height: 1.3;
	margin: 0 0 25px;
}
.feature-row__block h4 { margin-bottom: 25px; }
.feature-row__block p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
	.feature-row, .feature-row--reverse { flex-direction: column; }
	.feature-row__media, .feature-row__content { flex-basis: auto; max-width: 100%; }
	.feature-row__content { padding: 30px var(--page-padding); }
}

/* ==========================================================================
   11. TESTIMONIALS
   ========================================================================== */

.testimonials { background: var(--color-highlight); padding: 40px 0 10px; }
.testimonials__heading { margin-bottom: 15px; }
.testimonials__viewport { overflow: hidden; }
.testimonials__track { display: flex; transition: transform 0.5s var(--ease); }
.testimonials__slide { flex: 0 0 33.3333%; max-width: 33.3333%; text-align: center; padding: 0 12px; }

.testimonials__avatar {
	width: 280px; height: 280px; max-width: 100%;
	margin: 0 auto 15px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--color-background);
}
.testimonials__avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonials__quote { max-width: 424px; margin: 0 auto 15px; }
.testimonials__name { margin: 0 0 8px; }

.testimonials__dots { display: flex; justify-content: center; gap: 10px; margin-top: 15px; padding-bottom: 10px; }
.testimonials__dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: rgba(0, 0, 0, 0.25);
	transition: background var(--speed) var(--ease);
}
.testimonials__dot.is-active { background: var(--color-text); }

@media (max-width: 768px) {
	.testimonials__slide { flex-basis: 100%; max-width: 100%; }
	.testimonials__avatar { width: 240px; height: 240px; }
}

/* ==========================================================================
   12. SOCIAL GALLERY
   ========================================================================== */

.social-gallery__heading { margin-bottom: 45px; }
.social-gallery__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.social-gallery__tile { position: relative; aspect-ratio: 1 / 1; overflow: hidden; display: block; }
.social-gallery__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.social-gallery__tile:hover img { transform: scale(1.03); }

@media (max-width: 768px) { .social-gallery__grid { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   13. FOOTER
   ========================================================================== */

.site-footer { background: var(--color-footer); padding: 60px 0; }
.site-footer__grid {
	display: flex; flex-wrap: wrap;
	margin-left: calc(var(--grid-gap) * -1);
}
.site-footer__col { flex: 0 0 25%; max-width: 25%; padding-left: var(--grid-gap); }
.site-footer__heading {
	font-size: var(--fs-body); font-weight: 400;
	line-height: 1.4; letter-spacing: 1px; text-transform: uppercase;
	margin: 0 0 20px;
}
.site-footer__col ul { margin: 0; padding: 0; list-style: none; }
.site-footer__col li a {
	display: block; padding: 4px 0;
	font-size: var(--fs-small); line-height: 1.6;
	transition: opacity var(--speed) var(--ease);
}
.site-footer__col li a:hover { opacity: 0.6; }
.site-footer__text { font-size: var(--fs-small); line-height: 1.6; }

.newsletter__form { display: flex; align-items: center; position: relative; margin-top: 16px; }
.newsletter__input {
	flex: 1 1 auto; height: 41px;
	border: 0; border-bottom: 1px solid var(--color-text);
	background: none; padding: 10px 45px 10px 0;
	font-family: inherit; font-size: var(--fs-small); letter-spacing: var(--ls-body);
}
.newsletter__input:focus { outline: none; }
.newsletter__submit { position: absolute; right: 0; bottom: 8px; padding: 4px; }
.newsletter__submit svg { width: 22px; height: 22px; }

.social-icons { display: flex; gap: 18px; margin-top: 24px; }
.social-icons a { transition: opacity var(--speed) var(--ease); }
.social-icons a:hover { opacity: 0.6; }
.social-icons svg { width: 20px; height: 20px; }

.site-footer__bottom { text-align: center; padding-top: 40px; font-size: 12px; }

@media (max-width: 768px) {
	.site-footer { padding: 40px 0; }
	.site-footer__col { flex-basis: 100%; max-width: 100%; margin-bottom: 30px; }
	.site-footer__col:last-child { margin-bottom: 0; }
}

/* ==========================================================================
   14. WOOCOMMERCE — archive
   ========================================================================== */

.collection-header { text-align: center; padding: var(--section-spacing) 0 30px; }
.collection-header__title {
	font-size: var(--fs-section); font-weight: 500;
	letter-spacing: var(--ls-wide); text-transform: uppercase;
}
.collection-header__description { max-width: 640px; margin: 14px auto 0; color: var(--color-muted); }

.collection-toolbar {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; padding-bottom: 24px;
	font-size: var(--fs-small);
}
.collection-toolbar__count { color: var(--color-muted); }
.collection-toolbar select {
	font-family: inherit; font-size: var(--fs-small);
	border: 0; border-bottom: 1px solid var(--color-border);
	background: none; padding: 6px 0;
}
.collection-filter-toggle {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 16px;
	border: 1px solid var(--color-border);
	font-size: var(--fs-small); letter-spacing: var(--ls-wide); text-transform: uppercase;
	transition: border-color var(--speed) var(--ease);
}
.collection-filter-toggle:hover { border-color: var(--color-text); }
.collection-filter-toggle__count {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--color-accent); color: var(--color-inverse);
	font-size: 10px; letter-spacing: 0;
}

/* Active filter chips above the grid */
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 24px; padding: 0; }
.active-filters__chip {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 6px 12px;
	border: 1px solid var(--color-border);
	font-size: var(--fs-small);
	transition: border-color var(--speed) var(--ease);
}
.active-filters__chip:hover { border-color: var(--color-text); }

/* Filter drawer contents */
.collection-filters { padding: 4px 0 20px; }
.filter-group { padding: 20px var(--page-padding); border-bottom: 1px solid var(--color-rule); }
.filter-group__title {
	font-size: var(--fs-small); font-weight: 400;
	letter-spacing: var(--ls-wider); text-transform: uppercase;
	margin: 0 0 12px;
}
.filter-group__list { list-style: none; margin: 0; padding: 0; }

.filter-option {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 0;
	font-size: var(--fs-small);
	transition: opacity var(--speed) var(--ease);
}
.filter-option:hover { opacity: 0.65; }
.filter-option__box {
	flex: 0 0 auto; width: 15px; height: 15px;
	border: 1px solid var(--color-border);
	position: relative;
}
.filter-option.is-active .filter-option__box { background: var(--color-text); border-color: var(--color-text); }
.filter-option.is-active .filter-option__box::after {
	content: ""; position: absolute; left: 4px; top: 1px;
	width: 4px; height: 8px;
	border: solid var(--color-inverse); border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}
.filter-option__count { margin-left: auto; color: var(--color-muted); }

.filter-price { display: flex; align-items: center; gap: 8px; }
.filter-price input {
	width: 100%; min-width: 0; height: 38px; padding: 0 10px;
	border: 1px solid var(--color-border); background: none; border-radius: 0;
	font-family: inherit; font-size: var(--fs-small);
	-moz-appearance: textfield;
}
.filter-price input::-webkit-outer-spin-button,
.filter-price input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filter-price .btn { flex: 0 0 auto; padding: 11px 14px; letter-spacing: var(--ls-wide); }

.collection-filters__clear { padding: 18px var(--page-padding) 0; font-size: var(--fs-small); }

.woocommerce-pagination { text-align: center; padding: 20px 0 var(--section-spacing); }
.woocommerce-pagination ul { display: inline-flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.woocommerce-pagination a, .woocommerce-pagination span {
	display: block; min-width: 34px; padding: 7px 8px;
	font-size: var(--fs-small); text-align: center;
}
.woocommerce-pagination .current { border-bottom: 1px solid var(--color-text); }

@media (max-width: 768px) {
	/* Sticky so filtering stays reachable while scrolling a long grid — the
	   single most useful thing on a phone-sized collection page. */
	.collection-toolbar {
		position: sticky; top: 0; z-index: 5;
		background: var(--color-background);
		padding: 12px 0;
		border-bottom: 1px solid var(--color-rule);
		margin-bottom: 20px;
	}
	.collection-toolbar__count { display: none; }
	.collection-toolbar select { max-width: 45vw; }
	.collection-header { padding: 30px 0 20px; }
}

/* ==========================================================================
   15. WOOCOMMERCE — single product
   ========================================================================== */

/* Reference split: gallery ~59%, summary ~41% with a 45px inner gutter. */
.product-detail { display: flex; gap: 22px; padding: 0 0 var(--section-spacing); }
.product-detail__gallery { flex: 1 1 60.3%; max-width: 60.3%; min-width: 0; }
.product-detail__summary { flex: 1 1 39.7%; max-width: 39.7%; padding: 50px 0 0 45px; text-align: center; }

/* Gallery: two-column grid of squares, 5px gap — no main image, no thumb rail. */
.product-gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
.product-gallery__cell { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #fafafa; }
.product-gallery__cell img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__dots { display: none; }

.product-detail__breadcrumb {
	font-size: 10px; text-transform: capitalize; margin: 10px 0; color: var(--color-muted);
}
.product-detail__breadcrumb a:hover { color: var(--color-text); }

.product-detail__title {
	font-size: var(--fs-section); font-weight: 500; line-height: 1.5;
	letter-spacing: var(--ls-wide); text-transform: uppercase;
	margin: 0 0 10px;
}
.product-detail__price { font-size: var(--fs-body); font-weight: 500; }
.product-detail__price del { color: var(--color-muted); margin-left: 5px; font-weight: 400; }
.product-detail__price ins { text-decoration: none; }
.product-detail__rating { margin-top: 6px; }
.product-detail__rule { border: 0; border-top: 1px solid var(--color-rule); margin: 25px 0; }

/* Variation chips */
.variant-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin: 0 0 4px; }
.variant-chip {
	margin: 0 7px 12px;
	border: 1px solid var(--color-border);
	background: var(--color-background);
	font-size: 11px; line-height: 1;
	transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.variant-chips--circle .variant-chip {
	width: 28px; height: 28px; border-radius: 50%; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
}
.variant-chips--pill .variant-chip {
	min-height: 28px; border-radius: 999px; padding: 7px 14px;
	letter-spacing: var(--ls-body);
}
.variant-chip:hover { border-color: var(--color-text); }
.variant-chip.is-selected { border-color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-text); }
.variant-chip.is-unavailable { opacity: 0.3; text-decoration: line-through; cursor: not-allowed; }

/* Assurance rows under the buy button */
.product-assurances { list-style: none; margin: 25px 0 0; padding: 0; text-align: left; }
.product-assurances li {
	display: flex; align-items: center; gap: 12px;
	padding: 7px 0;
	font-size: var(--fs-small); letter-spacing: var(--ls-body); text-transform: uppercase;
}
.product-assurances svg { flex: 0 0 auto; }

.product-detail__delivery { margin-top: 18px; font-size: var(--fs-small); color: var(--color-muted); }

/* --- WooCommerce add-to-cart form ---------------------------------------
   Woo's own stylesheet ships a purple button and a cramped variations table.
   These selectors are scoped to .product-detail__summary so they outrank
   woocommerce-general regardless of enqueue order. */

.product-detail__summary form.cart { margin: 0; }

.product-detail__summary table.variations {
	width: 100%; border-collapse: collapse; margin: 0 0 18px;
}
.product-detail__summary table.variations tr { display: block; margin-bottom: 16px; }
.product-detail__summary table.variations th,
.product-detail__summary table.variations td { display: block; padding: 0; text-align: left; }
.product-detail__summary table.variations th label {
	display: block; margin-bottom: 10px; font-weight: 400; text-align: center;
	font-size: var(--fs-small); letter-spacing: var(--ls-wider); text-transform: uppercase;
}
/* The chips are the control; the native select stays in the DOM (and in the
   accessibility tree) so WooCommerce's variation script keeps working. */
.product-detail__summary table.variations select {
	position: absolute; width: 1px; height: 1px;
	margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* No JS: the chips do nothing, so show the select instead. */
.no-js .product-detail__summary table.variations select {
	position: static; width: 100%; height: 44px; margin: 0; padding: 0 12px;
	clip: auto; border: 1px solid var(--color-border); background: none;
	font-family: inherit; font-size: var(--fs-body);
}
.no-js .variant-chips { display: none; }

/* Quantity is hidden on the product page — see willow_hide_quantity_input. */
.product-detail__summary .quantity.willow-qty-hidden,
.product-detail__summary .quantity:has(input[max="1"][min="1"]) { display: none; }
.product-detail__summary .reset_variations {
	display: inline-block; margin-top: 8px;
	font-size: var(--fs-small); border-bottom: 1px solid var(--color-border);
}
.product-detail__summary .woocommerce-variation-price { margin: 0 0 16px; font-size: 16px; }
.product-detail__summary .woocommerce-variation-availability { font-size: var(--fs-small); color: var(--color-muted); }

.product-detail__summary .quantity { display: inline-flex; margin: 0 12px 0 0; vertical-align: top; }
.product-detail__summary .quantity input.qty {
	width: 72px; height: 48px; padding: 0 8px; text-align: center;
	border: 1px solid var(--color-border); border-radius: 0; background: none;
	font-family: inherit; font-size: var(--fs-body);
}

/* Reference add-to-cart: full width, 50px, transparent with a 1px black rule —
   not a solid fill. Measured `13px 20px` padding, .3em tracking. */
.product-detail__summary .single_add_to_cart_button,
.woocommerce .product-detail__summary button.button.alt,
.woocommerce .product-detail__summary button.button {
	display: block; width: 100%;
	background: transparent;
	color: var(--color-text);
	border: 1px solid var(--color-text); border-radius: 0;
	height: 50px; padding: 13px 20px;
	font-size: var(--fs-button); font-weight: 700;
	letter-spacing: var(--ls-widest); text-transform: uppercase;
	transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.product-detail__summary .single_add_to_cart_button:hover {
	background: var(--color-text); color: var(--color-inverse);
}
.product-detail__summary .single_add_to_cart_button.disabled,
.woocommerce .product-detail__summary button.button.alt.disabled { opacity: 0.35; cursor: not-allowed; }

/* Variable products render the form as a block so quantity + button sit on
   one row beneath the selects, as on the reference. */
.product-detail__summary .woocommerce-variation-add-to-cart { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }

.product-accordion { border-top: 1px solid var(--color-rule); margin-top: 30px; }
.product-accordion__item { border-bottom: 1px solid var(--color-rule); }
.product-accordion__trigger {
	width: 100%; display: flex; align-items: center; justify-content: space-between;
	padding: 16px 0; text-align: left;
	font-size: var(--fs-small); letter-spacing: var(--ls-wider); text-transform: uppercase;
}
.product-accordion__trigger svg { width: 12px; height: 12px; transition: transform var(--speed) var(--ease); }
.product-accordion__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.product-accordion__panel { overflow: hidden; height: 0; transition: height var(--speed) var(--ease); }
.product-accordion__panel > div { padding: 0 0 18px; font-size: var(--fs-small); line-height: 1.7; }

@media (max-width: 1023px) {
	.product-detail { flex-direction: column; gap: 0; }
	.product-detail__gallery, .product-detail__summary { flex-basis: auto; max-width: 100%; }
	.product-detail__summary { padding: 30px 0 0; }
}

@media (max-width: 768px) {
	/* Same markup, different machine: the grid becomes a one-per-view
	   scroll-snap carousel, matching the reference's mobile swipe gallery. */
	.product-gallery__grid {
		display: flex;
		gap: 0;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.product-gallery__grid::-webkit-scrollbar { display: none; }
	.product-gallery__cell { flex: 0 0 100%; scroll-snap-align: start; }

	.product-gallery__dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
	.product-gallery__dot {
		width: 7px; height: 7px; border-radius: 50%;
		background: rgba(0, 0, 0, 0.22);
		transition: background var(--speed) var(--ease);
	}
	.product-gallery__dot.is-active { background: var(--color-text); }

	/* The reference drops the PDP title to ~13px on mobile; at 18.92px an
	   uppercase name with .05em tracking wraps to three lines on a phone. */
	.product-detail__title { font-size: 13.09px; line-height: 1.6; }
	.product-detail__breadcrumb { font-size: 9.5px; }
}

/* WooCommerce messages, kept minimal and on-system. */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	margin: 0 0 20px; padding: 14px 18px; list-style: none;
	border: 1px solid var(--color-rule);
	font-size: var(--fs-small);
}
.woocommerce-error { border-color: var(--color-sale); }

/* Cart, checkout and account keep WooCommerce's own markup; we only align
   type, controls and buttons so they do not look like a different site. */
.woocommerce-cart .shop_table, .woocommerce-checkout .shop_table { width: 100%; border-collapse: collapse; }
.woocommerce-cart .shop_table th, .woocommerce-cart .shop_table td { padding: 14px 8px; border-bottom: 1px solid var(--color-rule); text-align: left; }
.woocommerce form .form-row { margin-bottom: 16px; }
.woocommerce form .form-row label { display: block; margin-bottom: 6px; font-size: var(--fs-small); letter-spacing: var(--ls-wide); text-transform: uppercase; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	width: 100%; padding: 12px; border: 1px solid var(--color-border);
	font-family: inherit; font-size: var(--fs-body); border-radius: 0; background: none;
}
.woocommerce .button, .woocommerce button.button, .woocommerce input.button, .woocommerce a.button {
	display: inline-block; padding: 13px 24px;
	font-size: var(--fs-button); font-weight: 700; letter-spacing: var(--ls-widest);
	text-transform: uppercase; border: 0; border-radius: 0;
	background: var(--color-accent); color: var(--color-inverse); cursor: pointer;
}
.woocommerce .button:hover { opacity: 0.85; }

.shop-main { padding-bottom: var(--section-spacing); }
