/* ============================================================
   NAMMA3D "AURA" storefront theme.
   Same DOM contract as styles.css (script.js re-renders cards,
   drawer, detail + checkout with fixed class names) — this file
   restyles that contract: ivory canvas, drifting aurora mesh,
   frosted glass surfaces, springy micro-interactions.
   Toggled from Admin → Settings (storefront_design = 'aura').
   ============================================================ */
:root {
  color-scheme: light;
  --ivory: #faf9f6;
  --ink: #17151f;
  --muted: #5d5a6b;
  --line: rgba(23, 21, 31, 0.08);
  --line-strong: rgba(23, 21, 31, 0.16);
  --paper: #faf9f6;
  --panel: #ffffff;
  --wash: #f1efe9;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-brd: rgba(255, 255, 255, 0.8);
  --violet: #7c3aed;
  --peach: #ff9a62;
  --sky: #38bdf8;
  --mint: #34d399;
  --pop: #e0442e;
  --ok: #14915c;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 24px 70px -28px rgba(23, 21, 31, 0.35);
  --shadow-soft: 0 14px 44px -22px rgba(23, 21, 31, 0.22);
  --header-h: 76px;
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --easeout: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-gutter: stable; interpolate-size: allow-keywords; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.011em;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

::selection { background: var(--violet); color: #fff; }
:focus-visible {
  outline: 2.5px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
}
.skip-link:focus { left: 12px; }

/* ---------- Aurora mesh background ---------- */
.aurora {
  position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  filter: blur(70px) saturate(1.15);
  opacity: 0.5;
}
.aurora i { position: absolute; border-radius: 50%; width: 46vmax; height: 46vmax; }
.aurora i:nth-child(1) { background: radial-gradient(circle, var(--violet), transparent 65%); top: -6%; left: -4%; animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: radial-gradient(circle, var(--peach), transparent 65%); top: 20%; right: -10%; animation: drift2 22s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: radial-gradient(circle, var(--sky), transparent 65%); bottom: -12%; left: 18%; animation: drift3 30s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { background: radial-gradient(circle, var(--mint), transparent 68%); bottom: 8%; right: 24%; width: 30vmax; height: 30vmax; animation: drift1 24s ease-in-out 3s infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(9vw, 7vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-8vw, 10vh) scale(0.92); } }
@keyframes drift3 { to { transform: translate(6vw, -8vh) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }

/* ---------- Header: floating glass pill nav ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 14px 16px 6px;
}
.glassnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: var(--shadow-soft);
  max-width: 100%;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; padding: 4px 12px 4px 4px; border-radius: 999px; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--violet), var(--sky), var(--mint), var(--peach), var(--violet));
  color: #fff;
  font-size: 12px; letter-spacing: 0.02em;
  transition: transform 0.5s var(--spring);
}
.brand:hover .brand-mark { transform: rotate(140deg) scale(1.08); }
.brand-word { font-size: 15px; letter-spacing: -0.01em; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.3s var(--spring);
}
.pill:hover { background: rgba(23, 21, 31, 0.06); color: var(--ink); }
.pill:active { transform: scale(0.95); }
.pill-cart { background: var(--ink); color: var(--ivory); font-weight: 700; }
.pill-cart:hover { background: var(--violet); color: #fff; }
.cart-badge {
  display: grid; place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff; color: var(--ink);
  font-size: 11.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: transform 0.4s var(--spring);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: clamp(16px, 2.6vh, 26px);
  padding: clamp(48px, 9vh, 96px) clamp(16px, 5vw, 64px) clamp(28px, 5vh, 56px);
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  padding: 9px 18px; border-radius: 999px;
  font-weight: 500; font-size: 13px; color: var(--muted);
  box-shadow: 0 8px 30px -14px rgba(23, 21, 31, 0.2);
}
.hero-chip::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.hero-title {
  font-weight: 800;
  font-size: clamp(2.6rem, 8.2vw, 6.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 15ch;
  text-wrap: balance;
}
.hero-title .serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  background: linear-gradient(95deg, var(--violet), var(--sky) 55%, var(--mint));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em;
}
.hero-title .rise {
  display: inline-block; opacity: 0; transform: translateY(0.6em);
  animation: rise 0.9s var(--easeout) forwards;
  animation-delay: calc(var(--i) * 100ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-title .rise { opacity: 1; transform: none; } }
.hero-sub {
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  max-width: 52ch;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-hero { min-height: 54px; padding: 0 34px; border-radius: 999px; font-size: 15.5px; }

/* the orb — hero centerpiece + easter egg trigger (see aura.js) */
.orb {
  margin-top: 6px;
  width: clamp(64px, 8vw, 92px);
  height: clamp(64px, 8vw, 92px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: conic-gradient(from 0deg, var(--violet), var(--sky), var(--mint), var(--peach), var(--violet));
  filter: saturate(1.2);
  box-shadow: 0 20px 50px -16px rgba(124, 58, 237, 0.55), inset 0 -8px 22px rgba(255, 255, 255, 0.5);
  animation: orbspin 9s linear infinite, orbfloat 5s ease-in-out infinite;
  transition: transform 0.4s var(--spring);
  position: relative;
}
.orb::after {
  content: ""; position: absolute; inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.12) 58%);
}
.orb:hover { transform: scale(1.12); }
.orb:active { transform: scale(0.92); }
@keyframes orbspin { to { rotate: 360deg; } }
@keyframes orbfloat { 50% { translate: 0 -10px; } }
.orb-hint { font-family: "Geist Mono", monospace; font-size: 11.5px; color: var(--muted); opacity: 0.6; }

/* ---------- Shop head ---------- */
.shop-head { text-align: center; display: grid; gap: 10px; padding: clamp(12px, 3vh, 30px) 16px 6px; }
.eyebrow {
  font-family: "Geist Mono", monospace;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--violet);
}
.shop-head h2 { font-weight: 800; font-size: clamp(1.8rem, 4.6vw, 3.2rem); letter-spacing: -0.03em; }
.shop-head h2 em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; }

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px clamp(14px, 3vw, 36px) 8px;
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 280px;
  max-width: 420px;
  padding: 0 16px;
  border: 1px solid var(--glass-brd);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--muted);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12); }
.search input {
  flex: 1; min-width: 0;
  min-height: 44px;
  border: none; background: transparent;
  outline: none;
  color: var(--ink);
}
.search input[type="search"]::-webkit-search-cancel-button,
.search input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.count { color: var(--muted); font-size: 14px; }
.count strong { color: var(--ink); }
.density {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto;
  color: var(--muted);
}
.density input[type="range"] { width: 120px; accent-color: var(--violet); cursor: pointer; }

/* ---------- Product grid: frosted glass cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
  padding: 16px clamp(14px, 3vw, 36px) 48px;
  max-width: 1360px;
  margin: 0 auto;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow-soft);
  padding: 12px 12px 6px;
  overflow: hidden;
  transition: transform 0.5s var(--spring), box-shadow 0.5s ease;
  animation: cardin 0.7s var(--easeout) backwards;
}
/* stagger the first row's entrance */
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.12s; }
.card:nth-child(3) { animation-delay: 0.19s; }
.card:nth-child(4) { animation-delay: 0.26s; }
@keyframes cardin { from { opacity: 0; transform: translateY(28px); } }
.card:hover { transform: translateY(-8px) rotate(-0.5deg); box-shadow: 0 34px 70px -26px rgba(23, 21, 31, 0.35); }
.card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%, #ffffff, var(--wash));
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--spring); }
.card:hover .card-img img { transform: translateY(-4px) scale(1.05); }
/* pastel tint rotation across cards */
.card:nth-child(7n + 1) .card-img { background: radial-gradient(120% 100% at 50% 0%, #f3ecff, var(--wash)); }
.card:nth-child(7n + 2) .card-img { background: radial-gradient(120% 100% at 50% 0%, #ffefe3, var(--wash)); }
.card:nth-child(7n + 3) .card-img { background: radial-gradient(120% 100% at 50% 0%, #e5f6ff, var(--wash)); }
.card:nth-child(7n + 4) .card-img { background: radial-gradient(120% 100% at 50% 0%, #fff5df, var(--wash)); }
.card:nth-child(7n + 5) .card-img { background: radial-gradient(120% 100% at 50% 0%, #e4f9ef, var(--wash)); }
.card:nth-child(7n + 6) .card-img { background: radial-gradient(120% 100% at 50% 0%, #efeaff, var(--wash)); }
.card:nth-child(7n + 7) .card-img { background: radial-gradient(120% 100% at 50% 0%, #ffe9ec, var(--wash)); }
.card-add {
  position: absolute;
  right: 10px; bottom: 10px;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.2s ease, transform 0.35s var(--spring), background 0.2s ease;
}
.card:hover .card-add, .card-add:focus-visible { opacity: 1; transform: translateY(0) scale(1); }
.card-add:hover { background: var(--violet); }
.card-add:active { transform: scale(0.9); }
.card-add.added { background: var(--mint); color: var(--ink); }
.card-add.added > svg { display: none; }
.card-add.added::after { content: "✓"; font-size: 20px; font-weight: 800; line-height: 1; }
.card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 8px 8px;
}
.card-name { font-weight: 700; font-size: 14.5px; line-height: 1.3; min-width: 0; letter-spacing: -0.01em; }
.card-price {
  font-weight: 600; font-size: 14px; white-space: nowrap;
  font-family: "Geist Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.empty-grid { grid-column: 1 / -1; padding: 60px 0; text-align: center; color: var(--muted); }

@media (hover: none), (max-width: 860px) {
  .card-add { display: none; }
  .card { cursor: pointer; }
  .card:active { transform: scale(0.97); }
}

/* ---------- Media carousel (cards + detail) — same contract as classic ---------- */
.carousel { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; touch-action: pan-y; }
.carousel.is-single { position: relative; }
.carousel-track {
  display: flex; width: 100%; height: 100%;
  will-change: transform;
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.carousel.is-dragging .carousel-track { transition: none; }
.slide { position: relative; flex: 0 0 100%; width: 100%; height: 100%; }
.slide-media { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.slide.broken { background: var(--wash); }
.slide.broken .slide-media { visibility: hidden; }
.dots {
  position: absolute; left: 0; right: 0; bottom: 9px; z-index: 2;
  display: flex; gap: 6px; justify-content: center;
  pointer-events: none;
}
.dot {
  width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 1px rgba(23, 21, 31, 0.18);
  cursor: pointer; pointer-events: auto; transition: background 0.16s ease, transform 0.16s ease;
}
.dot.is-active { background: var(--violet); transform: scale(1.25); box-shadow: none; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: grid; place-items: center; width: 38px; height: 38px;
  border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.9);
  color: var(--ink); cursor: pointer; box-shadow: var(--shadow-soft);
  opacity: 0; transition: opacity 0.16s ease, background 0.16s ease;
}
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel:hover .carousel-arrow, .carousel:focus-within .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: #fff; }
@media (hover: none) { .carousel-arrow { opacity: 1; } }
.mute-btn {
  position: absolute; right: 10px; top: 10px; z-index: 3;
  display: grid; place-items: center; width: 34px; height: 34px;
  border: none; border-radius: 50%;
  background: rgba(23, 21, 31, 0.6); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background 0.16s ease;
}
.mute-btn:hover { background: rgba(23, 21, 31, 0.88); }

/* ---------- Story strip ---------- */
.story {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(36px, 7vh, 80px) clamp(16px, 5vw, 64px);
  display: grid;
  gap: 18px;
  text-align: center;
}
.story-quote {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.4rem, 3.4vw, 2.6rem);
  line-height: 1.25;
  text-wrap: balance;
}
.story-quote b {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-style: normal;
  font-weight: 800;
  background: linear-gradient(95deg, var(--violet), var(--sky));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.story-stats {
  display: flex; justify-content: center; gap: clamp(28px, 6vw, 72px); flex-wrap: wrap;
  margin-top: 12px;
}
.stat { display: grid; gap: 4px; }
.stat b {
  font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-family: "Geist Mono", monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px clamp(14px, 3vw, 36px) 32px;
  color: var(--muted);
  font-size: 14px;
}
.footer-bar nav { display: flex; gap: 18px; align-items: center; }
.link-btn { border: none; background: none; cursor: pointer; color: var(--muted); font-weight: 600; }
.link-btn:hover, .footer-bar a:hover { color: var(--violet); }
.footer-links { flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.3s var(--spring), box-shadow 0.3s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--violet); box-shadow: 0 14px 34px -14px rgba(124, 58, 237, 0.55); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost { background: var(--panel); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--wash); }
.btn-block { width: 100%; }

/* ---------- Overlays (drawer + modal) ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
}
.overlay[hidden] { display: none; }
.overlay-scrim {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(23, 21, 31, 0.4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: pointer;
  animation: fade 0.18s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slidein { from { transform: translateX(100%); } }
@keyframes popin { from { transform: translateY(12px) scale(0.98); opacity: 0; } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

/* Drawer */
.drawer {
  position: relative;
  margin-left: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(440px, 100%);
  height: 100%;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
  animation: slidein 0.28s var(--easeout);
}
.drawer-head, .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2, .modal-head h2 { font-size: 20px; letter-spacing: -0.02em; }
.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.3s var(--spring);
}
.icon-btn:hover { background: var(--wash); }
.icon-btn:active { transform: scale(0.92); }
.drawer-items { overflow: auto; padding: 12px 22px; display: grid; gap: 12px; align-content: start; }
.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}
.cart-item img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--wash); }
.cart-item h3 { font-size: 14px; }
.cart-item p { color: var(--muted); font-size: 13px; }
.cart-qty { display: flex; align-items: center; gap: 6px; }
.qty-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.25s var(--spring);
}
.qty-btn:hover { background: var(--wash); }
.qty-btn:active { transform: scale(0.9); }
.cart-qty strong { min-width: 20px; text-align: center; }
.empty-cart { color: var(--muted); text-align: center; padding: 48px 0; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; }

/* Modal */
.modal {
  position: relative;
  margin: auto;
  width: min(496px, 100%);
  max-height: calc(100% - 32px);
  overflow: auto;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: var(--shadow);
  animation: popin 0.24s var(--easeout);
  overscroll-behavior: contain;
}
.modal .modal-head { padding: 24px 28px 20px; }
.modal-head h2 { font-size: 22px; letter-spacing: -0.02em; }
.checkout-form { display: grid; gap: 20px; padding: 24px 28px 28px; }
.checkout-form label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.checkout-form input, .checkout-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.checkout-form input::placeholder, .checkout-form textarea::placeholder { color: #a29fb0; }
.checkout-form input:focus, .checkout-form textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.checkout-form textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.checkout-form input[aria-invalid="true"], .checkout-form textarea[aria-invalid="true"] { border-color: var(--pop); }
.checkout-form input[aria-invalid="true"]:focus, .checkout-form textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(224, 68, 46, 0.14);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.discount-field { gap: 8px; }
.discount-row { display: flex; gap: 8px; }
.discount-row input { flex: 1; }
.discount-row .btn { min-height: 44px; flex: 0 0 auto; border-radius: 12px; }
.summary {
  display: grid; gap: 10px; padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--wash);
  font-size: 14px;
}
.line { display: flex; align-items: center; justify-content: space-between; }
.line span { color: var(--muted); }
.line strong { font-weight: 600; color: var(--ink); }
.line-total { padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--line-strong); font-size: 16px; }
.line-total span, .line-total strong { color: var(--ink); font-weight: 700; }
[data-discount-amt] { color: var(--ok) !important; }
.checkout-form .btn-primary { border-radius: 999px; min-height: 50px; font-size: 15px; margin-top: 2px; }
.form-msg { min-height: 20px; font-weight: 600; font-size: 14px; text-align: center; }
.form-msg:empty { display: none; }
.form-msg.error { color: var(--pop); }
.form-msg.ok { color: var(--ok); }
.secure-note { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: -8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  z-index: 80;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.3s var(--spring);
}
.toast[hidden] { display: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Search clear ---------- */
.search-clear {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border: none; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer; flex: 0 0 auto;
}
.search-clear:hover { background: var(--wash); color: var(--ink); }

/* ---------- Cart item layout ---------- */
.cart-item-main { min-width: 0; }
.cart-item-main h3 { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.remove-btn {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--muted); cursor: pointer;
}
.remove-btn:hover { background: var(--wash); color: var(--pop); border-color: var(--line-strong); }

/* ---------- Field errors / notes ---------- */
.field-err { color: var(--pop); font-size: 12.5px; font-weight: 600; min-height: 0; }
.field-err[hidden] { display: none !important; }
.field-note { font-size: 12.5px; font-weight: 600; min-height: 16px; }
.field-note.ok { color: var(--ok); }
.field-note.error { color: var(--pop); }
.btn-primary.loading::before {
  content: ""; width: 15px; height: 15px; margin-right: 2px;
  border: 2px solid rgba(255, 255, 255, 0.5); border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Product detail ---------- */
.modal-detail { width: min(860px, 100%); position: relative; }
.detail-x { position: absolute; top: 14px; right: 14px; z-index: 2; background: rgba(255, 255, 255, 0.9); }
.detail-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch; }
.detail-media { position: relative; overflow: hidden; background: var(--wash); min-height: 100%; }
.detail-media .slide-media { width: 100%; height: 100%; object-fit: cover; }
.detail-info { padding: 28px clamp(20px, 3vw, 32px); display: grid; gap: 14px; align-content: start; }
.detail-title { font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; padding-right: 36px; }
.detail-price { font-size: 22px; font-weight: 800; }
.detail-desc { color: var(--muted); line-height: 1.55; font-size: 14.5px; }
.detail-buy { display: grid; gap: 12px; margin-top: 4px; }
.qty-select { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); max-width: 130px; }
.qty-select select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background-color: #fff;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.qty-select select:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-actions .btn { min-width: 0; border-radius: 999px; }
.detail-add { position: relative; overflow: hidden; }
.detail-add .da-text { transition: opacity 0.22s ease, transform 0.22s ease; }
.detail-add .da-check {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.detail-add .da-check path { stroke-dasharray: 26; stroke-dashoffset: 26; }
.detail-add.added { background: var(--ok); color: #fff; border-color: var(--ok); animation: da-pop 0.34s ease; }
.detail-add.added .da-text { opacity: 0; transform: translateY(-120%); }
.detail-add.added .da-check { opacity: 1; transform: scale(1); }
.detail-add.added .da-check path { animation: da-draw 0.4s ease 0.12s forwards; }
@keyframes da-draw { to { stroke-dashoffset: 0; } }
@keyframes da-pop { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }
.acc { border-top: 1px solid var(--line); padding: 12px 0 2px; }
.acc summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 6px 0; list-style: none; display: flex; justify-content: space-between; }
.acc summary::after { content: "+"; color: var(--muted); transition: transform 0.28s ease; }
.acc[open] summary::after { content: "−"; }
.acc summary::-webkit-details-marker { display: none; }
.acc::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.28s ease, content-visibility 0.28s ease allow-discrete;
}
.acc[open]::details-content { block-size: auto; }
.spec { list-style: none; padding: 4px 0 8px; margin: 0; display: grid; gap: 6px; }
.spec li { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.spec li span:first-child { color: var(--muted); }
.muted-p { color: var(--muted); font-size: 13.5px; line-height: 1.55; padding: 4px 0 8px; }
.muted-p a { text-decoration: underline; }

/* ============================================================
   EASTER EGG — "ZERO-G": click the orb 3 times (aura.js).
   Gravity off → night cosmos, cards drift weightless, stars.
   ============================================================ */
body.zerog { background: #100e1a; color: #f0edff; }
body.zerog .aurora { opacity: 0.8; }
body.zerog .hero-title, body.zerog .shop-head h2, body.zerog .story-quote,
body.zerog .card-name, body.zerog .card-price, body.zerog .stat b, body.zerog .count strong { color: #f0edff; }
body.zerog .hero-sub, body.zerog .stat span, body.zerog .eyebrow,
body.zerog .count, body.zerog .footer-bar, body.zerog .orb-hint { color: #9d97c4; }
body.zerog .card {
  background: rgba(30, 26, 48, 0.55);
  border-color: rgba(240, 237, 255, 0.14);
  animation: floatdrift var(--fd, 7s) ease-in-out var(--fdel, 0s) infinite alternate;
}
@keyframes floatdrift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(var(--fx, 8px), var(--fy, -18px)) rotate(var(--fr, 1.6deg)); }
}
body.zerog .card-img { background: radial-gradient(120% 100% at 50% 0%, rgba(124, 58, 237, 0.25), rgba(16, 14, 26, 0.4)) !important; }
body.zerog .glassnav { background: rgba(30, 26, 48, 0.6); border-color: rgba(240, 237, 255, 0.14); }
body.zerog .brand, body.zerog .pill { color: #f0edff; }
body.zerog .pill:hover { background: rgba(240, 237, 255, 0.08); }
body.zerog .search { background: rgba(30, 26, 48, 0.6); border-color: rgba(240, 237, 255, 0.14); }
body.zerog .search input { color: #f0edff; }
body.zerog .footer { background: rgba(16, 14, 26, 0.5); border-top-color: rgba(240, 237, 255, 0.1); }
body.zerog .hero-chip { background: rgba(30, 26, 48, 0.6); border-color: rgba(240, 237, 255, 0.14); color: #9d97c4; }
@media (prefers-reduced-motion: reduce) { body.zerog .card { animation: none; } }
.star {
  position: fixed; z-index: 1; pointer-events: none;
  width: 3px; height: 3px; border-radius: 50%;
  background: #fff; opacity: 0;
}
body.zerog .star { animation: twinkle var(--tw, 2.4s) ease-in-out var(--twd, 0s) infinite alternate; }
@keyframes twinkle { from { opacity: 0.1; } to { opacity: 0.9; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid { --cols: 3 !important; }
  .density { display: none; }
  .brand-word { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-media { aspect-ratio: 4 / 3; min-height: 0; }
  .detail-media .mute-btn { left: 10px; right: auto; }
  .modal-detail { max-height: calc(100% - 24px); }
}
@media (max-width: 560px) {
  .grid { --cols: 2 !important; }
  .field-row { grid-template-columns: 1fr; }
  .toolbar { gap: 10px; }
  .pill { padding: 0 14px; }
  .footer-bar { justify-content: center; text-align: center; }
  .checkout-form input, .checkout-form textarea { font-size: 16px; } /* prevent iOS zoom */
  .modal .modal-head { padding: 20px 20px 16px; }
  .checkout-form { padding: 20px; }
  .search { flex: 1 1 0; min-width: 0; max-width: none; }
  .count { flex: 0 0 auto; white-space: nowrap; }
  .glassnav { gap: 2px; padding: 6px; }
  .hero { padding-top: 36px; }
}
