/* =====================================================
   Twin ange — twinange.com
   White × Gold × Salmon Theme — soft, warm, boutique-elegant.
   (Variable names below keep their original "teal" suffix from an even
   earlier theme for historical reasons — they now hold gold tones.)
   ===================================================== */

/* --- Custom Properties --- */
:root {
  /* Colors — White Theme */
  --c-bg:          #FFFFFF;
  --c-surface:     #FFFFFF;
  --c-surface-2:   #F6F0EA;
  --c-border:      rgba(196, 156, 91, 0.22);
  --c-border-hi:   rgba(196, 156, 91, 0.5);

  /* Gold accent */
  --c-teal:        #C6A15C;   /* main accent */
  --c-teal-mid:    #B8924A;   /* medium, buttons */
  --c-teal-dark:   #8C6B2E;   /* deepest — used for readable text/links on white bg */
  --c-teal-pale:   #FBF3E1;   /* pale highlight tint on white bg */
  --c-teal-glow:   rgba(198, 161, 92, 0.28);
  --c-teal-shadow: rgba(198, 161, 92, 0.30);

  /* Salmon accent — paired with gold on section labels; buttons use a
     salmon-to-light-salmon gradient (salmon-mid -> salmon-light). */
  --c-salmon:       #E8927C;
  --c-salmon-mid:   #E07A61;
  --c-salmon-light: #F5B8A6;   /* light end of the button gradient */
  --c-salmon-dark:  #B94F36;   /* deepest — used for readable text/links on white bg */
  --c-salmon-pale:  #FCEAE4;
  --c-salmon-glow:  rgba(224, 122, 97, 0.30);

  /* Rose accent — for errors / destructive actions only (kept a clear red,
     deliberately distinct from the decorative salmon above so error states
     still read as "something's wrong" rather than just another accent). */
  --c-rose:        #D64545;
  --c-rose-dark:   #A93131;
  --c-rose-pale:   #FBEAEA;

  /* Text */
  --c-text:        #2B2420;   /* warm near-black */
  --c-text-muted:  #7A6F62;   /* warm muted brown-gray */
  --c-text-dim:    #7E7061;   /* dim warm gray, still >=4.5:1 on white */

  /* Typography */
  --f-display:  'Cormorant Garamond', 'Zen Old Mincho', Georgia, serif;
  --f-script:   'Cinzel', 'Cormorant Garamond', serif;
  --f-body:     'Zen Old Mincho', 'Hiragino Mincho ProN', Georgia, serif;

  /* Spacing */
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  2rem;
  --sp-lg:  4rem;
  --sp-xl:  6rem;
  --sp-2xl: 9rem;

  /* Radius */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  24px;

  /* Transitions */
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --dur-fast: 200ms;
  --dur-mid:  400ms;
  --dur-slow: 700ms;

  /* Layout */
  --max-width: 1100px;
  --header-h:  72px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* No scroll-behavior:smooth here — nav.js already does its own JS-driven
   smooth scroll (window.scrollTo({behavior:'smooth'})) for in-page anchor
   clicks, independent of this property. Leaving it on the CSS also made the
   browser's native landing-on-#hash scroll (e.g. after the contact form's
   full-page redirect to index.html?contact=success#contact) visibly slide
   down from the top of the page instead of just landing there. */
html { font-size: 16px; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; color: var(--c-text); }

/* --- Utility --- */
.container {
  width: min(var(--max-width), 100% - 3rem);
  margin-inline: auto;
}
.section {
  padding-block: var(--sp-xl);
  position: relative;
}
#makers { overflow: hidden; }

/* Decorative photo pinned to the right edge, spanning a run of sections
   (Atelier & Cafe through Contact). The sections inside must not paint their
   own background, or they'd cover it.
   The source image has a soft faded left edge, but background-size:cover
   crops horizontally (the band is far taller than it is wide) and that crop
   eats the fade, leaving a hard vertical seam — so the fade is recreated here
   with a mask instead, which holds at any viewport size. */
.right-bg-band { position: relative; overflow: hidden; }
.right-bg-band > * { position: relative; z-index: 1; }
.right-bg-band::before,
.right-bg-band::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(42vw, 460px);
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 0;
  pointer-events: none;
  /* The two images alternate: one is at full strength while the other is
     fully faded out, swapping over a long cycle. Both share the animation;
     ::after simply starts half a cycle in (negative delay), which is what
     puts them permanently in opposite phase. */
  animation: band-crossfade 40s ease-in-out infinite;
}
/* Right edge — its mask fades out towards the left, into the page. */
.right-bg-band::before {
  right: 0;
  background-image: url('/assets/images/site/atelier-contact-bg.jpg?v=20260803');
  background-position: right top;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.35) 22%, #000 55%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.35) 22%, #000 55%);
  animation-delay: 0s;
}
/* Left edge — mirrored: the mask fades out towards the right. */
.right-bg-band::after {
  left: 0;
  background-image: url('/assets/images/site/atelier-contact-bg-left.jpg?v=20260803');
  background-position: left top;
  -webkit-mask-image: linear-gradient(to left, transparent 0%, rgba(0,0,0,0.35) 22%, #000 55%);
  mask-image: linear-gradient(to left, transparent 0%, rgba(0,0,0,0.35) 22%, #000 55%);
  animation-delay: -20s;
}
/* Peak opacity is set here (not on the elements) because the animation drives
   opacity outright — changing the band's strength means changing these. */
@keyframes band-crossfade {
  0%   { opacity: 0.6; }
  50%  { opacity: 0; }
  100% { opacity: 0.6; }
}
/* On narrow screens the images sit fully behind the text rather than beside
   it, so they step back to a faint wash. */
@media (max-width: 900px) {
  .right-bg-band::before,
  .right-bg-band::after { width: 60vw; animation-name: band-crossfade-subtle; }
  @keyframes band-crossfade-subtle {
    0%   { opacity: 0.18; }
    50%  { opacity: 0; }
    100% { opacity: 0.18; }
  }
}
/* A permanently looping animation is exactly the kind of motion people turn
   off; hold the right-hand image steady instead of cycling. */
@media (prefers-reduced-motion: reduce) {
  .right-bg-band::before { animation: none; opacity: 0.6; }
  .right-bg-band::after { animation: none; opacity: 0; }
}
.section__bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: 0;
}
#makers > .container { position: relative; z-index: 1; }
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--sp-lg) 1.5rem var(--sp-xl);
  min-height: 60vh;
}
.site-main > article > h1:first-child,
.site-main > article > h2:first-child { margin-top: 0; }
article h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 300; margin-bottom: var(--sp-md); }
article h2 { font-size: 1.4rem; font-weight: 400; margin: var(--sp-lg) 0 var(--sp-sm); }
.story-heading { font-size: 1.4rem; font-weight: 400; margin: var(--sp-lg) 0 var(--sp-md); }
article h3 { font-size: 1.1rem; font-weight: 500; margin: var(--sp-md) 0 var(--sp-xs); color: var(--c-teal-dark); }
article p { margin-bottom: var(--sp-sm); color: var(--c-text-muted); }
article ul { margin: 0 0 var(--sp-sm); padding-left: 1.4rem; color: var(--c-text-muted); }
article ul li { list-style: disc; margin-bottom: 0.3rem; }
article a { color: var(--c-teal-dark); border-bottom: 1px solid transparent; transition: border-color var(--dur-fast) var(--ease); }
article a:hover { border-color: var(--c-teal-dark); }

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
.section__title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  color: var(--c-text);
  text-align: center;
  margin-bottom: var(--sp-lg);
}
.section__label {
  display: block;
  font-family: var(--f-display);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-salmon-dark);
  text-align: center;
  margin-bottom: var(--sp-xs);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.5em;
  padding: 0.75em 2em;
  border-radius: 2em;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--c-salmon-mid), var(--c-salmon-light));
  color: #2B2007;
  font-family: var(--f-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn--full { align-self: stretch; width: 100%; justify-content: center; }
.btn:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--c-salmon-glow);
  color: #2B2007;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; pointer-events: none; }
.btn--ghost {
  background: transparent;
  border-color: var(--c-border-hi);
  color: var(--c-text);
}
.btn--ghost:hover {
  border-color: var(--c-teal);
  color: var(--c-teal-dark);
  background: var(--c-teal-pale);
  box-shadow: none;
}
.btn--danger {
  background: transparent;
  border-color: var(--c-rose);
  color: var(--c-rose-dark);
}
.btn--danger:hover {
  background: var(--c-rose);
  border-color: var(--c-rose);
  color: #fff;
  box-shadow: 0 8px 24px rgba(214, 69, 69, 0.2);
}

/* =====================================================
   SCROLL REVEAL
   ===================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}
.reveal.in-view { opacity: 1; transform: none; }

/* =====================================================
   HEADER
   ===================================================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  transition: background var(--dur-mid) var(--ease), box-shadow var(--dur-mid) var(--ease);
}
.header.scrolled { box-shadow: 0 1px 0 var(--c-border-hi); }
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.90);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: -1;
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}
.logo {
  font-family: var(--f-script);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 0.4em;
  flex-shrink: 0;
}
.logo:hover { color: var(--c-teal-dark); }
.logo__img { height: 34px; width: auto; display: block; }

/* Persistent top-left cart shortcut, mobile-only (see the 680px query below)
   — on desktop the cart lives inline in the nav list as .nav__item--cart
   instead, so this stays hidden there to avoid showing it twice. */
.header__cart {
  display: none;
  color: var(--c-text);
  flex-shrink: 0;
}
.header__cart:hover { color: var(--c-teal-dark); }

.nav ul { display: flex; gap: var(--sp-md); align-items: center; }
.nav__link {
  font-family: var(--f-display);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(43, 36, 32, 0.82);
  transition: color var(--dur-fast) var(--ease);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1.5px;
  background: var(--c-teal-dark);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-fast) var(--ease);
}
.nav__link:hover { color: var(--c-teal-dark); }
.nav__link:hover::after, .nav__link.active::after { transform: scaleX(1); transform-origin: left; }
.nav__link.active { color: var(--c-teal-dark); }
.nav__link--icon { display: inline-flex; align-items: center; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--c-text);
  border-radius: 1px;
  transition: all var(--dur-fast) var(--ease);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 680px) {
  .logo__img { height: 24px; }
  .nav-toggle { display: flex; }
  /* Three-slot layout: cart icon / logo / hamburger. Grid (rather than
     flex + space-between) is what makes the logo land dead-center — with
     space-between the logo's position would drift with the width difference
     between the cart icon and the hamburger button. .nav is excluded from
     this grid despite being a DOM sibling here: it switches to
     position:fixed below, which takes it out of layout flow entirely, so
     only .header__cart / .logo / .nav-toggle actually occupy the 3 columns. */
  .header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .header__cart { display: inline-flex; align-items: center; justify-self: start; }
  .logo { justify-self: center; }
  .nav-toggle { justify-self: end; }
  /* The cart is already reachable via .header__cart above, so it's dropped
     from the opened menu list rather than shown twice. */
  .nav__item--cart { display: none; }
  .nav {
    position: fixed;
    inset: 0;
    /* No backdrop-filter: blurring a full-viewport fixed element is heavy
       on mobile GPUs and made the menu feel slow to open. The background
       is already 97% opaque, so the blur was barely visible anyway. */
    background: rgba(255, 255, 255, 0.97);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding-block: 5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease);
    z-index: 105;
  }
  .nav.open { opacity: 1; pointer-events: all; }
  .nav ul { flex-direction: column; align-items: center; gap: 1.6rem; width: 100%; }
  .nav__link { font-size: 1.4rem; letter-spacing: 0.15em; color: rgba(43, 36, 32, 0.9); }
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-block: 4rem 6rem;
  background-color: var(--c-bg);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.hero__bg-slide.is-active { opacity: 1; }
/* Slow Ken-Burns zoom on still-image slides only (excludes video slides).
   6s duration matches hero-slideshow.js's slide interval, so the zoom
   reaches 110% right as the next slide's fade-in finishes. */
.hero__bg-slide:not(.hero__bg-slide--video) { transform: scale(1); }
.hero__bg-slide:not(.hero__bg-slide--video).is-active { animation: hero-zoom 6s linear forwards; }
@keyframes hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}
.hero__bg-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__content { position: relative; z-index: 2; width: 100%; padding: 2rem 1.5rem 2.5rem; }
.hero__eyebrow {
  font-family: var(--f-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--c-text);
  margin-bottom: var(--sp-md);
}
.hero__tagline {
  font-family: var(--f-script);
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: var(--c-teal-dark);
  line-height: 1.1;
  margin-bottom: var(--sp-md);
}
.hero__message {
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  color: var(--c-text);
  max-width: 640px;
  margin: 0 auto var(--sp-lg);
  letter-spacing: 0.05em;
}
.hero__actions { display: flex; align-items: center; justify-content: center; gap: var(--sp-sm); flex-wrap: wrap; }
.hero__scroll-hint {
  /* Explicit light color rather than var(--c-text-dim): this sits directly
     over the hero photo/video, not the site's white background, and needs
     to stay legible regardless of how the rest of the theme is colored. */
  position: absolute;
  z-index: 2;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--f-display);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.hero__scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--c-teal), transparent);
  animation: scroll-hint 2s ease-in-out infinite;
}
@keyframes scroll-hint {
  0%, 100% { opacity: 0.4; transform: scaleY(0.6); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

/* =====================================================
   CARDS (products / collection lines)
   ===================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-md);
}
.card {
  display: block;
  border: 1px solid var(--c-border-hi);
  border-radius: var(--r-lg);
  background: linear-gradient(145deg, var(--c-surface) 0%, var(--c-teal-pale) 100%);
  box-shadow: 0 4px 24px rgba(43, 36, 32, 0.08);
  padding: 1.25rem;
  transition: border-color var(--dur-mid) var(--ease), box-shadow var(--dur-mid) var(--ease), transform var(--dur-mid) var(--ease);
}
.card:hover {
  border-color: var(--c-teal);
  box-shadow: 0 8px 40px var(--c-teal-shadow);
  transform: translateY(-3px);
}
.card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: var(--c-surface-2); border-radius: var(--r-md); }
/* The QR member card renders its own <img>/<canvas> via qrcodejs — keep it a
   plain square instead of the product card's 2:3 crop. */
#member-qr img, #member-qr canvas { width: auto; max-width: 100%; aspect-ratio: 1/1; object-fit: contain; border-radius: 0; }
.card h3 { font-size: 1.15rem; font-weight: 400; margin: 0.9rem 0 0.25rem; color: var(--c-text); }
.card p { color: var(--c-text-muted); font-size: 0.9rem; margin-bottom: 0.4rem; }
.card .price { font-family: var(--f-display); color: var(--c-teal-dark); font-size: 1.1rem; }
.card .out-of-stock { color: var(--c-rose-dark); font-size: 0.85rem; }
.card__story-link {
  display: inline-block;
  margin-top: 0.3rem;
  font-family: var(--f-display);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--c-teal-dark);
}
.card__story-link:hover { color: var(--c-teal-mid); }
.price { font-family: var(--f-display); color: var(--c-teal-dark); }
.out-of-stock { color: var(--c-rose-dark); font-size: 0.85rem; }

/* Luce items are exchanged for Luce in person at the atelier and can never
   be bought with money (see includes/points.php), so they carry the salmon
   accent instead of the gold one used by yen-priced products — the tint is
   what tells the two apart at a glance in a mixed grid. */
.card--luce {
  border-color: var(--c-salmon-light);
  background: linear-gradient(145deg, var(--c-surface) 0%, var(--c-salmon-pale) 100%);
}
.card--luce:hover {
  border-color: var(--c-salmon);
  box-shadow: 0 8px 40px var(--c-salmon-glow);
}
.card--luce .price,
.card--luce .out-of-stock { color: var(--c-salmon-dark); }

/* Admin product list: same signal, applied to the table row. */
tr.row--luce > td { background: var(--c-salmon-pale); }

/* Product detail page: center the gallery/price, price shown at 2x size. */
.product-detail h1 { text-align: center; }
.product-detail .gallery { margin-inline: auto; }
.product-detail .price { text-align: center; font-size: 2rem; }
.product-detail--luce .price { color: var(--c-salmon-dark); }
.luce-notice {
  border: 1px solid var(--c-salmon-light);
  border-radius: var(--r-md);
  background: linear-gradient(145deg, var(--c-surface) 0%, var(--c-salmon-pale) 100%);
  padding: var(--sp-xs) var(--sp-sm);
  margin-bottom: var(--sp-sm);
  color: var(--c-salmon-dark);
  text-align: center;
}
.luce-notice a { color: var(--c-salmon-dark); }

/* =====================================================
   GALLERY (swipeable image strip) + LIGHTBOX
   ===================================================== */
.gallery { position: relative; }
.gallery__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: var(--sp-sm);
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; scroll-snap-align: start; cursor: zoom-in; }
.gallery__slide img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  border-radius: var(--r-md);
  background: var(--c-surface-2);
}
/* Story pages: match the hero photo's 2:3 portrait crop instead of the 3:4 used by card galleries. */
.gallery--portrait .gallery__slide img { aspect-ratio: 2/3; }
.gallery__dots { display: flex; justify-content: center; gap: 6px; margin-top: var(--sp-sm); }
.gallery__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-border-hi);
  opacity: 0.5;
  transition: opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.gallery__dot.active { opacity: 1; background: var(--c-teal-dark); }
.gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(20,16,13,0.55);
  border: 1px solid var(--c-border-hi);
  color: var(--c-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}
.gallery:hover .gallery__arrow { opacity: 1; }
.gallery__arrow--prev { left: 8px; }
.gallery__arrow--next { right: 8px; }
@media (max-width: 680px) {
  .gallery__arrow { display: none; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10,8,6,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: min(92vw, 900px); max-height: 80vh; object-fit: contain; user-select: none; }
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2rem;
  color: var(--c-text);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--c-border-hi);
  color: var(--c-text);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox__arrow--prev { left: 16px; }
.lightbox__arrow--next { right: 16px; }
.lightbox__counter { margin-top: var(--sp-sm); color: var(--c-text-muted); font-size: 0.85rem; letter-spacing: 0.05em; }

/* =====================================================
   FORMS
   ===================================================== */
form.stack { display: flex; flex-direction: column; gap: var(--sp-sm); max-width: 480px; }
label {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  font-family: var(--f-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--c-text-muted);
}
input, textarea, select {
  background: var(--c-surface);
  border: 1px solid var(--c-border-hi);
  border-radius: var(--r-sm);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 0.95rem;
  padding: 0.75em 1em;
  width: 100%;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C6A15C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
  background-size: 16px;
  padding-right: 3em;
  cursor: pointer;
}
/* The generic input rule above (-webkit-appearance: none, width: 100%,
   dark background) is meant for text-like fields — it also matches
   checkboxes/radios and strips their native rendering with no checked-state
   style to replace it, so a checked box looked identical to an unchecked
   one. Restore native appearance and just theme the accent color. */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: auto;
  appearance: auto;
  accent-color: var(--c-teal);
  width: 1.1em;
  height: 1.1em;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px var(--c-teal-glow);
}
textarea { resize: vertical; min-height: 120px; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--c-border); }
th {
  font-family: var(--f-display);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-teal-mid);
  font-weight: 400;
}
td { color: var(--c-text-muted); font-size: 0.92rem; }

/* Cart list — two lines per item instead of a wide table, so nothing needs
   to scroll horizontally on narrow screens. */
.cart-items { display: flex; flex-direction: column; gap: var(--sp-md); margin-top: var(--sp-md); }
.cart-item { display: flex; gap: var(--sp-sm); padding-bottom: var(--sp-md); border-bottom: 1px solid var(--c-border); }
.cart-item__thumb { flex: 0 0 auto; }
.cart-item__thumb img {
  width: 72px;
  height: 108px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--c-surface-2);
}
.cart-item__details { flex: 1 1 auto; min-width: 0; }
.cart-item__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.cart-item__row + .cart-item__row { margin-top: 0.6rem; }
.cart-item__name { font-weight: 500; }
.cart-item__variant { color: var(--c-text-muted); font-size: 0.9rem; }
.cart-item__price { margin-left: auto; color: var(--c-text-muted); font-size: 0.92rem; }
.cart-item__qty { display: flex; gap: 0.5rem; align-items: center; }
.cart-item__qty input[type="number"] { width: 4.5rem; }
.cart-item__subtotal { margin-left: auto; font-weight: 500; }

.flash {
  padding: 1em 1.4em;
  margin-bottom: var(--sp-md);
  border-radius: var(--r-md);
  border: 1px solid;
  font-family: var(--f-display);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}
.flash--success { border-color: var(--c-teal); background: var(--c-teal-pale); color: var(--c-teal-dark); }
.flash--error { border-color: var(--c-rose); background: var(--c-rose-pale); color: var(--c-rose-dark); }

.honeypot { position: absolute; left: -9999px; opacity: 0; }

.size-guide {
  border: 1px solid var(--c-border-hi);
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: var(--sp-sm) var(--sp-md);
  margin-bottom: var(--sp-lg);
}
.size-guide summary {
  cursor: pointer;
  font-family: var(--f-display);
  color: var(--c-teal-dark);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
}
.size-guide table { margin: var(--sp-sm) 0; }

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  background: var(--c-surface-2);
  border-top: 1px solid var(--c-border);
  padding-block: var(--sp-xl);
}
.footer__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-md);
  text-align: center;
}
.footer__brand { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.footer__logo {
  font-family: var(--f-script);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--c-teal-dark);
}
.footer__atelier { font-size: 0.85rem; color: var(--c-text-muted); line-height: 1.8; }
.footer__nav { display: flex; gap: var(--sp-md); flex-wrap: wrap; justify-content: center; }
.footer__nav a {
  font-family: var(--f-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  transition: color var(--dur-fast) var(--ease);
}
.footer__nav a:hover { color: var(--c-teal-dark); }
.footer__legal { display: flex; gap: var(--sp-sm); flex-wrap: wrap; justify-content: center; }
.footer__legal a {
  font-size: 0.7rem;
  color: var(--c-text-dim);
  letter-spacing: 0.03em;
  transition: color var(--dur-fast) var(--ease);
}
.footer__legal a:hover { color: var(--c-teal-dark); }
.footer__copy {
  font-size: 0.75rem;
  color: var(--c-text-dim);
  letter-spacing: 0.05em;
}
/* =====================================================
   ADMIN DASHBOARD
   ===================================================== */
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-sm); margin-bottom: var(--sp-lg); }
.variant-row { display: flex; gap: var(--sp-sm); align-items: end; margin-bottom: var(--sp-sm); flex-wrap: wrap; }
.variant-row label { flex: 1; min-width: 100px; }
.variant-row__reorder { display: flex; gap: 0.3rem; flex: 0 0 auto; }
.variant-row__reorder .btn { padding: 0.4em 0.7em; }
form.stack.admin-form { max-width: 640px; }
.image-preview-list { display: flex; gap: var(--sp-sm); flex-wrap: wrap; margin: var(--sp-sm) 0; }
.image-preview-list img { width: 100px; height: 130px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--c-border-hi); }
.image-preview-item { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-sm); margin-bottom: var(--sp-lg); }
.stat-card { border: 1px solid var(--c-border-hi); border-radius: var(--r-lg); background: var(--c-surface); padding: var(--sp-sm); text-align: center; }
.stat-card .value { font-family: var(--f-display); font-size: 1.8rem; color: var(--c-teal-dark); }

.two-col-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg); max-width: 900px; margin-inline: auto; align-items: start; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 720px) {
  .hero__tagline { font-size: 2.2rem; }
  .two-col-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-sm); }
  .card { padding: 0.75rem; }
  .card h3 { font-size: 1rem; }
}
