/* ==========================================================================
   Aniwear — main.css
   Mobile-first. Base styles = phone (~380px). Media queries only ever go UP:
   640px (tablet, 2 col) · 1024px (desktop, 3 col, top nav). (§6)
   Rule: no raw colours / sizes below the token block. Everything is var(--token).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — the single source of truth (§11.2)
   Lines marked PROPOSED are not in the design doc yet; see README "Rules to add".
   -------------------------------------------------------------------------- */
:root {
	/* Colour (§3.1, LOCKED) */
	--bg: #0E0E10;
	--surface: #18181B;
	--surface-2: #141416;
	--border: #262629;
	--accent: #C6FF3A;
	--accent-hover: #D4FF5C;
	--text: #F2F2F2;
	--muted: #9498A0;
	--disabled: #2A2A2E;
	--on-accent: var(--bg);              /* text on lime fills is always near-black (§2) */

	/* Colour — PROPOSED */
	--accent-press: #A6D930;             /* §5.1 "dimmed fill" — 11.6:1 with on-accent */
	--border-strong: #62656D;            /* 3.3:1 on bg — input & pill outlines need ≥3:1 (WCAG 1.4.11) */
	--danger: #FF6B6B;                   /* §5.4 "red border" — 7.0:1 on bg, 6.4:1 on surface */
	--scrim: rgb(0 0 0 / 0.6);           /* §5.5 */

	/* Spacing — 8px base (§3.4). Nothing off this list. */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-6: 24px;
	--space-8: 32px;
	--space-12: 48px;
	--space-16: 64px;

	/* Radius (§3.5) */
	--radius: 8px;
	--radius-pill: 999px;

	/* Type (§3.2, §3.3) */
	--font-display: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--fs-display: 24px;    /* wordmark */
	--fs-h1: 22px;         /* page / product name */
	--fs-h2: 16px;         /* section head */
	--fs-card: 14px;       /* card product name */
	--fs-body: 16px;       /* never below 16 on mobile */
	--fs-small: 12px;
	--fs-price: 24px;      /* accent-coloured text must be ≥24px (§2, §3.2) */
	--fs-hero: 44px;       /* PROPOSED — the scale has no hero step; 64px from 1024px */

	/* Motion (§3.7) */
	--motion-fast: 120ms;
	--motion-base: 275ms;
	--ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
	--ease: ease;

	/* Layout */
	--max-w: 1280px;
	--gutter: var(--space-4);
	--header-h: 56px;
	--tabbar-h: 64px;
	--atc-h: 80px;
	--safe-bottom: env(safe-area-inset-bottom, 0px);

	color-scheme: dark;
}

@media (min-width: 1024px) {
	:root {
		--fs-hero: 64px;
		--gutter: var(--space-8);
		--header-h: 72px;
		--tabbar-h: 0px;
		--atc-h: 0px;
	}
}

/* --------------------------------------------------------------------------
   2. Fonts — self-hosted variable woff2 (§10.2, §16). Two files cover Oswald 500/600/700
   and Inter 400/500/600: inside the 4-file / 150KB cap with room to spare.
   -------------------------------------------------------------------------- */
@font-face {
	font-family: "Oswald";
	src: url("../fonts/oswald-latin-wght.woff2") format("woff2");
	font-weight: 200 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-latin-wght.woff2") format("woff2");
	font-weight: 400 600;
	font-style: normal;
	font-display: swap;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	/* Focus not obscured (WCAG 2.2, §2): keep focused controls clear of the sticky bars. */
	scroll-padding-bottom: calc(var(--tabbar-h) + var(--atc-h) + var(--safe-bottom) + var(--space-4));
	scroll-padding-top: var(--space-4);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.5;
	font-feature-settings: "cv11", "ss01";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
	overflow-x: clip;
}

body.is-checkout-flow { padding-bottom: 0; }

img,
svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* Links: never lime text (§2). Off-white text, lime underline carries the accent. */
a {
	color: var(--text);
	text-decoration-color: var(--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

/* Focus: 2px accent outline, 2px offset — everywhere, no exceptions (§2, §5). */
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

:focus:not(:focus-visible) { outline: none; }

.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.accent-text { color: var(--accent); } /* ≥24px only — used on hero/display type */

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

.skip-link {
	position: absolute;
	left: var(--space-4);
	top: calc(-1 * var(--space-16));
	z-index: 100;
	padding: var(--space-3) var(--space-4);
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
	border-radius: var(--radius);
	text-decoration: none;
}

.skip-link:focus { top: var(--space-2); }

.container {
	width: 100%;
	max-width: var(--max-w);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.site-main:focus { outline: none; }

/* --------------------------------------------------------------------------
   4. Header & navigation (§4.1)
   -------------------------------------------------------------------------- */
.site-header {
	background: var(--bg);
	border-bottom: 1px solid var(--border);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	height: var(--header-h);
	max-width: var(--max-w);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.wordmark {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-height: 44px;
	color: var(--text);
	text-decoration: none;
}

.wordmark__mark {
	width: 12px;
	height: 24px;
	background: var(--accent);
	transform: skewX(-16deg);
	border-radius: 2px;
}

.wordmark__text {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: var(--fs-display);
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Image logo (samurai panda). Width follows the artwork's ~3.4:1 ratio. */
.site-logo {
	display: block;
	width: auto;
	height: 40px;
	max-width: 60vw;
}

@media (min-width: 1024px) {
	.site-logo { height: 52px; }
}

.top-nav { display: none; }

.site-header__actions { display: flex; align-items: center; gap: var(--space-1); }

.icon-btn {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--radius);
	background: transparent;
	color: var(--text);
	transition: background-color var(--motion-fast) var(--ease-out);
}

.icon-btn:hover { background: var(--surface); }
.icon-btn--desktop { display: none; }

.count-badge {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 20px;
	height: 20px;
	padding: 0 var(--space-1);
	border-radius: var(--radius-pill);
	background: var(--accent);
	color: var(--on-accent);
	font-size: var(--fs-small);
	font-weight: 600;
	line-height: 20px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.count-badge[hidden] { display: none; }

/* Bottom tab bar — mobile + tablet (§4.1, LOCKED). Real links, always visible. */
.tabbar {
	position: fixed;
	inset: auto 0 0;
	z-index: 40;
	background: var(--surface-2);
	border-top: 1px solid var(--border);
	padding-bottom: var(--safe-bottom);
}

.tabbar ul {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	height: var(--tabbar-h);
	max-width: 640px;
	margin-inline: auto;
}

.tabbar__link {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-1);
	height: 100%;
	min-height: 44px;
	color: var(--muted);
	font-size: var(--fs-small);
	font-weight: 500;
	text-decoration: none;
	transition: color var(--motion-fast) var(--ease-out);
}

.tabbar__link:hover { color: var(--text); }
.tabbar__icon { position: relative; }
.tabbar__icon .count-badge { top: -8px; right: -14px; }

/* Active tab: lime ICON + indicator, off-white label. The label stays off-white because a
   12px lime label would break the §2 accent-text rule (see README → conflicts). */
.tabbar__link[aria-current="page"] { color: var(--text); }
.tabbar__link[aria-current="page"] .icon { color: var(--accent); }

.tabbar__link[aria-current="page"]::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 50%;
	width: var(--space-6);
	height: 2px;
	background: var(--accent);
	border-radius: 0 0 2px 2px;
	transform: translateX(-50%);
}

.is-checkout-flow .tabbar { display: none; } /* §4.7 */

/* --------------------------------------------------------------------------
   5. Buttons, links, badges, chips (§5.1, §3.6)
   -------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: 48px;
	padding: 0 var(--space-6);
	border: 1px solid transparent;
	border-radius: var(--radius);
	font-family: var(--font-display);
	font-size: var(--fs-body);
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color var(--motion-fast) var(--ease-out),
		border-color var(--motion-fast) var(--ease-out),
		transform var(--motion-fast) var(--ease-out);
	-webkit-tap-highlight-color: transparent;
}

.btn--primary {
	background: var(--accent);
	color: var(--on-accent);
}

.btn--primary:hover { background: var(--accent-hover); }

.btn--primary:active {
	background: var(--accent-press);
	transform: scale(0.98);
}

.btn--secondary {
	background: transparent;
	border-color: var(--border-strong);
	color: var(--text);
}

.btn--secondary:hover { border-color: var(--text); }
.btn--secondary:active { transform: scale(0.98); }

.btn:disabled,
.btn[aria-disabled="true"],
.btn.disabled {
	background: var(--disabled);
	border-color: transparent;
	color: var(--muted);
	cursor: not-allowed;
	transform: none;
}

.btn--lg { min-height: 56px; }
.btn--block { display: flex; width: 100%; }

.btn.is-pending { pointer-events: none; }

.btn.is-pending::after {
	content: "";
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin 600ms linear infinite;
}

@keyframes spin { to { transform: rotate(1turn); } }

.text-link {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--text);
	font-size: var(--fs-small);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-pill);
	background: var(--accent);
	color: var(--on-accent);
	font-family: var(--font-display);
	font-size: var(--fs-small);
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.4;
	text-transform: uppercase;
}

.badge--low {
	background: var(--surface);
	color: var(--text);
	box-shadow: inset 0 0 0 1px var(--accent);
}

.badge--soldout {
	background: var(--disabled);
	color: var(--text);
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-block: var(--space-4) var(--space-6);
}

.chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--space-4);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-pill);
	font-size: var(--fs-small);
	font-weight: 500;
	text-decoration: none;
	transition: border-color var(--motion-fast) var(--ease-out);
}

.chip:hover { border-color: var(--accent); }

/* Stars — graphic in accent, numeric label muted (§9.1). */
.stars {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--muted);
	font-size: var(--fs-small);
}

.stars__track {
	position: relative;
	display: flex;
	color: var(--border-strong);
}

.stars__fill {
	position: absolute;
	inset: 0 auto 0 0;
	display: flex;
	overflow: hidden;
	color: var(--accent);
}

.stars .icon { flex: none; fill: currentColor; stroke: none; }

/* --------------------------------------------------------------------------
   6. Forms (§5.4)
   -------------------------------------------------------------------------- */
.input,
.woocommerce form .input-text,
.woocommerce form select,
.woocommerce-page form .input-text {
	width: 100%;
	min-height: 48px;
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	font-size: var(--fs-body); /* 16px: no iOS zoom-on-focus */
	transition: border-color var(--motion-fast) var(--ease-out);
}

.input::placeholder { color: var(--muted); }

.input:focus-visible,
.woocommerce form .input-text:focus-visible,
.woocommerce form select:focus-visible {
	border-color: var(--accent);
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.input[aria-invalid="true"],
.woocommerce-invalid .input-text { border-color: var(--danger); }

.field__error {
	margin-top: var(--space-2);
	color: var(--danger);
	font-size: var(--fs-small);
	font-weight: 500;
}

.field--inline { display: flex; gap: var(--space-2); }
.field--inline .input { flex: 1; min-width: 0; }

/* --------------------------------------------------------------------------
   7. Sections & headings
   -------------------------------------------------------------------------- */
.section { padding-block: var(--space-12); }

.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	margin-bottom: var(--space-4);
}

.section-label {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	font-family: var(--font-display);
	font-size: var(--fs-h2);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.section-label::before {
	content: "";
	width: var(--space-6);
	height: 2px;
	background: var(--accent);
}

.page-title {
	margin-block: var(--space-8) var(--space-4);
	font-size: var(--fs-h1);
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   8. Hero (§4.5)
   -------------------------------------------------------------------------- */
.hero { padding-top: var(--space-4); }

.hero__inner {
	display: grid;
	gap: var(--space-6);
}

.hero__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

/* Phones: square crop so the headline + CTA land above the tab bar (product shots stay 3:4). */
@media (max-width: 639px) {
	.hero__media { aspect-ratio: 1 / 1; }
}

.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

.hero__kana {
	position: absolute;
	top: var(--space-4);
	right: var(--space-3);
	writing-mode: vertical-rl;
	font-family: var(--font-display);
	font-size: var(--fs-small);
	font-weight: 500;
	letter-spacing: 0.4em;
	color: var(--muted);
}

.hero__copy {
	display: grid;
	justify-items: start;
	gap: var(--space-4);
}

.hero__title {
	font-size: var(--fs-hero);
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: -0.005em;
	text-transform: uppercase;
}

.hero__title .accent-text { display: block; }

.hero__lede { max-width: 36ch; color: var(--muted); }

.hero .btn { width: 100%; }

/* --------------------------------------------------------------------------
   9. Product grid & card (§4.2, §5.2)
   -------------------------------------------------------------------------- */
.product-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-4);
}

/* Cross-sell row: same card, horizontal swipe. */
.product-grid--row {
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: 78%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	margin-inline: calc(-1 * var(--gutter));
	padding-inline: var(--gutter);
	padding-bottom: var(--space-2);
	scrollbar-width: none;
}

.product-grid--row::-webkit-scrollbar { display: none; }
.product-grid--row > li { scroll-snap-align: start; }

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition:
		border-color var(--motion-fast) var(--ease-out),
		transform var(--motion-fast) var(--ease-out);
}

.card:hover,
.card:focus-within { border-color: var(--accent); }
.card:active { transform: scale(0.99); }

.card__media { position: relative; }

.card__media > .badge {
	position: absolute;
	top: var(--space-3);
	left: var(--space-3);
	z-index: 2;
}

.card__body {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--space-3);
	padding: var(--space-4);
}

.card__text {
	display: grid;
	gap: var(--space-1);
	min-width: 0;
}

.card__series {
	color: var(--muted);
	font-size: var(--fs-small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.card__title {
	font-size: var(--fs-card);
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.card__link {
	display: block;
	padding-block: var(--space-1);
	color: var(--text);
	text-decoration: none;
}

/* Stretch the title link over the whole card body so the text area is one ≥44px target (§2). */
.card__body { position: relative; }
.card__link::after { content: ""; position: absolute; inset: 0; }

/* The title link is the card's single tab stop; its focus ring is drawn on the card. */
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.card--soldout .gallery__slide img { opacity: 0.55; }

/* Price — accent, ≥24px (§3.2). */
.price {
	color: var(--accent);
	font-family: var(--font-body);
	font-size: var(--fs-price);
	font-weight: 500;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.price del { color: var(--muted); font-size: var(--fs-body); }
.price ins { text-decoration: none; }

.price-from {
	color: var(--muted);
	font-size: var(--fs-small);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   10. Gallery — card + product variants (§4.3). Scroll-snap = swipe with no JS.
   -------------------------------------------------------------------------- */
.gallery {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--surface-2);
	border-radius: inherit;
}

.gallery__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.gallery__track::-webkit-scrollbar { display: none; }

.gallery__slide {
	flex: 0 0 100%;
	margin: 0;
	aspect-ratio: 3 / 4;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }

.gallery__dots {
	position: absolute;
	left: 50%;
	bottom: var(--space-3);
	display: flex;
	gap: var(--space-1);
	padding: var(--space-1) var(--space-2);
	border-radius: var(--radius-pill);
	background: rgb(14 14 16 / 0.6);
	transform: translateX(-50%);
	pointer-events: none;
}

.gallery__dot {
	width: 6px;
	height: 6px;
	border-radius: var(--radius-pill);
	background: var(--muted);
	transition: width var(--motion-base) var(--ease), background-color var(--motion-base) var(--ease);
}

.gallery__dot.is-active { width: var(--space-4); background: var(--text); }

.gallery__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-pill);
	background: rgb(14 14 16 / 0.8);
	color: var(--text);
	transform: translateY(-50%);
	transition: opacity var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.gallery__nav:hover { border-color: var(--accent); }
.gallery__nav:disabled { opacity: 0; pointer-events: none; }
.gallery__nav--prev { left: var(--space-3); }
.gallery__nav--next { right: var(--space-3); }

/* Arrows only where there's a precise pointer (desktop); touch swipes (§6). */
@media (hover: none), (pointer: coarse) {
	.gallery__nav { display: none; }
}

/* --------------------------------------------------------------------------
   11. Product page (§4.4)
   -------------------------------------------------------------------------- */
.product-page {
	display: grid;
	gap: var(--space-6);
	padding-top: var(--space-4);
}

.product-page__gallery {
	position: relative;
	margin-inline: calc(-1 * var(--gutter)); /* full-bleed on phones */
}

.product-page__gallery > .badge {
	position: absolute;
	top: var(--space-4);
	left: var(--space-4);
	z-index: 2;
}

.product-page__details {
	display: grid;
	align-content: start;
	gap: var(--space-4);
}

.product-page__series {
	justify-self: start;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-bottom: calc(-1 * var(--space-4));
	color: var(--muted);
	font-size: var(--fs-small);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
}

.product-page__series:hover { color: var(--text); }

.product-page__title {
	font-size: var(--fs-h1);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.product-page__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2) var(--space-4);
}

.product-page__hook { color: var(--text); }
.product-page__hook p { margin: 0; }

/* Size pills (§5.3) — real radios. */
.sizes {
	position: relative;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.sizes__legend {
	float: left; /* lets the guide link share the row */
	padding: 0;
	min-height: 44px;
	line-height: 44px;
	font-family: var(--font-display);
	font-size: var(--fs-h2);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.sizes__guide { float: right; }

.sizes__pills {
	clear: both;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	padding-top: var(--space-2);
}

.pill { position: relative; display: inline-flex; }

.pill input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.pill__face {
	display: inline-grid;
	place-items: center;
	min-width: 52px;
	min-height: 48px;
	padding: 0 var(--space-3);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-pill);
	color: var(--text);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	transition:
		background-color var(--motion-fast) var(--ease-out),
		border-color var(--motion-fast) var(--ease-out),
		transform var(--motion-fast) var(--ease-out);
}

.pill input:hover + .pill__face { border-color: var(--text); }

.pill input:checked + .pill__face {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--on-accent);
}

.pill input:active + .pill__face { transform: scale(0.98); }

.pill input:focus-visible + .pill__face {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.pill input:disabled { cursor: not-allowed; }

.pill input:disabled + .pill__face {
	border-color: var(--disabled);
	color: var(--muted);
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

.stock-note {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--fs-small);
	font-weight: 500;
}

.stock-note::before {
	content: "";
	width: var(--space-2);
	height: var(--space-2);
	border-radius: 50%;
	background: var(--accent);
}

.stock-note[hidden] { display: none; }

.sold-out-note { color: var(--muted); }

.atc-form { display: grid; gap: var(--space-4); }

/* Sticky add-to-cart: pinned above the tab bar on phones/tablets, inline on desktop (§4.4, §6).
   Same rules cover the demo form and WooCommerce's own add-to-cart containers — no JS needed. */
.atc-bar,
.atc-area .woocommerce-variation-add-to-cart,
.atc-area form.cart:not(.variations_form) {
	position: fixed;
	inset: auto 0 calc(var(--tabbar-h) + var(--safe-bottom));
	z-index: 30;
	display: flex;
	gap: var(--space-2);
	min-height: var(--atc-h);
	padding: var(--space-3) var(--gutter) var(--space-4);
	background: var(--surface-2);
	border-top: 1px solid var(--border);
}

.atc-area .quantity { display: none; } /* qty 1 by default; adjust in cart */
.atc-area .single_add_to_cart_button { flex: 1; }

/* Leave room for the pinned bar so the footer never hides behind it. */
body:has(.atc-bar, .atc-area) { padding-bottom: calc(var(--tabbar-h) + var(--atc-h) + var(--safe-bottom)); }

.reassurance {
	display: grid;
	gap: var(--space-2);
	color: var(--muted);
	font-size: var(--fs-small);
}

.reassurance li { display: flex; align-items: center; gap: var(--space-2); }
.reassurance .icon { color: var(--text); flex: none; }

.disclosures { border-top: 1px solid var(--border); }

.disclosure { border-bottom: 1px solid var(--border); }

.disclosure summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 56px;
	font-family: var(--font-display);
	font-size: var(--fs-h2);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	list-style: none;
	cursor: pointer;
}

.disclosure summary::-webkit-details-marker { display: none; }

.disclosure summary::after {
	content: "+";
	font-family: var(--font-body);
	font-size: var(--fs-price);
	font-weight: 400;
	color: var(--muted);
	transition: transform var(--motion-fast) var(--ease-out);
}

.disclosure[open] summary::after { transform: rotate(45deg); }
.disclosure > :not(summary) { padding-bottom: var(--space-4); color: var(--muted); }

.reviews__summary { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }

.reviews__score {
	font-family: var(--font-display);
	font-size: var(--fs-hero);
	font-weight: 700;
	line-height: 1;
	color: var(--accent);
}

/* --------------------------------------------------------------------------
   12. Overlays — bottom sheet (§5.5). Native <dialog> + showModal().
   -------------------------------------------------------------------------- */
.sheet {
	width: 100%;
	max-width: 100%;
	max-height: 85vh;
	margin: auto 0 0;
	padding: var(--space-4) var(--gutter) calc(var(--space-6) + var(--safe-bottom));
	border: 1px solid var(--border);
	border-bottom: 0;
	border-radius: var(--radius) var(--radius) 0 0;
	background: var(--surface);
	color: var(--text);
	overflow-y: auto;
}

.sheet::backdrop { background: var(--scrim); }

.sheet[open] { animation: sheet-up var(--motion-base) var(--ease-out); }
.sheet[open]::backdrop { animation: fade-in var(--motion-base) var(--ease); }

@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }

.sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--space-2);
}

.sheet__title {
	font-size: var(--fs-h1);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.sheet > p { margin-bottom: var(--space-4); }

html:has(dialog[open]) { overflow: hidden; } /* scroll lock */

.size-table {
	width: 100%;
	margin-bottom: var(--space-4);
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.size-table th,
.size-table td {
	padding: var(--space-3) var(--space-2);
	border-bottom: 1px solid var(--border);
	text-align: left;
}

.size-table thead th {
	color: var(--muted);
	font-size: var(--fs-small);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.size-table tbody th { font-family: var(--font-display); font-weight: 600; }

/* --------------------------------------------------------------------------
   13. Toast (prototype behaviour) + Woo notices as toasts
   -------------------------------------------------------------------------- */
.toast-region {
	position: fixed;
	inset: auto var(--gutter) calc(var(--tabbar-h) + var(--atc-h) + var(--safe-bottom) + var(--space-3));
	z-index: 60;
	display: grid;
	justify-items: center;
	pointer-events: none;
}

.toast,
.woocommerce-message {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	width: 100%;
	max-width: 420px;
	min-height: 56px;
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--accent);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	font-weight: 500;
	box-shadow: 0 var(--space-2) var(--space-6) rgb(0 0 0 / 0.5);
	pointer-events: auto;
	animation: toast-in var(--motion-base) var(--ease-out);
}

.toast .icon { color: var(--accent); flex: none; }
.toast .text-link { margin-left: auto; }
.toast.is-leaving { opacity: 0; transform: translateY(var(--space-2)); transition: all var(--motion-base) var(--ease); }

@keyframes toast-in { from { opacity: 0; transform: translateY(var(--space-4)); } }

.woocommerce-notices-wrapper:has(.woocommerce-message) {
	position: fixed;
	inset: auto var(--gutter) calc(var(--tabbar-h) + var(--atc-h) + var(--safe-bottom) + var(--space-3));
	z-index: 60;
	display: grid;
	justify-items: center;
}

.woocommerce-message .button { display: none; }

.woocommerce-error,
.woocommerce-info {
	margin: var(--space-4) 0;
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	background: var(--surface);
	list-style: none;
}

.woocommerce-error { border-color: var(--danger); }

/* --------------------------------------------------------------------------
   14. Empty state (§11.1) & search
   -------------------------------------------------------------------------- */
.empty-state {
	display: grid;
	justify-items: center;
	gap: var(--space-4);
	padding: var(--space-12) var(--space-4);
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius);
	text-align: center;
}

.empty-state__icon {
	display: grid;
	place-items: center;
	width: var(--space-16);
	height: var(--space-16);
	border-radius: 50%;
	background: var(--surface);
	color: var(--muted);
}

.empty-state__title {
	font-family: var(--font-display);
	font-size: var(--fs-h1);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.search-form {
	position: relative;
	display: flex;
	gap: var(--space-2);
}

.search-form__icon {
	position: absolute;
	left: var(--space-4);
	top: 50%;
	color: var(--muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.search-form__input { padding-left: var(--space-12); }
.search-form__input::-webkit-search-cancel-button { filter: invert(1); }

.page-search { padding-bottom: var(--space-12); }

.prose-page { padding-bottom: var(--space-12); }
.entry > * + * { margin-top: var(--space-4); }

/* --------------------------------------------------------------------------
   15. Brand strip & footer (§4.5)
   -------------------------------------------------------------------------- */
.brand-strip {
	border-block: 1px solid var(--border);
	background: var(--surface-2);
}

.brand-strip__inner {
	display: grid;
	gap: var(--space-4);
	padding-block: var(--space-12);
}

.brand-strip__kana {
	font-size: var(--fs-hero);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.08em;
	color: transparent;
	-webkit-text-stroke: 1px var(--border-strong);
	user-select: none;
}

.brand-strip__line { max-width: 52ch; margin-top: var(--space-3); color: var(--muted); }

.site-footer {
	padding-block: var(--space-12) var(--space-8);
	background: var(--bg);
	color: var(--muted);
}

.site-footer__grid { display: grid; gap: var(--space-8); }
.site-footer__brand { display: grid; gap: var(--space-2); }
.site-footer__brand .wordmark { justify-self: start; }

.newsletter { display: grid; gap: var(--space-2); }
.newsletter .section-label { color: var(--text); }
.newsletter .field--inline { margin-top: var(--space-2); }

.site-footer__links ul {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 var(--space-4);
}

.site-footer__links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--muted);
	text-decoration: none;
	transition: color var(--motion-fast) var(--ease-out);
}

.site-footer__links a:hover { color: var(--text); }

.site-footer__base {
	display: flex;
	justify-content: space-between;
	gap: var(--space-4);
	margin-top: var(--space-8);
	padding-top: var(--space-6);
	border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   16. WooCommerce archive, cart & checkout — token restyle of Woo markup (Phase 3: "rough")
   -------------------------------------------------------------------------- */
.shop-page { padding-bottom: var(--space-12); }

.woocommerce-products-header { padding-block: var(--space-8) var(--space-4); }

.woocommerce-products-header__title {
	font-size: var(--fs-h1);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.term-description { max-width: 60ch; margin-top: var(--space-2); color: var(--muted); }

.woocommerce-result-count { color: var(--muted); font-size: var(--fs-small); }

.woocommerce-ordering { margin-bottom: var(--space-4); }

.woocommerce-pagination ul {
	display: flex;
	gap: var(--space-2);
	justify-content: center;
	margin-top: var(--space-8);
}

.woocommerce-pagination a,
.woocommerce-pagination span {
	display: grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	text-decoration: none;
}

.woocommerce-pagination .current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.woocommerce .button,
.woocommerce button.button,
.wc-block-components-button:not(.is-link) {
	min-height: 48px;
	padding: 0 var(--space-6);
	border: 0;
	border-radius: var(--radius);
	background: var(--accent);
	color: var(--on-accent);
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.woocommerce .button:hover { background: var(--accent-hover); }

/* WPForms (contact page) submit: same as our primary button. */
div.wpforms-container-full .wpforms-form button[type="submit"].wpforms-submit {
	min-height: 48px;
	padding: 0 var(--space-6);
	border: 0;
	border-radius: var(--radius);
	background: var(--accent);
	color: var(--on-accent);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: var(--fs-body);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
div.wpforms-container-full .wpforms-form button[type="submit"].wpforms-submit:hover { background: var(--accent-hover); }

/* Cart/checkout blocks reuse the class "price" on line prices. Our card .price (24px, nowrap) made the
   cart table 408px wide on a 390px phone. Inside blocks, prices take the block's size and plain text
   colour: lime is reserved for ≥24px (§3.2). */
.wp-block-woocommerce-cart .price,
.wp-block-woocommerce-checkout .price,
.wp-block-woocommerce-mini-cart-contents .price {
	color: inherit;
	font-size: inherit;
	line-height: inherit;
	white-space: normal;
}

.woocommerce table.shop_table {
	width: 100%;
	border-collapse: collapse;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: var(--space-3) var(--space-2);
	border-bottom: 1px solid var(--border);
	text-align: left;
}

/* Woo variation table → hidden once main.js has built pills from it. */
.variations_form.has-pills table.variations { display: none; }
.single_variation .woocommerce-variation-price { display: none; } /* price already shown above */
.woocommerce-variation-availability .stock { font-size: var(--fs-small); color: var(--muted); }
.reset_variations { display: none !important; }

/* --------------------------------------------------------------------------
   17. Tablet — 640px+ (2 col)
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
	.product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
	.product-grid--row { grid-template-columns: none; grid-auto-columns: 42%; }

	.hero__inner { grid-template-columns: 1fr 1fr; align-items: center; }
	.hero .btn { width: auto; }

	.product-page__gallery { margin-inline: 0; }
	.product-page__gallery .gallery { border: 1px solid var(--border); border-radius: var(--radius); }

	.site-footer__grid { grid-template-columns: 1fr 1fr; }

	.sheet {
		max-width: 560px;
		margin: auto;
		border-bottom: 1px solid var(--border);
		border-radius: var(--radius);
		padding: var(--space-6);
	}

	.sheet[open] { animation-name: fade-in; }
}

/* --------------------------------------------------------------------------
   18. Desktop — 1024px+ (3 col, top nav, inline add-to-cart)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
	body { padding-bottom: 0; }

	.tabbar { display: none; }
	.icon-btn--desktop { display: inline-grid; }

	.site-header {
		position: sticky;
		top: 0;
		z-index: 40;
		background: rgb(14 14 16 / 0.92);
		backdrop-filter: blur(8px);
	}

	.top-nav { display: block; margin-right: auto; margin-left: var(--space-8); }
	.top-nav ul { display: flex; gap: var(--space-6); }

	.top-nav a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
		color: var(--muted);
		font-family: var(--font-display);
		font-size: var(--fs-body);
		font-weight: 500;
		letter-spacing: 0.1em;
		text-transform: uppercase;
		text-decoration: none;
		transition: color var(--motion-fast) var(--ease-out);
	}

	.top-nav a:hover { color: var(--text); }

	.top-nav a[aria-current="page"] {
		color: var(--text);
		text-decoration: underline;
		text-decoration-color: var(--accent);
		text-underline-offset: 8px;
	}

	.product-grid { grid-template-columns: repeat(3, 1fr); }
	.product-grid--row { grid-template-columns: repeat(3, 1fr); grid-auto-flow: row; overflow: visible; margin: 0; padding: 0; }
	.product-grid--row > li:nth-child(n + 4) { display: none; }

	.hero { padding-top: var(--space-8); }
	.hero__inner { grid-template-columns: 5fr 6fr; gap: var(--space-16); }
	.hero__media { order: 2; }
	.hero__copy { gap: var(--space-6); }

	.section { padding-block: var(--space-16); }

	.product-page {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: var(--space-12);
		padding-top: var(--space-8);
	}

	.product-page__details { position: sticky; top: calc(var(--header-h) + var(--space-6)); }

	.atc-bar,
	.atc-area .woocommerce-variation-add-to-cart,
	.atc-area form.cart:not(.variations_form) {
		position: static;
		min-height: 0;
		padding: 0;
		background: none;
		border: 0;
	}

	.brand-strip__inner { grid-template-columns: auto 1fr; align-items: center; gap: var(--space-12); }

	.site-footer__grid { grid-template-columns: 2fr 3fr 2fr; }
	.toast-region,
	.woocommerce-notices-wrapper:has(.woocommerce-message) { inset: auto var(--gutter) var(--space-8) auto; }
}

/* --------------------------------------------------------------------------
   19. Reduced motion (§2, §3.7) — one global switch
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.btn.is-pending::after { animation: none; border-right-color: currentColor; opacity: 0.6; }
	.card:active,
	.btn:active { transform: none; }
}
