/* ==========================================================================
   The Slate Coaster Company - site stylesheet
   Black is the foundation. Gold is earned, not default. Warm neutrals, not cold.
   Tokens lifted from the brand design system.
   ========================================================================== */

/* --- Colour ------------------------------------------------------------- */
:root {
  --color-gold: #C4B487;
  --color-black: #000000;
  --color-white: #FFFFFF;

  --color-fog:   #E9E5DC;
  --color-ash:   #A8A297;
  --color-stone: #6E695F;
  --color-slate: #34322D;
  --color-onyx:  #1C1B18;
  --color-ink:   #0E0E0D;

  --color-gold-soft:  #D6C9A3;
  --color-gold-deep:  #A99B6E;
  --color-gold-faint: rgba(196,180,135,0.14);

  --color-background:     var(--color-black);
  --color-surface:        var(--color-onyx);
  --color-surface-raised: var(--color-slate);
  --color-border:         var(--color-slate);
  --color-border-strong:  var(--color-stone);
  --color-text-primary:   var(--color-white);
  --color-text-secondary: var(--color-ash);
  --color-text-muted:     var(--color-stone);
  --color-text-on-gold:   var(--color-ink);
  --color-accent:         var(--color-gold);

  --color-positive: #8A9A6B;
  --color-notice:   var(--color-gold);
  --color-danger:   #B5654A;

  --focus-ring: 0 0 0 3px var(--color-gold-faint), 0 0 0 1px var(--color-gold);

  /* --- Type --- */
  --font-display: 'Poppins', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-extrabold: 800;

  --text-display: clamp(38px, 5vw, 64px);
  --text-h1: 2.5rem;
  --text-h2: 2rem;
  --text-h3: 1.5rem;
  --text-body-lg: 1.125rem;
  --text-body: 1rem;
  --text-caption: 0.8125rem;
  --text-micro: 0.6875rem;

  --leading-tight: 1.05;
  --leading-snug: 1.25;
  --leading-normal: 1.55;

  --tracking-wordmark: 0.26em;
  --tracking-caps: 0.16em;
  --tracking-eyebrow: 0.22em;

  /* --- Space / layout --- */
  --space-1: 0.25rem; --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;    --space-5: 1.5rem;  --space-6: 2rem;
  --space-7: 3rem;    --space-8: 4rem;    --space-9: 6rem;  --space-10: 8rem;

  --radius-xs: 2px; --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-pill: 999px;
  --line-hair: 1px;

  --container-max: 1180px;

  /* --- Effect --- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.45);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.55);
  --shadow-lg: 0 18px 48px rgba(0,0,0,0.6);
  --glow-gold: 0 0 0 1px rgba(196,180,135,0.35), 0 8px 30px rgba(196,180,135,0.10);
  --keyline: var(--line-hair) solid var(--color-border);
  --keyline-strong: var(--line-hair) solid var(--color-border-strong);
  --keyline-gold: var(--line-hair) solid var(--color-gold);

  --ease-standard: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms; --dur-base: 200ms; --dur-slow: 360ms;
}

/* --- Reset ------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--color-background);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--color-gold); text-decoration: none; transition: color var(--dur-fast) var(--ease-standard); }
a:hover { color: var(--color-gold-soft); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--color-text-primary); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: 0.01em; }
::selection { background: var(--color-gold); color: var(--color-ink); }

/* --- Layout helpers -------------------------------------------------- */
.container { max-width: var(--container-max); margin: 0 auto; padding-inline: var(--space-6); width: 100%; }
.section { padding-block: var(--space-9); }
.section--tight { padding-block: var(--space-7); }
.section--edge { border-block: var(--keyline); }
.section--ink { background: var(--color-ink); }
.stack > * + * { margin-top: var(--space-4); }
.flow > * + * { margin-top: var(--space-6); }
.site-main { flex: 1 0 auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-body); font-weight: var(--weight-semibold);
  font-size: var(--text-caption); letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--color-gold);
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--color-gold); display: block; }
.eyebrow--plain::before { display: none; }

.lede { font-size: var(--text-body-lg); line-height: var(--leading-normal); color: var(--color-text-secondary); max-width: 46ch; }
.muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* --- Buttons (from the DS Button spec) ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 22px;
  font-family: var(--font-body); font-weight: var(--weight-semibold);
  font-size: var(--text-body); letter-spacing: 0.02em;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn--primary { background: var(--color-gold); color: var(--color-text-on-gold); border-color: var(--color-gold); }
.btn--primary:hover { background: var(--color-gold-soft); color: var(--color-text-on-gold); }
.btn--secondary { background: transparent; color: var(--color-text-primary); border-color: var(--color-border-strong); }
.btn--secondary:hover { border-color: var(--color-gold); color: var(--color-gold); }
.btn--ghost { background: transparent; color: var(--color-text-secondary); border-color: transparent; }
.btn--ghost:hover { color: var(--color-text-primary); }
.btn--danger { background: transparent; color: var(--color-danger); border-color: var(--color-danger); }
.btn--danger:hover { background: rgba(181,101,74,0.12); }
.btn--lg { min-height: 54px; padding: 15px 30px; font-size: var(--text-body-lg); gap: 10px; }
.btn--sm { min-height: 34px; padding: 8px 16px; font-size: var(--text-caption); gap: 6px; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* --- Badge --------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 4px 11px;
  font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: var(--text-caption);
  letter-spacing: var(--tracking-caps); text-transform: uppercase; border-radius: var(--radius-pill);
  line-height: 1; white-space: nowrap;
  background: var(--color-surface); color: var(--color-text-secondary); border: 1px solid var(--color-border);
}
.badge--gold { background: var(--color-gold-faint); color: var(--color-gold); border-color: var(--color-gold); }
.badge--solid { background: var(--color-gold); color: var(--color-text-on-gold); border-color: var(--color-gold); }
.badge--positive { background: rgba(138,154,107,0.14); color: var(--color-positive); border-color: rgba(138,154,107,0.5); }

/* --- Card --------------------------------------------------------- */
.card {
  border: var(--keyline); background: var(--color-surface); border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.card--accent { border-color: var(--color-gold); }
.card--flush { padding: 0; overflow: hidden; }

/* --- Header ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(0,0,0,0.72);
  backdrop-filter: saturate(120%) blur(14px);
  -webkit-backdrop-filter: saturate(120%) blur(14px);
  border-bottom: var(--keyline);
}
.site-header__inner {
  max-width: var(--container-max); margin: 0 auto; padding: 14px var(--space-6);
  display: flex; align-items: center; gap: var(--space-6);
}
.brand { display: flex; align-items: center; gap: 13px; color: var(--color-white); }
.brand:hover { color: var(--color-white); }
.brand img { height: 34px; width: auto; }
.brand__word {
  font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 14px;
  letter-spacing: var(--tracking-wordmark); text-transform: uppercase; color: var(--color-fog);
  white-space: nowrap;
}
.site-nav { display: flex; gap: 30px; margin-left: 12px; }
.site-nav a { font-size: var(--text-body); font-weight: var(--weight-medium); color: var(--color-ash); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--color-gold); }
.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.site-header__actions a {
  font-size: var(--text-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-ash);
}
.site-header__actions a:hover { color: var(--color-gold); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--color-fog); padding: 6px; }
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 900px) {
  .site-header__inner { gap: var(--space-4); }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--color-black); border-bottom: var(--keyline);
    max-height: 0; overflow: hidden; transition: max-height var(--dur-base) var(--ease-standard);
  }
  .site-header[data-open="true"] .site-nav { max-height: 60vh; }
  .site-nav a { padding: 16px var(--space-6); border-top: var(--keyline); }
  .brand__word { font-size: 11px; letter-spacing: 0.2em; }
}

/* --- Hero ------------------------------------------------------ */
.hero { position: relative; overflow: hidden; border-bottom: var(--keyline); }
.hero__bg { position: absolute; inset: 0; background: radial-gradient(130% 90% at 76% 12%, #2a2823 0%, #131210 46%, #000 100%); }
.hero__grain { position: absolute; inset: 0; opacity: 0.4; background: repeating-linear-gradient(118deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 8px); }
.hero__inner {
  position: relative; max-width: var(--container-max); margin: 0 auto; padding: 96px var(--space-6);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center;
}
.hero h1 { font-weight: var(--weight-extrabold); font-size: var(--text-display); color: var(--color-white); text-wrap: balance; }
.hero h1 .accent { color: var(--color-gold); }
.hero__points { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.hero__point { display: flex; align-items: center; gap: 9px; color: var(--color-stone); font-size: var(--text-caption); }
.hero__point svg { width: 18px; height: 18px; color: var(--color-gold); }
.hero__card { justify-self: center; width: 100%; max-width: 400px; }
.hero__card .frame {
  display: block; border: var(--keyline); background: var(--color-onyx); border-radius: var(--radius-lg); padding: 26px;
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.hero__card .frame:hover, .hero__card .frame:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-gold); }
.hero__card .frame > img { aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); width: 100%; }

/* Rotating hero: video + photos */
.hero__slides { position: relative; aspect-ratio: 1/1; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero__slides img, .hero__slides video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 900ms var(--ease-standard);
}
.hero__slides img.is-active, .hero__slides video.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero__slides img, .hero__slides video { transition: none; }
}
.hero__card .meta {
  display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 18px;
  border-top: var(--keyline);
}
.hero__card .meta span:first-child { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-stone); }
.hero__card .meta .price { font-family: var(--font-display); font-size: var(--text-body-lg); font-weight: var(--weight-semibold); color: var(--color-gold); }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; padding: 64px var(--space-6); gap: 40px; }
  .hero__card { order: -1; max-width: 340px; }
}

/* --- Promo strip -------------------------------------------------- */
.promo-strip {
  border-bottom: var(--keyline); background: var(--color-black);
}
.promo-strip__inner {
  max-width: var(--container-max); margin: 0 auto; padding: 22px var(--space-6);
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-align: center;
}
.promo-strip strong {
  font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-caption);
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--color-gold);
}
.promo-strip .divider { width: 1px; height: 14px; background: var(--color-slate); display: block; }
.promo-strip span.copy { font-size: 15px; color: var(--color-ash); }

/* --- Steps ------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 48px; }
.step__num { font-family: var(--font-display); font-size: var(--text-caption); letter-spacing: var(--tracking-eyebrow); color: var(--color-gold); margin-bottom: 16px; }
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { font-size: var(--text-body); line-height: var(--leading-normal); }

/* --- Section head --------------------------------------------------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head h2 { font-size: var(--text-h2); }
.section-head p { margin-top: 12px; max-width: 48ch; }

/* --- Seasonal section (home page) --------------------------------------- */
.season { padding-block: var(--space-9); border-block: var(--keyline); background-color: var(--color-ink); }
.season--has-bg {
  background-image: linear-gradient(rgba(0,0,0,0.58), rgba(0,0,0,0.72)), var(--season-bg-desktop);
  background-size: cover; background-position: center;
}
@media (max-width: 720px) {
  .season--has-bg {
    background-image: linear-gradient(rgba(0,0,0,0.58), rgba(0,0,0,0.72)), var(--season-bg-mobile);
  }
}
.season__head { text-align: center; margin-bottom: var(--space-6); }
/* Season title: Cinzel, brand gold, with a slow shimmer sweeping across it. */
.season__head .season__title {
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 3.75rem);
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: var(--color-gold);
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.55));
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .season__head .season__title {
    background-image: linear-gradient(105deg,
      var(--color-gold-deep) 0%, var(--color-gold) 30%, #FFF4CF 50%, var(--color-gold) 70%, var(--color-gold-deep) 100%);
    background-size: 250% 100%;
    background-position: 130% 0;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: season-shimmer 7s ease-in-out infinite;
  }
}
@keyframes season-shimmer {
  0%   { background-position: 130% 0; }
  60%  { background-position: -30% 0; }
  100% { background-position: -30% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .season__head .season__title { animation: none; background-position: 50% 0; }
}
.season__carousel { position: relative; }
.season__track {
  position: relative;   /* so the script can read each card's position inside the scrolling row */
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  justify-content: safe center; padding: 8px 4px 16px; scrollbar-width: none;
}
.season__track::-webkit-scrollbar { display: none; }
.season__track .tile { flex: 0 0 220px; scroll-snap-align: start; background: rgba(28,27,24,0.94); }
.season__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: flex; align-items: center; justify-content: center; padding: 0;
  width: 44px; height: 44px; border-radius: 50%; border: var(--keyline-strong);
  background: var(--color-ink); color: var(--color-white); cursor: pointer;
}
.season__nav[hidden] { display: none; }
.season__nav:hover { border-color: var(--color-gold); color: var(--color-gold); }
.season__nav--prev { left: -18px; }
.season__nav--next { right: -18px; }
.season__cta { text-align: center; margin-top: var(--space-6); }
@media (max-width: 720px) {
  .season { padding-block: var(--space-8); }
  .season__nav { display: none; }
  .season__track .tile { flex-basis: 68%; }
}

/* --- Newsletter popup -------------------------------------------------- */
.newsletter-popup { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.newsletter-popup[hidden] { display: none; }
.newsletter-popup__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.72); }
.newsletter-popup__card {
  position: relative; width: 100%; max-width: 420px; background: var(--color-surface);
  border: var(--keyline); border-radius: var(--radius-lg); padding: var(--space-7);
}
.newsletter-popup__close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: none; background: transparent; color: var(--color-stone); font-size: 22px; line-height: 1; cursor: pointer;
}
.newsletter-popup__close:hover { color: var(--color-white); }

/* --- Testimonials ---------------------------------------------------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.testimonial {
  border: var(--keyline); background: var(--color-onyx); border-radius: var(--radius-md);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.testimonial__stars { color: var(--color-gold); font-size: 14px; letter-spacing: 2px; }
.testimonial__quote { font-size: var(--text-body); line-height: var(--leading-normal); color: var(--color-ash); }
.testimonial__quote::before { content: "\201C"; }
.testimonial__quote::after { content: "\201D"; }
.testimonial__who { font-size: var(--text-caption); color: var(--color-stone); margin-top: auto; }
.testimonial__who strong { color: var(--color-white); font-weight: 600; }

/* --- Design / product tiles --------------------------------------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.tile {
  display: block; border: var(--keyline); background: var(--color-onyx); border-radius: var(--radius-md);
  padding: 18px; transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base), border-color var(--dur-base);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-border-strong); }
.tile__art {
  aspect-ratio: 1/1; border-radius: var(--radius-sm);
  background: radial-gradient(70% 70% at 30% 22%, #35332e 0%, #191816 58%, #0b0b0a 100%);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 18px; position: relative;
}
.tile__art--round .tile__mark-wrap { border-radius: 50%; }
.tile__mark-wrap {
  position: absolute; inset: 14px; border: 1px solid rgba(196,180,135,0.28); border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.tile__mark {
  font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: 19px;
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-gold); line-height: 1.35;
  white-space: pre-line;
}
.tile__art--photo { padding: 0; overflow: hidden; background: var(--color-black); }
.tile__art--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile__body { margin-top: 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tile__title { font-size: 15px; font-weight: var(--weight-medium); color: var(--color-white); }
.tile__price { font-size: var(--text-caption); color: var(--color-ash); white-space: nowrap; }
.tile__cat { font-size: var(--text-micro); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-stone); margin-top: 4px; }

/* --- Marketplace search --------------------------------------- */
.marketplace-search { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.marketplace-search .input { flex: 1 1 260px; min-width: 0; }
.marketplace-search .btn { flex: 0 0 auto; }
.marketplace-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* --- Filters ---------------------------------------------------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filters a, .chip {
  display: inline-flex; align-items: center; min-height: 34px; padding: 6px 14px;
  font-size: var(--text-caption); letter-spacing: 0.04em;
  border: var(--keyline); border-radius: var(--radius-pill); color: var(--color-ash); background: transparent;
}
.filters a:hover { border-color: var(--color-gold); color: var(--color-gold); }
.filters a[aria-current="true"] { background: var(--color-gold); color: var(--color-ink); border-color: var(--color-gold); }

/* --- Product detail ------------------------------------------------ */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 56px; align-items: start; }
.product__art { border: var(--keyline); background: var(--color-onyx); border-radius: var(--radius-lg); padding: 32px; }
.product__art .tile__art { padding: 40px; }
.product__art .tile__mark { font-size: 30px; }
.product h1 { font-size: var(--text-h1); margin-bottom: 12px; }
.product__price { font-family: var(--font-display); font-size: var(--text-h3); color: var(--color-gold); font-weight: var(--weight-semibold); }
.product__price del { color: var(--color-stone); font-size: 1rem; margin-left: 10px; font-weight: var(--weight-regular); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: var(--text-caption); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-ash); }
.input, .textarea, select.input {
  width: 100%; background: var(--color-black); border: var(--keyline-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--color-white); transition: border-color var(--dur-fast);
}
.input:focus, .textarea:focus { border-color: var(--color-gold); outline: none; box-shadow: var(--focus-ring); }
.textarea { min-height: 92px; resize: vertical; }

.qty { display: inline-flex; align-items: center; border: var(--keyline-strong); border-radius: var(--radius-sm); overflow: hidden; }
.qty button { width: 40px; height: 44px; background: var(--color-black); border: 0; color: var(--color-fog); cursor: pointer; font-size: 18px; }
.qty button:hover { background: var(--color-onyx); color: var(--color-gold); }
.qty input { width: 48px; height: 44px; text-align: center; background: var(--color-black); border: 0; border-inline: var(--keyline); color: var(--color-white); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 32px; } }

/* --- Cart / checkout tables -------------------------------------- */
.line-items { width: 100%; border-collapse: collapse; }
.line-items th { text-align: left; font-size: var(--text-caption); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--color-stone); font-weight: var(--weight-semibold); padding: 0 0 14px; border-bottom: var(--keyline); }
.line-items td { padding: 18px 0; border-bottom: var(--keyline); vertical-align: top; }
.line-items .li-title { color: var(--color-white); font-weight: var(--weight-medium); }
.li-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); border: var(--keyline); background: radial-gradient(70% 70% at 30% 22%, #35332e 0%, #191816 58%, #0b0b0a 100%); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 11px; color: var(--color-gold); text-align: center; padding: 4px; letter-spacing: 0.08em; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.summary { border: var(--keyline); background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-6); position: sticky; top: 96px; }
.summary__row { display: flex; justify-content: space-between; padding: 10px 0; font-size: var(--text-body); }
.summary__row--total { border-top: var(--keyline); margin-top: 8px; padding-top: 16px; color: var(--color-white); font-family: var(--font-display); font-size: var(--text-body-lg); font-weight: var(--weight-semibold); }
.summary__row .pos { color: var(--color-positive); }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } .summary { position: static; } }

/* --- Auth / forms card ---------------------------------------- */
.form-card { max-width: 440px; margin-inline: auto; border: var(--keyline); background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-7); }
.form-card h1 { font-size: var(--text-h2); margin-bottom: 8px; }
.form-grid { display: grid; gap: var(--space-4); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 560px) { .form-row-2 { grid-template-columns: 1fr; } }

/* --- Account ------------------------------------------------- */
.account-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.account-nav { display: flex; flex-direction: column; gap: 2px; border: var(--keyline); border-radius: var(--radius-md); overflow: hidden; }
.account-nav a { padding: 14px 18px; font-size: var(--text-caption); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-ash); border-bottom: var(--keyline); }
.account-nav a:last-child { border-bottom: 0; }
.account-nav a:hover, .account-nav a[aria-current="page"] { background: var(--color-onyx); color: var(--color-gold); }
@media (max-width: 800px) { .account-layout { grid-template-columns: 1fr; } .account-nav { flex-direction: row; flex-wrap: wrap; } .account-nav a { border-bottom: 0; } }

/* --- Orders --------------------------------------------------- */
.order-card { border: var(--keyline); background: var(--color-surface); border-radius: var(--radius-md); padding: var(--space-5); }
.order-card + .order-card { margin-top: var(--space-4); }
.order-card__head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; }
.order-card__no { font-family: var(--font-display); color: var(--color-white); font-weight: var(--weight-semibold); }

/* --- Admin order cards (collapsible, status/age glow) ----------
   Shared by /admin (this site's own orders) and /admin/designer-orders
   (the coaster designer's orders, pulled live from its own API) - same
   component, same interaction, so managing either feels the same rather
   than like two different tools. One card per order, at any screen width,
   collapsed by default to a summary strip. */
.oc {
  --oc-color: var(--color-border); --oc-glow: transparent;
  border: 1.5px solid var(--oc-color); border-radius: var(--radius-md);
  background: var(--color-surface); box-shadow: 0 0 16px 0 var(--oc-glow);
  padding: var(--space-5); margin-bottom: var(--space-4);
  transition: box-shadow .2s ease;
}
.oc--new        { --oc-color: #E9E5DC; --oc-glow: rgba(233,229,220,.30); }
.oc--aged3      { --oc-color: #D9B44A; --oc-glow: rgba(217,180,74,.40); }
.oc--aged5      { --oc-color: #D9823C; --oc-glow: rgba(217,130,60,.45); }
.oc--cancelled  { --oc-color: #C24444; --oc-glow: rgba(194,68,68,.40); }
.oc--dispatched { --oc-color: #4FB8C4; --oc-glow: rgba(79,184,196,.40); }
.oc--delivered  { --oc-color: #7CB86B; --oc-glow: rgba(124,184,107,.40); }

.oc__summary { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; cursor: pointer; user-select: none; }
.oc__summary input[type=checkbox] { cursor: pointer; }
.oc__no { font-weight: 600; color: var(--color-white); white-space: nowrap; }
.oc__customer { min-width: 0; flex: 1 1 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc__pill {
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid var(--oc-color); color: var(--oc-color); white-space: nowrap;
}
.oc__chevron { margin-left: auto; color: var(--color-stone); transition: transform .15s ease; flex-shrink: 0; }
.oc.is-open .oc__chevron { transform: rotate(90deg); }
.oc__details { margin-top: var(--space-5); padding-top: var(--space-5); border-top: var(--keyline); }
.oc__details[hidden] { display: none; }
.oc__loading { font-size: var(--text-caption); color: var(--color-stone); }

.oc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-5); }
.oc-field label { display: block; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-stone); margin-bottom: 4px; }
.oc-field input, .oc-field select { width: 100%; padding: 8px 10px; }

/* One continuous rail (grey) with a gold progress overlay - no per-step
   segments, so nothing can misalign. --track-n = step count,
   --track-progress = 0..1 filled fraction (both set inline on .track). */
.track {
  position: relative; display: flex; gap: 0; margin: 8px 0 0; padding: 0;
  list-style: none; --track-edge: calc(50% / var(--track-n, 4));
}
.track::before, .track::after {
  content: ""; position: absolute; top: 9px; height: 2px;
}
.track::before { left: var(--track-edge); right: var(--track-edge); background: var(--color-slate); }
.track::after {
  left: var(--track-edge); background: var(--color-gold);
  width: calc((100% - 2 * var(--track-edge)) * var(--track-progress, 0));
  transition: width .4s ease;
}
.track__step {
  flex: 1 1 0; min-width: 0; position: relative; text-align: center;
  padding-top: 32px; font-size: var(--text-caption); line-height: 1.3;
  color: var(--color-stone);
}
.track__dot {
  position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-onyx); border: 2px solid var(--color-slate);
}
.track__label { display: block; padding: 0 6px; }
.track__step--done { color: var(--color-ash); }
.track__step--done .track__dot { border-color: var(--color-gold); background: var(--color-gold); }
.track__step--current { color: var(--color-gold); }
.track__step--current .track__dot { border-color: var(--color-gold); background: var(--color-gold); box-shadow: var(--glow-gold); }
@media (max-width: 560px) {
  .track { flex-direction: column; gap: 18px; padding-left: 2px; }
  .track::before, .track::after { top: 12px; bottom: 12px; left: 9px; right: auto; width: 2px; height: auto; }
  .track::after { bottom: auto; height: calc((100% - 24px) * var(--track-progress, 0)); transition: height .4s ease; }
  .track__step { text-align: left; padding: 2px 0 2px 32px; min-height: 20px; display: flex; align-items: center; }
  .track__dot { top: 50%; left: 0; transform: translateY(-50%); }
}

/* --- Order photo (customer-supplied) --------------------------- */
.order-photo { display: block; width: 96px; height: 96px; flex: 0 0 auto; border-radius: var(--radius-sm); border: var(--keyline); overflow: hidden; background: var(--color-black); }
.order-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- Notices ---------------------------------------------------- */
.notice { border: var(--keyline); border-left: 3px solid var(--color-gold); background: var(--color-surface); padding: 14px 18px; border-radius: var(--radius-sm); font-size: var(--text-body); color: var(--color-text-secondary); }
.notice--error { border-left-color: var(--color-danger); color: #e6b6a7; }
.notice--ok { border-left-color: var(--color-positive); color: #cdd8bb; }

/* --- Footer -------------------------------------------------- */
.site-footer { border-top: var(--keyline); background: var(--color-black); flex-shrink: 0; }
.site-footer__inner { max-width: var(--container-max); margin: 0 auto; padding: 56px var(--space-6) 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font-family: var(--font-body); font-size: var(--text-caption); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-stone); margin-bottom: 16px; font-weight: var(--weight-semibold); }
.site-footer a { display: block; font-size: var(--text-caption); color: var(--color-ash); padding: 5px 0; }
.site-footer a:hover { color: var(--color-gold); }
.site-footer__brand img { height: 30px; width: auto; margin-bottom: 16px; }
.site-footer__brand p { font-size: var(--text-caption); color: var(--color-stone); max-width: 32ch; }
.site-footer__legal { max-width: var(--container-max); margin: 0 auto; padding: 20px var(--space-6); border-top: var(--keyline); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: var(--text-micro); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-stone); }
@media (max-width: 800px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* --- Utilities --------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-6); }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
.prose { max-width: 68ch; }
.prose p { margin-top: var(--space-4); }
.prose h2 { font-size: var(--text-h3); margin-top: var(--space-7); color: var(--color-white); }
.prose ul { margin-top: var(--space-4); padding-left: 1.2em; }
.prose li { margin-top: var(--space-2); }
.hr { border: 0; border-top: var(--keyline); margin-block: var(--space-6); }
.pill-row { display: flex; gap: 12px; flex-wrap: wrap; }
.text-white { color: var(--color-white); }
.mt-6 { margin-top: var(--space-6); } .mt-4 { margin-top: var(--space-4); } .mt-8 { margin-top: var(--space-8); }

/* --- Product image gallery ------------------------------------------ */
.product__gallery-main { border-radius: var(--radius-sm); overflow: hidden; background: var(--color-black); }
.product__gallery-main img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.product__gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product__thumb { width: 64px; height: 64px; padding: 0; border: var(--keyline); border-radius: var(--radius-xs); overflow: hidden; background: var(--color-black); cursor: pointer; }
.product__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product__thumb.is-active { border-color: var(--color-gold); box-shadow: var(--glow-gold); }

/* --- Personalisation tab ------------------------------------------- */
.pers { border: var(--keyline); border-radius: var(--radius-md); padding: var(--space-5); background: var(--color-onyx); }
.pers__title { font-size: var(--text-h3); margin-bottom: var(--space-3); }
.pers__samples { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pers__sample { min-width: 60px; min-height: 44px; padding: 6px 12px; font-size: 20px; line-height: 1.1;
  color: var(--color-fog); background: var(--color-black); border: var(--keyline-strong); border-radius: var(--radius-sm); cursor: pointer; }
.pers__sample.is-active { border-color: var(--color-gold); color: var(--color-gold); }
.field--row { flex-direction: row !important; align-items: center; gap: 10px; }
.field--row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--color-gold); flex: none; }
.li-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-xs); }

/* --- Admin -------------------------------------------------------- */
.admin-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-nav a { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 16px;
  font-size: var(--text-caption); letter-spacing: 0.04em; text-transform: uppercase;
  border: var(--keyline); border-radius: var(--radius-pill); color: var(--color-ash); }
.admin-nav a:hover { border-color: var(--color-gold); color: var(--color-gold); }
.admin-nav a[aria-current="page"] { background: var(--color-gold); color: var(--color-ink); border-color: var(--color-gold); }
.admin-thumb { width: 48px; height: 48px; flex: none; border: var(--keyline); border-radius: var(--radius-xs); overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: radial-gradient(70% 70% at 30% 22%, #35332e 0%, #191816 58%, #0b0b0a 100%);
  font-family: var(--font-display); font-size: 10px; color: var(--color-gold); text-align: center; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Toggle switch (admin quick actions) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; left: 0; top: 0; width: 40px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.switch__track { flex: none; width: 40px; height: 22px; border-radius: var(--radius-pill); background: var(--color-slate); transition: background .15s ease; }
.switch__thumb { position: absolute; left: 3px; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--color-ash);
  transform: translateY(-50%); transition: transform .15s ease, background .15s ease; pointer-events: none; }
.switch input:checked ~ .switch__track { background: var(--color-gold); }
.switch input:checked ~ .switch__thumb { transform: translate(18px, -50%); background: var(--color-ink); }
.switch input:focus-visible ~ .switch__track { outline: 2px solid var(--color-gold); outline-offset: 2px; }
.switch__label { font-size: var(--text-caption); color: var(--color-ash); min-width: 3.2em; }
.mock-previews { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.mock-preview { margin: 0; border: var(--keyline); border-radius: var(--radius-sm); overflow: hidden; background: var(--color-black); width: 200px; }
.mock-preview canvas, .mock-preview img { width: 100%; height: auto; display: block; }
.mock-preview figcaption { font-size: var(--text-micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-stone); padding: 8px 10px; }

/* --- Personalisation toggle (v5) ------------------------------------ */
.pers__toggle { margin-bottom: 0; }
.pers__fields { margin-top: var(--space-4); }
.product__price-note { font-family: var(--font-body); font-size: var(--text-caption); font-weight: var(--weight-regular); color: var(--color-stone); }
.pers__sample { font-size: 15px; line-height: 1.2; padding: 8px 14px; text-transform: none; letter-spacing: 0; }

/* --- Product spec / care block (v6) ------------------------------- */
.spec-block__h { font-family: var(--font-body); font-size: var(--text-caption); letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--color-stone); margin-bottom: 10px; }
.spec { display: grid; gap: 8px; }
.spec > div { display: flex; justify-content: space-between; gap: 12px; font-size: var(--text-caption);
  border-bottom: var(--keyline); padding-bottom: 6px; }
.spec dt { color: var(--color-stone); }
.spec dd { color: var(--color-fog); text-align: right; }
.spec-care { list-style: none; padding: 0; display: grid; gap: 6px; font-size: var(--text-caption); }
.spec-care li { padding-left: 16px; position: relative; }
.spec-care li::before { content: "–"; position: absolute; left: 0; color: var(--color-gold); }

/* --- Shape choice (v7) ------------------------------------------- */
.shape-choice { display: flex; gap: 10px; }
.shape-choice__opt { flex: 1; }
.shape-choice__opt input { position: absolute; opacity: 0; pointer-events: none; }
.shape-choice__opt span {
  display: block; text-align: center; padding: 12px 14px; cursor: pointer;
  border: var(--keyline-strong); border-radius: var(--radius-sm);
  font-size: var(--text-caption); letter-spacing: 0.04em; color: var(--color-fog);
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
}
.shape-choice__opt input:checked + span { border-color: var(--color-gold); color: var(--color-gold); background: var(--color-gold-faint); }
.shape-choice__opt input:focus-visible + span { box-shadow: var(--focus-ring); }

/* =====================================================================
   Mobile refinements (≤640px)
   - tighten the vertical rhythm (sections were 96px top+bottom)
   - fix the header: drop the wordmark so logo + actions + menu fit
   - scale display type down (redefining the tokens also catches the
     inline style="font-size:var(--text-h1)" used across the pages)
   - reflow the cart / order line-item tables into stacked rows
   ===================================================================== */
@media (max-width: 640px) {
  :root {
    --text-display: clamp(28px, 8.5vw, 40px);
    --text-h1: 1.9rem;
    --text-h2: 1.55rem;
  }

  .section { padding-block: var(--space-7); }
  .container { padding-inline: var(--space-5); }
  .hero__inner { padding: 40px var(--space-5) 48px; gap: 32px; }

  /* Header */
  .site-header__inner { padding: 12px 16px; gap: 12px; }
  .brand__word { display: none; }
  .brand img { height: 30px; }
  .site-header__actions { margin-left: auto; gap: 14px; }
  .nav-toggle { order: 5; margin-left: 2px; padding: 6px 0 6px 8px; }

  /* Section headers */
  .section-head { margin-bottom: 24px; }
  .section-head .btn { width: 100%; }

  /* Line-item tables → stacked rows */
  .line-items thead { display: none; }
  .line-items tr {
    display: flex; flex-wrap: wrap; align-items: center;
    column-gap: 16px; row-gap: 10px; padding: 16px 0; border-bottom: var(--keyline);
  }
  .line-items td { display: block; border: 0; padding: 0; }
  .line-items td:first-child { flex: 1 1 100%; }
  .line-items td:last-child { margin-left: auto; }

  /* Spec: label above value */
  .spec > div { flex-direction: column; gap: 2px; }
  .spec dd { text-align: left; }

  /* Quantity stepper */
  .qty { max-width: 140px; }

  /* Hero card price row: stack instead of colliding */
  .hero__card .meta { flex-direction: column; align-items: flex-start; gap: 6px; }
}
