/* =====================================================================
   Etalase Toko WA — "Tiket Belanja" Design System v2
   Navy/Gold ledger identity + receipt-ticket signature motif.
   Mobile-first. All original IDs/classes preserved for JS compatibility.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Serif:wght@600;700&family=IBM+Plex+Mono:wght@500;600;700&display=swap');

:root {
  --navy-950: #05091c;
  --navy-900: #0b1330;
  --navy-800: #142149;
  --navy-700: #1c2f61;
  --navy-100: #e7ecf6;
  --gold-600: #b3873a;
  --gold-500: #c9a24b;
  --gold-400: #dab86c;
  --gold-300: #e8cd8f;
  --gold-100: #f4e8cc;
  /* --paper/--paper-dim/--paper-card dulu krem terang (tema "kertas nota"
     siang hari). Sekarang jadi permukaan navy gelap ("nota di bawah lampu
     meja butik malam hari") -- nama variabel sengaja TIDAK diganti supaya
     seluruh rule di bawah & di admin.css otomatis ikut berubah. */
  --paper: #080e24;
  --paper-dim: #05091c;
  --paper-card: #101c3f;
  /* --ink dulu navy gelap (teks di atas kertas terang), sekarang ivory
     hangat (teks di atas permukaan navy gelap). */
  --ink: #f3ecdd;
  --ink-soft: #8891ab;
  --ink-faint: #545a75;
  --line: rgba(201, 162, 75, 0.16);
  --line-strong: rgba(201, 162, 75, 0.32);
  --danger: #e0574c;
  --ok: #3fae6f;

  --gold-gradient: linear-gradient(135deg, #f3dfa8 0%, #c9a24b 45%, #9c7530 75%, #dab86c 100%);
  --navy-gradient: linear-gradient(160deg, #0e2049 0%, #08132b 60%, #0a1730 100%);
  --accent-rgb: 201,162,75; /* komponen RGB warna emas, dipakai di rgba() untuk glow/border */

  --font-display: 'IBM Plex Serif', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --radius-xl: 28px;
  /* Shadow gelap-di-atas-gelap nyaris tak kelihatan -- jadi elevasi kartu
     sekarang dibentuk dari kombinasi garis tepi tipis semu-terang (inset,
     seolah kena pantulan cahaya dari atas) + shadow hitam pekat untuk
     "menjatuhkan" kartu dari latar, bukan cuma shadow rgba(0,0,0,x) tipis
     seperti versi terang dulu (nyaris tak berefek di atas navy gelap). */
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 26px -12px rgba(0, 0, 0, 0.65);
  --shadow-card-hover: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 4px 10px rgba(0, 0, 0, 0.45), 0 18px 36px -14px rgba(0, 0, 0, 0.7);
  --shadow-pop: 0 24px 55px -14px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(var(--accent-rgb), 0.12);
  --shadow-gold-glow: 0 0 0 1px rgba(var(--accent-rgb), 0.4), 0 8px 24px -6px rgba(var(--accent-rgb), 0.5);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  background-image: radial-gradient(circle at 1px 1px, rgba(201, 162, 75, 0.07) 1px, transparent 0);
  background-size: 14px 14px;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }
input, textarea, select { font-family: inherit; }

:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header / Store info ---------- */
.store-header {
  background: var(--navy-gradient);
  color: var(--gold-100);
  padding: calc(16px + var(--safe-t)) 0 24px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(var(--accent-rgb),0.35);
}
.store-header::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Layer 1: garis perforasi nota (signature "tiket belanja"), layer 2:
     sorot emas redup dari kiri-atas -- efek "lampu sorot butik" kedua yang
     menyeimbangkan glow utama (::after) di kanan-bawah. */
  background-image:
    repeating-linear-gradient(to bottom, transparent 0, transparent 27px, rgba(255,255,255,0.035) 28px),
    radial-gradient(circle at -5% -40%, rgba(var(--accent-rgb),0.16), transparent 60%);
  pointer-events: none;
}
.store-header::after {
  content: "";
  position: absolute;
  inset: auto -10% -70% auto;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(var(--accent-rgb),0.4), transparent 70%);
  filter: blur(2px);
  pointer-events: none;
}
.store-header-inner { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.store-logo {
  width: 54px; height: 54px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold-400); flex-shrink: 0; background: var(--navy-700);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb),0.14), 0 6px 16px rgba(0,0,0,0.35);
}
.store-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 0; letter-spacing: 0.2px; line-height: 1.25; }
.store-meta {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--gold-300);
  margin-top: 4px; letter-spacing: 0.01em; display: flex; align-items: center; gap: 6px;
}
.store-meta::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(47,122,79,0.25); flex-shrink: 0;
}
.store-desc { margin-top: 14px; font-size: 13.5px; line-height: 1.55; color: var(--navy-100); max-width: 60ch; position: relative; z-index: 1; }

/* ---------- Banner promo ---------- */
.promo-banner {
  background: var(--gold-gradient);
  color: var(--navy-950);
  box-shadow: inset 0 -1px 0 rgba(10,23,48,0.12);
  overflow: hidden;
}
.promo-banner-image {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
}
.promo-banner-text-row {
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}
/* Kalau ada gambar, teks jadi caption kecil transparan di bawah gambar,
   bukan ribbon emas penuh seperti mode teks-saja. */
.promo-banner.has-image {
  background: var(--navy-950);
}
.promo-banner.has-image .promo-banner-text-row {
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 14px;
  justify-content: flex-start;
  text-align: left;
}

/* ---------- Toolbar controls (sort) ---------- */
.toolbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.sort-select {
  border: 1.5px solid var(--line);
  background: var(--paper-card);
  border-radius: var(--radius-s);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  min-height: 32px;
}

/* ---------- Search & filters ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 244, 236, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  padding: 12px 0 10px; border-bottom: 1px solid var(--line);
}
.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--paper-card);
  border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.15); }
.search-box input { border: none; outline: none; flex: 1; font-size: 15px; background: transparent; color: var(--ink); min-height: 22px; }
.search-box input::placeholder { color: var(--ink-faint); }
.search-icon { color: var(--ink-soft); flex-shrink: 0; }

.category-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.category-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 9px 16px; min-height: 36px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--paper-card); font-size: 13px; font-weight: 600;
  color: var(--ink-soft); white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.12s, box-shadow 0.2s;
  letter-spacing: 0.01em; display: flex; align-items: center; gap: 0;
}
.chip:active { transform: scale(0.96); }
.chip.active {
  background: var(--navy-gradient); border-color: var(--gold-500); color: var(--gold-300);
  box-shadow: 0 4px 12px -4px rgba(14,32,73,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
}
.chip-icon { display: none; }
.chip-label { display: block; }

/* ---------- Product grid ---------- */
.section-title {
  font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink);
  margin: 22px 0 12px; display: flex; align-items: baseline; gap: 8px; position: relative; padding-left: 12px;
}
.section-title::before {
  content: ""; position: absolute; left: 0; top: 2px; bottom: 3px; width: 3px; border-radius: 2px;
  background: var(--gold-gradient);
}
.section-title .count { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--ink-faint); }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-bottom: 28px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 960px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  background: var(--paper-card); border-radius: var(--radius-m); border: 1px solid var(--line);
  overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease; position: relative;
}
.product-card:active { transform: scale(0.965); box-shadow: var(--shadow-card); }
@media (hover: hover) {
  .product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
}

.product-thumb { aspect-ratio: 1 / 1; background: var(--paper-dim); position: relative; overflow: hidden; }
.product-thumb::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: radial-gradient(circle, var(--paper-card) 2.6px, transparent 2.7px);
  background-size: 12px 12px; background-position: 0 3px; transform: translateY(4px);
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--ink-faint); font-size: 11.5px; font-family: var(--font-mono); }
.badge-soldout {
  position: absolute; top: 8px; left: 8px; background: linear-gradient(135deg, #c94b44, #8f2c27); color: #fff;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 3px 9px;
  border-radius: 5px; letter-spacing: 0.04em; transform: rotate(-4deg);
  box-shadow: 0 3px 8px rgba(143,44,39,0.5), inset 0 1px 0 rgba(255,255,255,0.2); z-index: 1;
}

.product-info { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-cat { font-family: var(--font-mono); font-size: 10px; color: var(--gold-600); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.product-name {
  font-size: 13.5px; font-weight: 600; line-height: 1.32; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.product-price {
  font-family: var(--font-mono); font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); display: block;
}
.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price-original {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--ink-faint);
  text-decoration: line-through;
}
.badge-discount {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  background: linear-gradient(135deg, #e0433a, #b3231b); color: #fff;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 3px 7px;
  border-radius: 5px; box-shadow: 0 3px 8px rgba(179,35,27,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
}
.product-sold { font-size: 10.5px; color: var(--ink-faint); font-weight: 500; margin-top: -2px; }

.add-btn {
  margin-top: 6px; border: 1.5px solid var(--navy-900); background: var(--navy-gradient); color: var(--gold-300);
  border-radius: var(--radius-s); padding: 9px 10px; min-height: 38px; font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 2px 6px -2px rgba(10,23,48,0.4);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.add-btn:active { transform: scale(0.96); box-shadow: inset 0 1px 4px rgba(0,0,0,0.3); }
.add-btn:disabled { background: var(--paper-dim); border-color: var(--line); color: var(--ink-faint); box-shadow: none; }
.qty-stepper {
  margin-top: 6px; display: flex; align-items: center; justify-content: space-between;
  border: 1.5px solid var(--navy-900); border-radius: var(--radius-s); overflow: hidden; min-height: 38px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.qty-stepper button { background: var(--navy-gradient); color: var(--gold-300); border: none; width: 34px; height: 100%; font-size: 17px; font-weight: 700; transition: filter 0.15s ease; }
.qty-stepper button:active { filter: brightness(0.85); }
.qty-stepper .qty-value { flex: 1; text-align: center; font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--ink); background: var(--paper-card); }

.empty-state { text-align: center; padding: 56px 24px; color: var(--ink-soft); }
.empty-state::before {
  content: "";
  display: block;
  width: 76px; height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: inset 0 2px 6px rgba(10,23,48,0.06);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cabe9a' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"),
    radial-gradient(circle at 35% 30%, var(--paper-card), var(--paper-dim) 75%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: 30px, cover;
}
.empty-state h3 { font-family: var(--font-display); color: var(--ink); margin: 0 0 6px; font-size: 17px; }
.empty-state p { font-size: 13.5px; margin: 0; }

/* ---------- Sticky Cart Bar ---------- */
.sticky-cart-bar {
  position: fixed; left: 0; right: 0; z-index: 39;
  bottom: calc(60px + var(--safe-b));
  background: var(--navy-gradient); color: var(--gold-100);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; gap: 12px;
  box-shadow: 0 -6px 16px -4px rgba(10,23,48,0.25);
  border-top: 1px solid rgba(var(--accent-rgb),0.3);
}
.sticky-cart-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sticky-cart-count { font-size: 11px; color: var(--gold-300); font-weight: 600; }
.sticky-cart-total { font-family: var(--font-mono); font-size: 16px; font-weight: 700; }
.sticky-cart-btn {
  background: var(--gold-gradient); color: var(--navy-950); border: none; border-radius: var(--radius-s);
  padding: 10px 18px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px;
  flex-shrink: 0; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.sticky-cart-btn:active { transform: scale(0.96); }

/* ---------- Bottom Nav Bar ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(60px + var(--safe-b)); padding-bottom: var(--safe-b);
  background: #0a0a0a; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: stretch; justify-content: space-around;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.25);
}
.bottom-nav-item {
  flex: 1; background: none; border: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; color: rgba(255,255,255,0.55);
  font-size: 10.5px; font-weight: 600; position: relative; transition: color 0.15s ease;
}
.bottom-nav-item.active { color: var(--gold-500); }
.bottom-nav-item:active { transform: scale(0.94); }
.bottom-nav-badge {
  position: absolute; top: 2px; right: 22%;
  background: var(--danger); color: #fff; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  padding: 0 3px; box-shadow: 0 0 0 2px #0a0a0a;
}

.drawer-overlay { position: fixed; inset: 0; background: rgba(8,19,43,0.5); z-index: 50; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 86vh; width: 100%; max-width: none;
  background: var(--paper); z-index: 51; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex; flex-direction: column; box-shadow: 0 -20px 50px -20px rgba(8,19,43,0.5); padding-bottom: var(--safe-b);
}
.drawer.open { transform: translateY(0); }
.drawer::before {
  content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 4px; border-radius: 999px; background: var(--line-strong); z-index: 2;
}
@media (min-width: 720px) {
  .drawer {
    left: auto; right: 0; top: 0; bottom: 0; max-height: none; width: 100%; max-width: 420px;
    border-radius: 0; transform: translateX(100%); box-shadow: -20px 0 50px -20px rgba(8,19,43,0.4);
  }
  .drawer.open { transform: translateX(0); }
  .drawer::before { display: none; }
}

.drawer-header {
  padding: 22px 18px 14px; background: var(--navy-gradient); color: var(--gold-100);
  display: flex; align-items: center; justify-content: space-between; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-bottom: 1px solid rgba(var(--accent-rgb),0.3);
}
@media (min-width: 720px) { .drawer-header { border-radius: 0; padding-top: 18px; } }
.drawer-header h2 { font-family: var(--font-display); font-size: 17px; margin: 0; }
.drawer-header-actions { display: flex; align-items: center; gap: 10px; }
.drawer-clear {
  background: none; border: none; color: var(--gold-300); font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 8px; border-radius: var(--radius-s);
  opacity: 0.75; transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.drawer-clear:active { opacity: 1; }
.drawer-clear.confirming { background: var(--danger); color: #fff; opacity: 1; }
.drawer-close {
  background: rgba(255,255,255,0.08); border: none; color: var(--gold-300); font-size: 20px; line-height: 1;
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

.drawer-body { flex: 1; overflow-y: auto; padding: 14px 18px; -webkit-overflow-scrolling: touch; }

.cart-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); }
.cart-item img { width: 56px; height: 56px; border-radius: var(--radius-s); object-fit: cover; background: var(--paper-dim); flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.cart-item-price { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.cart-item-remove { font-size: 11.5px; color: var(--danger); font-weight: 700; margin-top: 7px; background: none; border: none; padding: 0; text-transform: uppercase; letter-spacing: 0.03em; }

.drawer-footer { position: relative; padding: 20px 18px 18px; background: var(--paper-card); border-top: none; }
.drawer-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background-image: linear-gradient(to right, var(--line-strong) 0 6px, transparent 6px 12px);
  background-size: 12px 1px; background-repeat: repeat-x;
}
.form-field { margin-bottom: 12px; }
.form-field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.03em; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px;
  font-size: 14.5px; font-family: inherit; background: var(--paper-card); color: var(--ink); transition: border-color 0.15s ease;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--gold-500); outline: none; }
.cart-total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; padding-top: 4px; }
.cart-total-row .label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.cart-total-row .value {
  font-family: var(--font-mono); font-size: 22px; font-weight: 700;
  background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn-wa {
  width: 100%; background: linear-gradient(160deg, #34e07a 0%, #25D366 55%, #1fb955 100%); color: #06301a; border: none; border-radius: var(--radius-s);
  padding: 14px; min-height: 50px; font-weight: 700; font-size: 14.5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 10px 22px -8px rgba(37,211,102,0.6); transition: transform 0.1s ease;
  text-decoration: none;
}
.btn-wa:active { transform: scale(0.97); }
.btn-wa:disabled { background: var(--paper-dim); color: var(--ink-faint); box-shadow: none; }

.footer-note { text-align: center; padding: 26px 16px calc(130px + var(--safe-b)); font-size: 11.5px; color: var(--ink-faint); font-family: var(--font-mono); }

/* ---------- Product detail modal ---------- */
.pd-overlay {
  position: fixed; inset: 0; background: rgba(8,19,43,0.55); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.pd-overlay.open { opacity: 1; pointer-events: auto; }
.pd-sheet {
  background: var(--paper); width: 100%; max-width: 480px; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 88vh; overflow-y: auto; transform: translateY(24px); transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative; padding-bottom: var(--safe-b); -webkit-overflow-scrolling: touch;
}
.pd-sheet::before {
  content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.85); z-index: 3; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.pd-overlay.open .pd-sheet { transform: translateY(0); }
.pd-image { width: 100%; aspect-ratio: 1/1; background: var(--paper-dim); object-fit: cover; }

/* Galeri multi-foto: horizontal scroll-snap + dot indicator */
.pd-gallery { position: relative; }
.pd-gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pd-gallery-track::-webkit-scrollbar { display: none; }
.pd-gallery-slide {
  flex: 0 0 100%; width: 100%; aspect-ratio: 1/1; object-fit: cover; scroll-snap-align: start; background: var(--paper-dim);
}
.pd-gallery-dots {
  position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; z-index: 2;
}
.pd-gallery-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.55); transition: background 0.15s ease, transform 0.15s ease; }
.pd-gallery-dot.active { background: #fff; transform: scale(1.3); }

.pd-close-btn {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(8,19,43,0.55); color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, transform 0.12s ease;
}
.pd-close-btn:active { transform: scale(0.9); background: rgba(8,19,43,0.75); }
.pd-content { padding: 20px 20px 26px; }
.pd-content-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pd-share-btn {
  background: var(--paper-dim); border: 1px solid var(--line); color: var(--ink-soft);
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s ease, transform 0.12s ease;
}
.pd-share-btn:active { transform: scale(0.92); background: var(--paper-card); }
.pd-content h2 { font-family: var(--font-display); font-size: 19px; margin: 6px 0 6px; color: var(--ink); line-height: 1.3; }
.pd-price {
  font-family: var(--font-mono); font-size: 19px; font-weight: 700; margin-bottom: 12px; display: block;
  background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.price-row.pd-price-row { margin-bottom: 12px; }
.price-row.pd-price-row .pd-price { margin-bottom: 0; }
.pd-badges-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pd-discount-badge {
  display: inline-block; background: linear-gradient(135deg, #e0433a, #b3231b); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
.pd-sold-badge { font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }
.pd-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.65; margin-bottom: 18px; white-space: pre-wrap; }

/* ---------- Modal Info Toko ---------- */
.store-info-content { padding-top: 28px; text-align: center; }
.store-info-logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 2px solid var(--gold-400); }
.store-info-content h2 { font-family: var(--font-display); font-size: 19px; color: var(--ink); margin: 0 0 6px; }
.store-info-meta { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 14px; line-height: 1.6; }
.store-info-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 20px; text-align: left; white-space: pre-wrap; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: calc(90px + var(--safe-b)); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy-gradient); color: var(--gold-100); padding: 12px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 500; z-index: 70; opacity: 0;
  border: 1px solid rgba(var(--accent-rgb),0.35);
  box-shadow: 0 14px 30px -10px rgba(8,19,43,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; white-space: nowrap;
  max-width: 88vw; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.skeleton { background: linear-gradient(90deg, var(--paper-dim) 25%, #e4dcc7 37%, var(--paper-dim) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* =====================================================================
   TEMA ALTERNATIF
   Semua rule di atas pakai CSS variable, jadi tema lain cukup override
   variable + matikan beberapa motif spesifik "tiket/ledger" yang cuma
   cocok untuk tema Default (perforasi, garis ledger, font serif).
   ===================================================================== */

[data-theme="shopee"], [data-theme="tiktokshop"] {
  --font-display: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

/* Matikan motif tiket/ledger yang cuma cocok untuk tema Default */
[data-theme="shopee"] .store-header::before,
[data-theme="tiktokshop"] .store-header::before,
[data-theme="shopee"] .product-thumb::after,
[data-theme="tiktokshop"] .product-thumb::after {
  display: none;
}
[data-theme="shopee"] .section-title,
[data-theme="tiktokshop"] .section-title { padding-left: 0; }
[data-theme="shopee"] .section-title::before,
[data-theme="tiktokshop"] .section-title::before { display: none; }

/* Harga/total default pakai trik gradient-text (background-clip). Shopee
   pakai warna solid biasa, jadi reset total ke rule normal dulu di sini,
   supaya tidak "invisible" karena warisan background-clip:text + transparent. */
[data-theme="shopee"] .cart-total-row .value,
[data-theme="shopee"] .pd-price {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: initial;
  color: var(--gold-500);
}

/* ---------- Tema: Shopee ---------- */
[data-theme="shopee"] {
  --navy-950: #b6390c;
  --navy-900: #ee4d2d;
  --navy-800: #f0602f;
  --navy-700: #f4784a;
  --navy-gradient: linear-gradient(155deg, #f5531d 0%, #ee4d2d 55%, #d8430f 100%);
  --gold-300: #ffffff;
  --gold-400: #ffe4d6;
  --gold-500: #ee4d2d;
  --gold-600: #ee4d2d;
  --gold-gradient: linear-gradient(135deg, #ee4d2d, #ee4d2d);
  --accent-rgb: 238,77,45;
  --paper: #f5f5f5;
  --paper-dim: #ececec;
  --paper-card: #ffffff;
  --radius-s: 4px;
  --radius-m: 6px;
  --radius-l: 12px;
  --radius-xl: 16px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 2px 6px rgba(0,0,0,0.1);
}
[data-theme="shopee"] .product-card { border-width: 1px; }
[data-theme="shopee"] .cart-total-row .value,
[data-theme="shopee"] .pd-price { color: var(--gold-500); }

/* Chip kategori jadi ikon bundar ala Shopee, bukan pill teks */
[data-theme="shopee"] .category-chips { gap: 14px; padding: 10px 2px 4px; align-items: flex-start; }
[data-theme="shopee"] .chip {
  flex-direction: column; background: none; border: none; padding: 0; width: 60px;
  min-height: auto; gap: 6px; box-shadow: none;
}
[data-theme="shopee"] .chip:active { transform: scale(0.94); }
[data-theme="shopee"] .chip.active { background: none; box-shadow: none; color: var(--ink-soft); }
[data-theme="shopee"] .chip-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy-gradient); color: #fff; font-weight: 700; font-size: 17px;
  box-shadow: 0 3px 8px rgba(var(--accent-rgb), 0.35);
}
[data-theme="shopee"] .chip.active .chip-icon { box-shadow: 0 0 0 2px var(--navy-900), 0 3px 8px rgba(var(--accent-rgb), 0.4); }
[data-theme="shopee"] .chip-label {
  font-size: 11px; font-weight: 600; color: var(--ink-soft); text-align: center;
  line-height: 1.25; white-space: normal; max-width: 62px;
}
[data-theme="shopee"] .chip.active .chip-label { color: var(--ink); font-weight: 700; }
[data-theme="shopee"] .product-name { font-weight: 700; }
[data-theme="shopee"] .badge-discount,
[data-theme="shopee"] .pd-discount-badge { background: linear-gradient(135deg, #ff6a00, #e00000); }

/* ---------- Tema: TikTokShop ---------- */
[data-theme="tiktokshop"] {
  --navy-950: #000000;
  --navy-900: #121212;
  --navy-800: #2a2a2a;
  --navy-700: #3f3f3f;
  --navy-gradient: linear-gradient(155deg, #1a1a1a 0%, #000000 70%, #0d0d0d 100%);
  --gold-300: #ffffff;
  --gold-400: #ffd6e2;
  --gold-500: #fe2c55;
  --gold-600: #fe2c55;
  --gold-gradient: linear-gradient(120deg, #fe2c55 0%, #ff0050 50%, #fe2c55 100%);
  --accent-rgb: 254,44,85;
  --paper: #ffffff;
  --paper-dim: #f5f5f5;
  --paper-card: #ffffff;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius-xl: 20px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 4px 10px rgba(0,0,0,0.12);
}
[data-theme="tiktokshop"] .add-btn,
[data-theme="tiktokshop"] .sticky-cart-btn {
  background: linear-gradient(120deg, #fe2c55, #121212 65%);
}
[data-theme="tiktokshop"] .chip { border-color: #e5e5e5; }
[data-theme="tiktokshop"] .chip.active {
  background: var(--gold-gradient); border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px -4px rgba(254,44,85,0.5);
}
[data-theme="tiktokshop"] .product-name { font-weight: 700; }
[data-theme="tiktokshop"] .badge-discount,
[data-theme="tiktokshop"] .pd-discount-badge { background: var(--gold-gradient); }
[data-theme="tiktokshop"] .section-title { font-weight: 800; }
