:root {
  --mist: #EEF3F4;
  --surface: #FFFFFF;
  --ink: #14232B;
  --ink-soft: #4E626B;
  --line: #D5DFE2;
  --teal: #0E5E6F;
  --teal-deep: #0A4552;
  --marigold: #F2A900;
  --marigold-soft: #FFF3D1;
  --sold: #C9D5D9;
  --alert: #B4410F;
  --ok: #1D7A4A;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --display: 'Bricolage Grotesque', 'Hind', system-ui, sans-serif;
  --body: 'Hind', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mist: #0F1A1F; --surface: #17252C; --ink: #E7EFF1; --ink-soft: #9FB2B9; --line: #2A3B43;
    --teal: #4FB3C4; --teal-deep: #7CCBD8; --marigold: #F5B91F; --marigold-soft: #3A2F10; --sold: #33464E;
    --alert: #F08A5D; --ok: #5CC08B; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--mist); color: var(--ink);
  font: 400 17px/1.5 var(--body); padding-bottom: 84px;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--mist) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top-inner { max-width: 1120px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.brand-wrap { flex: 1; }
.brand { font: 700 22px/1 var(--display); letter-spacing: -0.02em; margin: 0; }
.byline { margin: 3px 0 0; font-size: 13px; color: var(--ink-soft); }
.bell { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 15px; }

/* ---------- intro ---------- */
.intro { max-width: 1120px; margin: 0 auto; padding: 28px 16px 8px; }
.intro h2 { font: 700 clamp(30px, 6vw, 52px)/1.05 var(--display); letter-spacing: -0.03em; margin: 0 0 10px; max-width: 18ch; }
.intro p { margin: 0; color: var(--ink-soft); max-width: 52ch; }

/* ---------- product grid ---------- */
.grid {
  max-width: 1120px; margin: 0 auto; padding: 20px 16px 32px;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); display: flex; flex-direction: column; text-align: left; padding: 0;
}
.card:first-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .card:first-child { flex-direction: row; } .card:first-child .card-img { width: 48%; aspect-ratio: auto; min-height: 320px; } }
.card-img { aspect-ratio: 4 / 3; background: var(--mist); object-fit: cover; width: 100%; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font: 600 20px/1.2 var(--display); margin: 0; letter-spacing: -0.01em; }
.card:first-child h3 { font-size: clamp(22px, 3vw, 32px); }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price { font: 700 26px/1 var(--display); color: var(--teal); }
.mrp { color: var(--ink-soft); text-decoration: line-through; }
.delivery { margin: -4px 0 0; color: var(--ink-soft); font-size: 15px; }
.beats { margin: 0; color: var(--ok); font-weight: 600; font-size: 15px; }
.order .meta span { display: block; }
.save { background: var(--marigold-soft); color: var(--ink); border-radius: 6px; padding: 1px 8px; font-weight: 600; font-size: 15px; }
.closing { color: var(--ink-soft); font-size: 15px; margin: 0; }
.closing.soon { color: var(--alert); font-weight: 600; }

/* The signature element: one seat per unit of stock. */
.seats { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.seat { width: 18px; height: 18px; border-radius: 5px 5px 3px 3px; background: var(--marigold); }
.seat.taken { background: var(--sold); }
.seats-label { font-size: 15px; color: var(--ink-soft); margin-left: 6px; }
.seats-label strong { color: var(--ink); }
.seat-bar { height: 10px; border-radius: 99px; background: var(--sold); overflow: hidden; flex: 1; min-width: 120px; }
.seat-bar span { display: block; height: 100%; background: var(--marigold); }
.badge-out { font-weight: 600; color: var(--ink-soft); }

.empty { grid-column: 1 / -1; text-align: center; padding: 60px 16px; color: var(--ink-soft); }
.empty h3 { font: 600 22px var(--display); color: var(--ink); margin: 0 0 6px; }

/* ---------- bottom nav ---------- */
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: center;
  background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.tabs button {
  flex: 1; max-width: 200px; background: none; border: 0; padding: 8px 4px; border-radius: 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 14px; color: var(--ink-soft);
}
.tabs button svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--teal); font-weight: 600; }

/* ---------- views ---------- */
.view { max-width: 720px; margin: 0 auto; padding: 24px 16px; }
.view h2 { font: 700 30px/1.1 var(--display); letter-spacing: -0.02em; margin: 0 0 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 14px; }
.share-url { display: flex; gap: 8px; margin: 12px 0; }
.share-url input { flex: 1; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--mist); }
.joined { font: 700 44px/1 var(--display); color: var(--teal); }
.order { display: flex; gap: 12px; align-items: center; }
.order img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--mist); }
.order .meta { flex: 1; min-width: 0; }
.order .meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { font-size: 14px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--mist); }
.status.paid, .status.shipped, .status.delivered { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.status.held { background: var(--marigold-soft); }
.status.unfulfilled { color: var(--alert); }
.check.final { margin-top: 14px; background: var(--marigold-soft); border-radius: 12px; padding: 10px 12px; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--teal); color: #fff; font-weight: 600; padding: 14px 22px; border-radius: 14px; font-size: 17px; text-decoration: none;
}
.btn:hover { background: var(--teal-deep); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn.whatsapp { background: #1F8F4E; }
label { display: block; font-size: 15px; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=tel], input[type=number], textarea, select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
input:focus, textarea:focus, select:focus { border-color: var(--teal); outline: none; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--teal); }
.error { color: var(--alert); font-size: 15px; min-height: 1em; margin: 8px 0 0; }
.muted { color: var(--ink-soft); font-size: 15px; }

/* ---------- bottom sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgb(10 25 30 / .5); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--surface); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
  border-radius: 22px 22px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); position: relative;
  animation: rise .22s ease-out;
}
@media (min-width: 720px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; } }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet:focus { outline: none; }
.sheet-handle { width: 44px; height: 5px; background: var(--line); border-radius: 9px; margin: 6px auto 12px; }
.sheet-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 99px; background: var(--surface) !important; background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink-soft); padding: 4px 8px; }
.sheet h3 { font: 700 24px/1.15 var(--display); margin: 4px 0 10px; letter-spacing: -0.01em; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px 14px; padding: 0 18px; }
.gallery img { scroll-snap-align: start; width: 86%; flex: none; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; background: var(--mist); }
.gallery img:only-child { width: 100%; }
.desc { white-space: pre-line; color: var(--ink-soft); }
.totals { width: 100%; border-collapse: collapse; margin: 12px 0; }
.totals td { padding: 6px 0; }
.totals td:last-child { text-align: right; }
.totals tr:last-child td { font-weight: 700; font-size: 20px; border-top: 1px solid var(--line); padding-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-width: 48px; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.chip[aria-pressed="true"] { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, var(--surface)); color: var(--teal); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; }
.qty button { background: none; border: 0; width: 44px; height: 44px; font-size: 22px; cursor: pointer; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.hold-timer { background: var(--marigold-soft); border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-weight: 600; }
.success { text-align: center; padding: 20px 0 6px; }
.success .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 34px; display: grid; place-items: center; margin: 0 auto 12px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 12px; z-index: 60; }
