/* ==========================================================================
   Penguin Custom Shop — Apple-style design system (2026)
   Photography-first. One accent (orange). One product shadow. No gradients.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------ */
:root {
  /* Accent — single interactive color (trendy orange) + on-dark variant */
  --accent: #f0490d;
  --accent-focus: #ff5a1f;
  --accent-on-dark: #ff7a3c;
  --on-accent: #ffffff;

  /* Ink / text */
  --ink: #1d1d1f;
  --body: #1d1d1f;
  --body-on-dark: #ffffff;
  --body-muted: #cccccc;
  --ink-muted-80: #333333;
  --ink-muted-48: #7a7a7a;

  /* Surfaces — slightly warm off-whites to echo the wood/craft story */
  --canvas: #ffffff;
  --parchment: #f6f4f0;
  --pearl: #faf9f6;
  --tile-1: #272729;
  --tile-2: #2a2a2c;
  --tile-3: #252527;
  --black: #000000;
  --chip-translucent: rgba(210, 210, 215, 0.64);

  /* Hairlines */
  --divider-soft: rgba(0, 0, 0, 0.04);
  --hairline: #e0e0e0;
  --hairline-dark: rgba(255, 255, 255, 0.16);

  /* Type families */
  --font-display: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  --font-text: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;

  /* Spacing — 8px base */
  --sp-xxs: 4px;
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 17px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;
  --sp-section: 80px;

  /* Radii */
  --r-none: 0px;
  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 18px;
  --r-pill: 9999px;

  /* The single drop-shadow in the system — product imagery only */
  --shadow-product: 3px 5px 30px 0 rgba(0, 0, 0, 0.22);

  /* Nav heights */
  --global-nav-h: 52px;
  --sub-nav-h: 0px;
  color-scheme: light;
}

/* ---- Dark theme (token override; same accent, same single shadow) ------ */
:root[data-theme="dark"] {
  color-scheme: dark;

  /* On dark surfaces, the accent uses Apple's brighter on-dark orange. */
  --accent: #ff7a3c;
  --accent-focus: #ff8c54;
  --on-accent: #1d1d1f;

  /* Ink / text invert */
  --ink: #f5f5f7;
  --body: #f5f5f7;
  --body-muted: #a1a1a6;
  --ink-muted-80: #c7c7cc;
  --ink-muted-48: #8a8a8e;

  /* Surfaces: light tiles become true black, parchment becomes near-black */
  --canvas: #000000;
  --parchment: #1d1d1f;
  --pearl: #161617;
  --black: #000000;
  --chip-translucent: rgba(60, 60, 64, 0.7);

  /* Hairlines */
  --divider-soft: rgba(255, 255, 255, 0.08);
  --hairline: #333336;
  --hairline-dark: rgba(255, 255, 255, 0.16);

  /* Dark-on-dark needs a soft lift, not a hard cast shadow */
  --shadow-product: 0 18px 50px 0 rgba(0, 0, 0, 0.55);
}

/* ---- Reset ------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: var(--global-nav-h);
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--body);
  background: var(--canvas);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 2px; }

/* ---- Type utilities ---------------------------------------------------- */
.t-hero {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 56px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.t-display-lg {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.005em;
}
.t-lead {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.1px;
}
.t-lead-airy {
  font-family: var(--font-text);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 300;
  line-height: 1.5;
}
.t-tagline {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.231px;
}
.t-body-strong { font-weight: 600; letter-spacing: -0.374px; }
.t-caption {
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: -0.224px;
}
.t-eyebrow {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---- Layout helpers ---------------------------------------------------- */
.container { width: min(1440px, 100%); margin-inline: auto; padding-inline: clamp(22px, 5vw, 48px); }
.container-narrow { width: min(980px, 100%); margin-inline: auto; padding-inline: clamp(22px, 5vw, 48px); }

/* ---- Tiles (full-bleed; color change is the divider) ------------------- */
.tile {
  --tile-pad: clamp(22px, 5vw, 48px);
  padding-block: var(--sp-section);
  padding-inline: var(--tile-pad);
}
.tile--light { background: var(--canvas); color: var(--ink); }
.tile--parchment { background: var(--parchment); color: var(--ink); }
.tile--dark { background: var(--tile-1); color: var(--body-on-dark); }
.tile--dark-2 { background: var(--tile-2); color: var(--body-on-dark); }
.tile--dark-3 { background: var(--tile-3); color: var(--body-on-dark); }
.tile--black { background: var(--black); color: var(--body-on-dark); }

/* Theme-aware workshop surface: light in light mode, dark in dark mode.
   Local var overrides keep the workshop copy readable in either theme. */
.tile--workshop {
  background: var(--pearl);
  color: var(--ink);
  --body-muted: var(--ink-muted-80);
  --accent-on-dark: var(--accent);
}
:root[data-theme="dark"] .tile--workshop {
  background: var(--tile-1);
  color: var(--body-on-dark);
  --body-muted: #a1a1a6;
  --accent-on-dark: #ff7a3c;
}

/* Hairline only when two same-tone light tiles touch (keeps the divider). */
.tile--light + .tile--light,
.tile--parchment + .tile--parchment { border-top: 1px solid var(--divider-soft); }

.tile-stack { max-width: 980px; margin-inline: auto; text-align: center; }
.tile-stack > * + * { margin-top: var(--sp-lg); }
.tile-stack .t-lead { margin-top: var(--sp-sm); }

.tile-actions { display: inline-flex; gap: var(--sp-sm); justify-content: center; flex-wrap: wrap; }

.tile-figure { margin-top: var(--sp-xxl); }
.tile-figure img { margin-inline: auto; }
/* The single product shadow */
.product-shadow { filter: drop-shadow(var(--shadow-product)); }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-text);
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.95); }

.btn-pill {
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  letter-spacing: -0.374px;
  border-radius: var(--r-pill);
  padding: 11px 22px;
  min-height: 44px;
}
.btn-pill:hover { background: var(--accent-focus); }

.btn-pill-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-size: 17px;
  letter-spacing: -0.374px;
  border-radius: var(--r-pill);
  padding: 11px 22px;
  min-height: 44px;
}
.btn-pill-ghost:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

.btn-hero {
  font-size: 18px;
  font-weight: 300;
  padding: 14px 28px;
  line-height: 1;
}

.btn-utility {
  background: var(--ink);
  color: var(--body-on-dark);
  font-size: 14px;
  letter-spacing: -0.224px;
  border-radius: var(--r-sm);
  padding: 8px 15px;
}

/* Links use the single accent */
.link { color: var(--accent); }
.link:hover { text-decoration: underline; }
.on-dark .link, .link--on-dark { color: var(--accent-on-dark); }

/* ---- Global nav (slim, true black) ------------------------------------ */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--global-nav-h);
  background: var(--black);
  color: var(--body-on-dark);
}
.global-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  padding-inline: clamp(16px, 4vw, 32px);
}
.global-nav__logo { display: inline-flex; align-items: center; gap: 8px; }
.global-nav__logo img { width: 22px; height: 22px; border-radius: 50%; }
.global-nav__logo span {
  font-family: var(--font-text);
  font-size: 14px;
  letter-spacing: -0.14px;
  color: var(--body-on-dark);
}
.global-nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 30px); margin: 0; padding: 0; list-style: none; }
.global-nav__links a:not(.btn) {
  font-size: 14px;
  letter-spacing: -0.14px;
  color: var(--body-on-dark);
  opacity: 0.82;
  transition: opacity 0.15s ease;
}
.global-nav__links a:not(.btn):hover { opacity: 1; }
.global-nav__cta { font-size: 13px; padding: 7px 16px; min-height: 0; }

.global-nav__actions { display: flex; align-items: center; gap: var(--sp-sm); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--body-on-dark);
  opacity: 0.82;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.theme-toggle:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }
.theme-toggle:active { transform: scale(0.95); }
.theme-icon { display: none; }
.theme-icon--moon { display: block; }
:root[data-theme="dark"] .theme-icon--moon { display: none; }
:root[data-theme="dark"] .theme-icon--sun { display: block; }

.nav-toggle { display: none; }

/* ---- Hero 3D (scroll-pinned) ------------------------------------------ */
.hero3d {
  position: relative;
  background: var(--canvas);
  color: var(--ink);
  height: 320vh;            /* scroll length: 3-stage showcase */
}
.hero3d__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}
.hero3d__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero3d__canvas.is-loaded { opacity: 1; }

.hero3d__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(80px, 14vh, 160px);
  padding-inline: clamp(22px, 5vw, 48px);
  pointer-events: none;
  text-align: center;
}
.hero3d__copy { max-width: 820px; transition: opacity 0.4s ease; }
.hero3d__copy .t-lead { margin-top: var(--sp-md); color: var(--ink-muted-80); text-wrap: balance; }
.hero3d__copy [data-stage-title] { text-wrap: balance; }
.hero3d__actions {
  margin-top: var(--sp-lg);
  pointer-events: auto;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.hero3d__actions.is-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.hero3d__progress {
  position: absolute;
  left: 50%;
  bottom: clamp(28px, 6vh, 56px);
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.hero3d__progress span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink); opacity: 0.22;
  transition: opacity 0.3s ease, transform 0.3s ease, width 0.3s ease;
}
.hero3d__progress span.on { opacity: 0.9; transform: scale(1.25); }

.hero3d__scrollhint {
  position: absolute;
  right: clamp(22px, 5vw, 48px);
  bottom: clamp(28px, 6vh, 56px);
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted-48);
  animation: hero3d-hint 2.4s ease-in-out infinite;
  transition: opacity 0.35s ease;
}
.hero3d__scrollhint.is-hidden { opacity: 0; animation: none; }
@keyframes hero3d-hint { 0%,100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(6px); opacity: 1; } }

/* ---- Store head (featured section intro) ------------------------------ */
.store__head { max-width: 980px; margin: 0 auto var(--sp-xxl); text-align: center; }
.store__head .t-lead { margin-top: var(--sp-sm); color: var(--ink-muted-80); }

/* ---- Trust strip ------------------------------------------------------- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--sp-sm) var(--sp-lg);
  padding: var(--sp-md) clamp(22px, 5vw, 48px);
  background: var(--canvas);
  border-block: 1px solid var(--divider-soft);
}
.trust-strip__item {
  position: relative;
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-muted-80);
}
.trust-strip__item + .trust-strip__item::before {
  content: "";
  position: absolute;
  left: calc(var(--sp-lg) / -2);
  top: 50%;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

/* ---- Featured products (editorial evidence ladder) -------------------- */
.featured { display: grid; gap: clamp(48px, 8vw, 96px); max-width: 1200px; margin-inline: auto; }
/* Named areas keep each product's photos and copy locked into one row, even
   if a product ever renders an extra element. Alternating products flip which
   side the media sits on. */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "media copy";
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.feature:nth-child(even) { grid-template-areas: "copy media"; }
.feature__media { grid-area: media; }
.feature__copy { grid-area: copy; }
.feature__media { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--pearl); }
.feature__media img {
  width: 100%;
  aspect-ratio: var(--feature-ratio, 4 / 3);
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.feature:hover .feature__media img { transform: scale(1.03); }
/* Finish swap: incoming picture fades in over the current one. */
.feature__media-swap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.feature__media-swap.is-in { opacity: 1; }
.feature__media-swap img { height: 100%; }

/* ---- Product angle carousel ------------------------------------------- */
.carousel { position: relative; }
.carousel__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  touch-action: pan-y;
}
.carousel__cell { position: relative; flex: 0 0 100%; }
.carousel__cell img {
  width: 100%;
  aspect-ratio: var(--feature-ratio, 4 / 3);
  object-fit: cover;
  display: block;
}
.carousel__dots {
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  display: flex;
  gap: 7px;
  justify-content: center;
  z-index: 2;
}
.carousel__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel__dot.is-active { background: #fff; transform: scale(1.25); }
.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
}
.carousel:hover .carousel__arrow { opacity: 1; }
.carousel__arrow:hover { background: #fff; }
.carousel__arrow--prev { left: 12px; }
.carousel__arrow--next { right: 12px; }
@media (hover: none) {
  .carousel__arrow { display: none; }
}
.feature__status {
  display: inline-flex;
  align-items: center;
  margin-top: var(--sp-xs);
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: -0.1px;
  color: var(--ink-muted-80);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.feature__status--sold {
  color: var(--ink-muted-48);
}
.feature__status--soon {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--hairline));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.feature__title { margin-top: var(--sp-xs); }
.btn-pill:disabled,
.btn-pill.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-pill:disabled:hover,
.btn-pill.is-disabled:hover { background: var(--accent); }
.btn-pill:disabled:active,
.btn-pill.is-disabled:active { transform: none; }
.feature__bullets { margin-top: var(--sp-md); display: grid; gap: var(--sp-xs); }
.feature__bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-muted-80);
  line-height: 1.4;
}
.feature__bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.feature__meta {
  margin-top: var(--sp-md);
  font-family: var(--font-text);
  font-size: 14px;
  letter-spacing: -0.1px;
  color: var(--ink-muted-48);
}
.feature__actions {
  margin-top: var(--sp-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-sm);
}
.feature__price {
  margin: 0;
  font-family: var(--font-text);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.35px;
  line-height: 1.15;
  color: var(--ink);
}
.feature__btns { justify-content: flex-start; }

/* ---- Finish swatches (display-only variant selector) ------------------ */
.swatches { display: flex; flex-direction: column; gap: var(--sp-xs); margin-top: var(--sp-lg); }
.swatches__name { font-size: 13px; letter-spacing: -0.2px; color: var(--ink-muted-80); }
.swatches__chips { display: inline-flex; gap: var(--sp-sm); }
.swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px var(--divider-soft);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.15s ease, transform 0.15s ease;
}
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { outline-color: var(--accent); }

/* ---- Workshop (editorial, pinned-free scroll) ------------------------- */
.workshop__head { max-width: 980px; margin: 0 auto var(--sp-xxl); text-align: center; }
.workshop__head .t-lead-airy { margin-top: var(--sp-md); color: var(--body-muted); }

.workshop-steps { display: grid; gap: var(--sp-xxl); max-width: 1200px; margin-inline: auto; }
.workshop-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.workshop-step:nth-child(even) .workshop-step__media { order: 2; }
.workshop-step__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.workshop-step__num {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--accent-on-dark);
}
.workshop-step__title { margin-top: var(--sp-xs); }
.workshop-step__text { margin-top: var(--sp-sm); color: var(--body-muted); max-width: 46ch; }
.workshop-rail-hint { display: none; }

/* ---- Gallery (grouped by category) ------------------------------------- */
.gallery__head { max-width: 980px; margin: 0 auto var(--sp-xl); text-align: center; }
.gallery-groups { display: grid; gap: var(--sp-xxl); }
.gallery-group__title {
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--hairline);
}

.gallery-masonry { columns: 3; column-gap: var(--sp-lg); }
.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--sp-lg);
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  width: 100%;
}
/* Natural ratio — no forced crop, so nothing looks cut off before opening. */
.gallery-item img { width: 100%; height: auto; display: block; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.03); }

/* ---- Contact ----------------------------------------------------------- */
.contact { text-align: center; }
.contact .t-lead { margin-top: var(--sp-md); color: var(--body-muted); max-width: 52ch; margin-inline: auto; }
.contact__actions { margin-top: var(--sp-lg); }
.contact__loc { margin-top: var(--sp-lg); color: var(--body-muted); }

/* ---- Footer (dense) ---------------------------------------------------- */
.footer {
  background: var(--parchment);
  color: var(--ink-muted-80);
  padding-block: 64px;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-xl);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: var(--sp-xl);
}
.footer__col h4 {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.224px;
  color: var(--ink);
  margin-bottom: var(--sp-xs);
}
.footer__col a { display: block; font-size: 14px; line-height: 2.1; color: var(--ink-muted-80); }
.footer__col a:hover { color: var(--accent); }
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm) var(--sp-lg);
  justify-content: space-between;
  padding-top: var(--sp-lg);
  font-size: 12px;
  letter-spacing: -0.12px;
  color: var(--ink-muted-48);
}

/* ---- Lightbox ---------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__viewport { width: 100%; height: 100%; overflow: hidden; }
.lightbox__track {
  display: flex;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  touch-action: pan-y;
  will-change: transform;
}
.lightbox__cell {
  flex: 0 0 100%;
  display: grid;
  place-items: center;
  padding: var(--sp-lg);
}
.lightbox__cell img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--r-sm);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-close {
  position: absolute;
  top: var(--sp-lg);
  right: var(--sp-lg);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--chip-translucent);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--chip-translucent);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.lightbox-arrow[hidden] { display: none; }
.lightbox-arrow--prev { left: var(--sp-lg); }
.lightbox-arrow--next { right: var(--sp-lg); }

/* ---- Image fade-in on load -------------------------------------------- */
img.img-fade { opacity: 0; transition: opacity 0.6s ease; }
img.img-fade.loaded { opacity: 1; }

/* ---- Scroll reveal ----------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 1068px) {
  .gallery-masonry { columns: 2; }
}

@media (max-width: 833px) {
  :root { --sp-section: 56px; }
  /* Collapse the link list into the drawer; the sticky bottom bar carries the
     persistent Inquire CTA on mobile. */
  .global-nav__links { display: none; }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
  }
  .nav-toggle span { width: 22px; height: 1.5px; background: var(--body-on-dark); display: block; transition: transform 0.3s ease, opacity 0.3s ease; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .global-nav__links.open {
    display: flex;
    position: fixed;
    inset: var(--global-nav-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--black);
    padding: var(--sp-md) clamp(16px, 4vw, 32px) var(--sp-lg);
  }
  .global-nav__links.open li { width: 100%; }
  .global-nav__links.open a:not(.btn) { display: block; padding-block: 12px; font-size: 17px; width: 100%; border-bottom: 1px solid var(--hairline-dark); }
  .global-nav__links.open .global-nav__cta { margin-top: var(--sp-md); width: 100%; }

  /* Hero: taller scroll runway + tighter copy so the board owns the lower half */
  .hero3d { height: 280vh; }
  .hero3d__overlay { padding: 0 5vw 8vh; }
  .hero3d__overlay {
    padding-top: calc(var(--global-nav-h) + 18px);
    justify-content: flex-start;
  }
  .hero3d__copy { max-width: 22rem; }
  .hero3d__copy .t-hero { font-size: clamp(32px, 9vw, 44px); }
  .hero3d__copy .t-lead { font-size: 16px; margin-top: var(--sp-sm); }
  .hero3d__actions { margin-top: var(--sp-md); }
  .hero3d__progress {
    bottom: calc(72px + env(safe-area-inset-bottom));
    gap: 8px;
  }
  .hero3d__progress span {
    width: 18px; height: 3px; border-radius: 99px; transform: none;
  }
  .hero3d__progress span.on { transform: none; width: 28px; opacity: 1; }
  .hero3d__scrollhint {
    left: 50%;
    right: auto;
    bottom: calc(40px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
  }

  /* Workshop: horizontal snap cards (story reel) */
  .workshop-steps {
    display: flex;
    gap: 14px;
    max-width: none;
    margin-inline: calc(var(--tile-pad, 22px) * -1);
    padding-inline: var(--tile-pad, 22px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--tile-pad, 22px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .workshop-steps::-webkit-scrollbar { display: none; }
  .workshop-step {
    flex: 0 0 min(82vw, 340px);
    grid-template-columns: 1fr;
    gap: var(--sp-md);
    scroll-snap-align: center;
    align-content: start;
  }
  .workshop-step:nth-child(even) .workshop-step__media { order: 0; }
  .workshop-step__media img { aspect-ratio: 4 / 3; border-radius: var(--r-lg); }
  .workshop-step__title { font-size: clamp(28px, 7vw, 36px); }
  .workshop-step__text { max-width: none; font-size: 15px; }
  .workshop-rail-hint {
    display: block;
    margin: 0 auto var(--sp-md);
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--body-muted);
  }

  /* Gallery: tidy 2-column masonry, natural ratios (no forced crop) */
  .gallery-groups { gap: var(--sp-xl); }
  .gallery-masonry { columns: 2; column-gap: 12px; }
  .gallery-item {
    margin-bottom: 12px;
    border-radius: var(--r-md);
  }
  .gallery-item img { aspect-ratio: auto; height: auto; object-fit: contain; }

  /* On touch, swipe drives navigation; keep the arrows out of the way. */
  .lightbox-arrow { display: none; }

  .feature,
  .feature:nth-child(even) {
    grid-template-columns: 1fr;
    grid-template-areas: "media" "copy";
    gap: var(--sp-lg);
  }
  .feature__actions { align-items: center; }
  .feature__btns { justify-content: center; width: 100%; }

  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --sp-section: 48px; }
  .tile-actions { flex-direction: column; width: 100%; }
  .tile-actions .btn { width: 100%; }
  .feature__price { font-size: 20px; }
  .hero3d__actions { width: min(100%, 280px); margin-inline: auto; }
}

/* ---- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero3d { height: 100vh; }
  .hero3d__scrollhint { display: none; }
}

/* ==========================================================================
   Chat concierge widget
   ========================================================================== */
.chat-bubble {
  position: fixed;
  right: clamp(16px, 4vw, 28px);
  bottom: clamp(16px, 4vw, 28px);
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.chat-bubble:hover { transform: translateY(-2px); background: var(--accent-focus); }
.chat-bubble__icon { font-size: 18px; line-height: 1; }
.chat-bubble.is-hidden { opacity: 0; transform: scale(0.6); pointer-events: none; }

.chat-panel {
  position: fixed;
  right: clamp(16px, 4vw, 28px);
  bottom: clamp(16px, 4vw, 28px);
  z-index: 121;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 56px));
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.chat-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }

.chat-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--pearl);
}
.chat-panel__id { display: flex; align-items: center; gap: 10px; }
.chat-panel__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #2fbf4e;
  box-shadow: 0 0 0 3px rgba(47, 191, 78, 0.18);
}
.chat-panel__title { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.chat-panel__sub { font-size: 12px; color: var(--ink-muted-48); }
.chat-panel__close {
  font-size: 24px; line-height: 1; color: var(--ink-muted-48);
  width: 32px; height: 32px; border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}
.chat-panel__close:hover { background: var(--divider-soft); color: var(--ink); }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg { display: flex; }
.chat-msg--user { justify-content: flex-end; }
.chat-bubble-text {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg--assistant .chat-bubble-text {
  background: var(--parchment);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.chat-msg--user .chat-bubble-text {
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-right-radius: 6px;
}
.chat-typing .chat-bubble-text { display: inline-flex; gap: 4px; padding: 14px; }
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-muted-48);
  animation: chat-blink 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chat-blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--hairline);
}
.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font-family: var(--font-text);
  font-size: 14px;
  background: var(--canvas);
  color: var(--ink);
}
.chat-input:focus { outline: none; border-color: var(--accent); }
.chat-send {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 18px;
  transition: background 0.15s ease;
}
.chat-send:hover { background: var(--accent-focus); }
.chat-foot {
  padding: 0 12px 12px;
  font-size: 12px;
  color: var(--ink-muted-48);
  text-align: center;
}
.chat-foot a { color: var(--accent); }
.chat-copy {
  font-size: 12px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-copy--inline { margin-left: 4px; }

.contact__email { margin-top: var(--sp-md); color: var(--body-muted); }
.contact__email a { color: var(--accent-on-dark); }

/* Dark theme */
:root[data-theme="dark"] .chat-panel {
  background: var(--tile-1);
  color: var(--body-on-dark);
  border-color: var(--hairline-dark);
}
:root[data-theme="dark"] .chat-panel__head { background: var(--tile-2); border-color: var(--hairline-dark); }
:root[data-theme="dark"] .chat-panel__title { color: #fff; }
:root[data-theme="dark"] .chat-msg--assistant .chat-bubble-text { background: var(--tile-3); color: var(--body-on-dark); }
:root[data-theme="dark"] .chat-form { border-color: var(--hairline-dark); }
:root[data-theme="dark"] .chat-input { background: var(--tile-2); color: #fff; border-color: var(--hairline-dark); }
:root[data-theme="dark"] .chat-panel__close:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Mobile: bottom sheet */
@media (max-width: 640px) {
  .chat-panel {
    right: 0; left: 0; bottom: 0;
    width: 100%;
    height: 86vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-bottom: none;
  }
}

/* ==========================================================================
   Size options + prices (featured cards)
   ========================================================================== */
.sizes { display: flex; flex-direction: column; gap: var(--sp-xs); margin-top: var(--sp-md); }
.sizes__head { display: flex; align-items: baseline; gap: var(--sp-sm); }
.sizes__label { font-size: 13px; letter-spacing: -0.2px; color: var(--ink-muted-80); }
.sizes__price {
  margin-left: auto;
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.1px;
  color: var(--ink-muted-80);
}
.sizes__chips { display: inline-flex; flex-wrap: wrap; gap: 8px; }

.size-chip {
  padding: 7px 14px;
  min-height: 36px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font-family: var(--font-text);
  font-size: 14px;
  letter-spacing: -0.15px;
  color: var(--ink-muted-80);
  background: transparent;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.size-chip:hover { border-color: var(--ink-muted-48); color: var(--ink); }
.size-chip:active { transform: scale(0.96); }
.size-chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.size-chip:disabled,
.size-chip.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.size-chip:disabled:hover,
.size-chip.is-disabled:hover { border-color: var(--hairline); color: var(--ink-muted-80); }
.size-chip:disabled:active,
.size-chip.is-disabled:active { transform: none; }
/* The custom option is an anchor that links straight to the builder page. */
.size-chip--custom {
  border-style: dashed;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* ==========================================================================
   Create your board (builder page)
   ========================================================================== */
.builder-hero {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) clamp(22px, 5vw, 48px) clamp(16px, 3vw, 32px);
  text-align: center;
}
.builder-hero .t-lead { margin-top: var(--sp-sm); color: var(--ink-muted-80); }

/* Board / Bag mode switch */
.mode-switch {
  margin-top: var(--sp-md);
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}
:root[data-theme="dark"] .mode-switch { border-color: var(--hairline-dark); }
.mode-switch__btn {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--font-text);
  font-size: 14px;
  letter-spacing: -0.1px;
  color: var(--ink-muted-80);
  padding: 7px 26px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.mode-switch__btn:hover { color: var(--ink); }
.mode-switch__btn.is-active { background: var(--accent); color: var(--on-accent); }
.mode-switch[hidden],
.mode-switch__btn[hidden],
.bstep[hidden] { display: none !important; }

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  max-width: 1280px;
  margin-inline: auto;
  padding: var(--sp-lg) clamp(22px, 5vw, 48px) var(--sp-section);
}

.builder__preview {
  position: sticky;
  top: calc(var(--global-nav-h) + 20px);
}
.preview-card {
  position: relative;
  background: var(--pearl);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(16px, 2.5vw, 28px);
}
.preview-brand {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}
.preview-card svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56vh;
  margin-inline: auto;
}
.preview-card svg text { font-family: var(--font-text); letter-spacing: 0.02em; }
.preview-card.is-placing svg { touch-action: none; cursor: crosshair; }
.preview-card [data-item] { cursor: pointer; }
.preview-hint {
  margin-top: var(--sp-sm);
  min-height: 20px;
  font-size: 13px;
  letter-spacing: -0.1px;
  text-align: center;
  color: var(--ink-muted-48);
}
.preview-hint.is-live { color: var(--accent); }

/* Steps */
.builder__steps { display: grid; }
.bstep { padding-block: var(--sp-lg); }
.bstep + .bstep { border-top: 1px solid var(--hairline); }
.bstep__num {
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.bstep__title {
  margin-top: var(--sp-xxs);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.bstep__note { margin-top: var(--sp-xs); font-size: 14px; color: var(--ink-muted-48); max-width: 52ch; }
.bstep__note.is-live { color: var(--accent); }
.bstep__row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-md); align-items: center; }

/* Dimension fields */
.dim-fields { display: flex; gap: var(--sp-md); margin-top: var(--sp-md); }
.dim-field { display: flex; flex-direction: column; gap: 6px; }
.dim-field label { font-size: 13px; color: var(--ink-muted-80); }
.dim-field .dim-input-wrap { display: flex; align-items: center; gap: 8px; }
.dim-field input {
  width: 96px;
  padding: 10px 12px;
  font-family: var(--font-text);
  font-size: 16px;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
}
.dim-field input:focus { outline: none; border-color: var(--accent); }
.dim-field .dim-unit { font-size: 14px; color: var(--ink-muted-48); }

/* Finish groups */
.finish-group { margin-top: var(--sp-md); }
.finish-group__label { font-size: 13px; color: var(--ink-muted-80); margin-bottom: var(--sp-xs); }
.finish-chips { display: inline-flex; flex-wrap: wrap; gap: var(--sp-sm); }
.finish-chips .swatch { width: 30px; height: 30px; }
.finish-name { margin-top: var(--sp-xs); font-size: 13px; color: var(--ink-muted-80); }

/* Artwork */
.art-note { margin-top: var(--sp-sm); font-size: 13px; color: var(--ink-muted-48); max-width: 48ch; }
.art-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.art-thumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--sp-sm);
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--ink-muted-80);
}
.art-thumb[hidden] { display: none; }
.art-thumb img { width: 44px; height: 33px; object-fit: cover; border-radius: var(--r-xs); }

/* Placed item lists */
.placed-list { display: grid; gap: 6px; margin-top: var(--sp-sm); }
.placed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-muted-80);
}
.placed-item button { font-size: 13px; color: var(--accent); }
.placed-item button:hover { text-decoration: underline; }

/* Summary */
.spec-list { display: grid; gap: 8px; margin-top: var(--sp-md); }
.spec-list > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--sp-sm);
  font-size: 15px;
}
.spec-list dt { color: var(--ink-muted-48); }
.spec-list dd { color: var(--ink); }
.builder-cta { margin-top: var(--sp-lg); display: flex; flex-wrap: wrap; gap: var(--sp-sm); }
.builder-cta-note { margin-top: var(--sp-sm); font-size: 13px; font-weight: 600; color: var(--accent); }
.builder-foot-note { margin-top: var(--sp-md); font-size: 13px; color: var(--ink-muted-48); }

@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; padding-top: var(--sp-sm); }
  .builder__preview {
    top: var(--global-nav-h);
    z-index: 20;
    background: var(--canvas);
    padding-block: var(--sp-sm);
  }
  .preview-card { padding: 12px; border-radius: var(--r-md); }
  .preview-card svg { max-height: 34vh; }
  .dim-fields { flex-wrap: wrap; }
  .spec-list > div { grid-template-columns: 110px 1fr; font-size: 14px; }
  .builder-cta .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   Cart — nav button, slide in drawer (bottom sheet on mobile)
   ========================================================================== */
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--body-on-dark);
  opacity: 0.82;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.nav-cart:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }
.nav-cart:active { transform: scale(0.95); }
.nav-cart__badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}
:root[data-theme="dark"] .nav-cart__badge { color: #1d1d1f; }

.cart-scrim {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.44);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.cart-scrim.is-open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 151;
  width: min(420px, calc(100vw - 44px));
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.22);
  transform: translateX(103%);
  visibility: hidden;
  transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.34s;
}
.cart-drawer.is-open { transform: none; visibility: visible; }

.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding: 18px 22px;
  border-bottom: 1px solid var(--hairline);
}
.cart-drawer__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.cart-drawer__count { color: var(--ink-muted-48); font-weight: 400; font-size: 17px; }
.cart-drawer__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-muted-48);
  transition: background 0.15s ease, color 0.15s ease;
}
.cart-drawer__close:hover { background: var(--divider-soft); color: var(--ink); }

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 22px;
  overscroll-behavior: contain;
}

.cart-empty { text-align: center; padding: 56px 12px; }
.cart-empty__title { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.cart-empty__sub { margin: var(--sp-sm) auto var(--sp-lg); font-size: 14px; color: var(--ink-muted-48); max-width: 30ch; }

.cart-line {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: var(--sp-md);
  padding-block: var(--sp-md);
}
.cart-line + .cart-line { border-top: 1px solid var(--divider-soft); }
.cart-line__thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--pearl);
  border: 1px solid var(--divider-soft);
  display: grid;
  place-items: center;
}
.cart-line__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__thumb--spec svg { width: 88%; height: 88%; }
.cart-line__thumb--blank { color: var(--ink-muted-48); }
.cart-line__info { min-width: 0; }
.cart-line__title { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.cart-line__meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-muted-48);
  letter-spacing: -0.1px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cart-line__price { margin-top: 5px; font-size: 14px; font-weight: 600; }
.cart-line__review {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0;
}
.cart-line__row { display: flex; align-items: center; gap: var(--sp-md); margin-top: var(--sp-sm); }
.cart-line__remove { font-size: 13px; color: var(--ink-muted-48); text-decoration: underline; text-underline-offset: 2px; }
.cart-line__remove:hover { color: var(--ink); }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.qty-stepper button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--ink-muted-80);
  transition: background 0.15s ease, color 0.15s ease;
}
.qty-stepper button:hover { background: var(--divider-soft); color: var(--ink); }
.qty-stepper__n { min-width: 26px; text-align: center; font-size: 14px; font-weight: 600; }

.cart-drawer__foot {
  padding: var(--sp-md) 22px calc(var(--sp-md) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
}
.cart-drawer__foot:empty { display: none; }
.cart-foot__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 15px;
}
.cart-foot__row b { font-size: 17px; letter-spacing: -0.3px; }
.cart-foot__note { margin-top: var(--sp-xs); font-size: 12.5px; color: var(--ink-muted-48); line-height: 1.45; }
.cart-foot__checkout { width: 100%; margin-top: var(--sp-sm); }

@media (max-width: 640px) {
  .cart-drawer {
    top: auto;
    left: 0;
    width: 100%;
    height: min(82vh, 640px);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateY(103%);
    box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.28);
  }
  .cart-drawer.is-open { transform: none; }
}

/* Add to cart on product cards */
.addcart-hint {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.addcart-hint.is-on { opacity: 1; transform: none; }
.sizes.is-attention .sizes__label { color: var(--accent); }
.sizes.is-attention .size-chip:not(.is-active):not(.size-chip--custom) { border-color: var(--accent); }

/* ==========================================================================
   Checkout
   ========================================================================== */
.checkout-hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) clamp(22px, 5vw, 48px) clamp(8px, 2vw, 20px);
}
.checkout-hero .t-lead { margin-top: var(--sp-xs); color: var(--ink-muted-48); font-size: 17px; }

.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  max-width: 1160px;
  margin-inline: auto;
  padding: var(--sp-md) clamp(22px, 5vw, 48px) var(--sp-section);
}

.co-block { padding-block: var(--sp-lg); }
.co-block + .co-block { border-top: 1px solid var(--hairline); }
.co-block__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.co-block__note { margin-top: var(--sp-xs); font-size: 14px; color: var(--ink-muted-48); max-width: 56ch; line-height: 1.5; }
/* Rules that change what the customer can pick, so they read louder. */
.co-block__note--flag {
  margin-top: var(--sp-sm);
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--ink-muted-80);
}
.pay-option[hidden] { display: none; }

.co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); margin-top: var(--sp-md); }
.co-field { display: flex; flex-direction: column; gap: 6px; }
.co-field--full { grid-column: 1 / -1; }
.co-field label { font-size: 13px; font-weight: 600; color: var(--ink-muted-80); letter-spacing: -0.1px; }
.co-field label span { font-weight: 400; color: var(--ink-muted-48); }
.co-field input,
.co-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-text);
  font-size: 16px;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  transition: border-color 0.15s ease;
}
.co-field textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.co-field input:focus,
.co-field textarea:focus { outline: none; border-color: var(--accent); }
.co-field.is-invalid input,
.co-field.is-invalid textarea { border-color: #d0301f; }
.co-field__err { font-size: 12.5px; color: #d0301f; display: none; }
.co-field.is-invalid .co-field__err { display: block; }

/* Payment step (isolated so a gateway can replace it later) */
.pay-options { display: grid; gap: 10px; margin-top: var(--sp-md); }
.pay-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.pay-option:hover { border-color: var(--ink-muted-48); }
.pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-option__dot {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease;
}
.pay-option__dot::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.15s ease;
}
.pay-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.pay-option:has(input:checked) .pay-option__dot { border-color: var(--accent); }
.pay-option:has(input:checked) .pay-option__dot::after { transform: scale(1); }
.pay-option b { font-size: 15px; font-weight: 600; display: block; }
.pay-option p { margin-top: 2px; font-size: 13px; color: var(--ink-muted-48); line-height: 1.45; }

.co-submit { margin-top: var(--sp-lg); }
.co-submit .btn { width: 100%; font-size: 18px; padding: 15px 28px; }
.co-error {
  display: none;
  margin-top: var(--sp-sm);
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, #d0301f 8%, transparent);
  color: #d0301f;
  font-size: 14px;
  font-weight: 600;
}
.co-error.is-on { display: block; }

/* Order summary (sticky on desktop, collapsible on mobile) */
.checkout__aside { position: sticky; top: calc(var(--global-nav-h) + 24px); }
.order-summary {
  background: var(--pearl);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.order-summary__toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.order-summary__toggle .chev { transition: transform 0.2s ease; color: var(--ink-muted-48); }
.order-summary.is-open .order-summary__toggle .chev { transform: rotate(180deg); }
.order-summary__inner { padding: 20px; }
.order-summary__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}
.sum-line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-block: 10px;
}
.sum-line + .sum-line { border-top: 1px solid var(--divider-soft); }
.sum-line__thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--canvas);
  border: 1px solid var(--divider-soft);
  display: grid;
  place-items: center;
}
.sum-line__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sum-line__thumb svg { width: 86%; height: 86%; }
.sum-line__qty {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 11px;
  font-weight: 700;
}
.sum-line__title { font-size: 14px; font-weight: 600; letter-spacing: -0.15px; }
.sum-line__meta {
  font-size: 12px;
  color: var(--ink-muted-48);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sum-line__price { font-size: 13px; font-weight: 600; white-space: nowrap; }
.sum-line__price .review { font-size: 11px; color: var(--accent); font-weight: 600; }

.order-summary__totals { margin-top: var(--sp-sm); padding-top: var(--sp-sm); border-top: 1px solid var(--hairline); }
.order-summary__totals .cart-foot__row { font-size: 14px; }
.order-summary__totals .cart-foot__row b { font-size: 18px; }

/* Confirmation state */
.co-confirm { text-align: center; max-width: 560px; margin: 0 auto; padding: clamp(40px, 8vw, 88px) 22px var(--sp-section); }
.co-confirm__mark {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sp-lg);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.co-confirm__no {
  display: inline-block;
  margin-top: var(--sp-md);
  padding: 8px 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.co-confirm__lead { margin-top: var(--sp-md); color: var(--ink-muted-80); }
.co-next { margin-top: var(--sp-xl); text-align: left; display: grid; gap: var(--sp-md); }
.co-next__step { display: flex; gap: 14px; align-items: flex-start; }
.co-next__num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pearl);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.co-next__step p { font-size: 15px; color: var(--ink-muted-80); line-height: 1.5; padding-top: 2px; }
.co-confirm .tile-actions { margin-top: var(--sp-xl); }

.checkout-empty { text-align: center; padding: clamp(48px, 10vw, 120px) 22px; }
.checkout-empty .t-lead { margin-top: var(--sp-sm); color: var(--ink-muted-48); font-size: 17px; }
.checkout-empty .btn { margin-top: var(--sp-lg); }

@media (max-width: 900px) {
  .checkout { grid-template-columns: 1fr; gap: var(--sp-md); }
  /* Summary first, collapsed behind a toggle, like Shopify mobile checkout. */
  .checkout__aside { position: static; order: -1; }
  .order-summary__toggle { display: flex; }
  .order-summary__inner { display: none; padding-top: 0; }
  .order-summary.is-open .order-summary__inner { display: block; }
  .order-summary__title { display: none; }
  .co-grid { grid-template-columns: 1fr; }
}

/* ---- Crowdfunding -------------------------------------------------------- */
.campaign-banner {
  margin-top: var(--sp-md);
  max-width: 42rem;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.tile--crowdfund {
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    var(--canvas);
  padding-block: clamp(48px, 8vw, 96px);
}
.crowdfund-teaser {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 22px;
}
.crowdfund-teaser__copy .t-lead { margin-top: var(--sp-sm); color: var(--ink-muted-80); }
.crowdfund-teaser__media {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--pearl);
}
.crowdfund-teaser__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.progress-block { margin-top: var(--sp-lg); max-width: 28rem; }
.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  overflow: hidden;
}
.progress-bar__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.5s ease;
}
.progress-block__meta,
.progress-block__supporters {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-muted-80);
  font-weight: 600;
}
.progress-block__supporters { color: var(--ink-muted-48); font-weight: 500; }

.crowdfund-page {
  max-width: 1120px;
  margin-inline: auto;
  padding: calc(var(--global-nav-h) + 32px) 22px 80px;
}
.crowdfund-state { padding-block: clamp(48px, 10vw, 100px); max-width: 36rem; }
.crowdfund-state .tile-actions { margin-top: var(--sp-lg); }
.crowdfund-hero .t-lead { margin-top: var(--sp-sm); color: var(--ink-muted-80); max-width: 48ch; }
.crowdfund-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 4vw, 48px);
  margin-top: var(--sp-xl);
  align-items: start;
}
.crowdfund-media {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--pearl);
  aspect-ratio: 4 / 3;
}
.crowdfund-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.crowdfund-media__blank { width: 100%; height: 100%; background: var(--pearl); }
.crowdfund-aside {
  position: sticky;
  top: calc(var(--global-nav-h) + 24px);
  display: grid;
  gap: var(--sp-md);
}
.crowdfund-price__supporter {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.crowdfund-price__base { font-size: 14px; color: var(--ink-muted-48); }
.crowdfund-note { font-size: 13px; color: var(--ink-muted-48); line-height: 1.5; }
.crowdfund-story { margin-top: clamp(48px, 8vw, 88px); max-width: 42rem; }
.crowdfund-story__body { margin-top: var(--sp-md); color: var(--ink-muted-80); font-size: 17px; line-height: 1.65; }
.crowdfund-story__body p + p { margin-top: 1em; }

@media (max-width: 900px) {
  .crowdfund-teaser,
  .crowdfund-layout { grid-template-columns: 1fr; }
  .crowdfund-aside { position: static; }
  .crowdfund-teaser__media { order: -1; }
}
