/* ═══════════════ RID STORE — NUFS-STYLE DESIGN SYSTEM ═══════════════
   Palet ikut video: merah #C11F2E · krem #FFF6DD · pink #FDECEC · emas #C9A05E
   hijau neon #00D84A · tinta #1B1B1B · neo-brutalism: border 2px + hard shadow */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --red: #C11F2E;
  --red-dark: #8F1420;
  --gold: #C9A05E;
  --gold-dark: #A37F3D;
  --gold-soft: #F3E3C0;
  --cream: #FFF6DD;
  --bg: #FDECEC;
  --surface: #FFFFFF;
  --surface-2: #FFF6DD;
  --ink: #1B1B1B;
  --heading: #1B1B1B;
  --muted: #8B8378;
  --faint: #B7AFA2;
  --border: #1B1B1B;
  --primary: #C11F2E;
  --primary-hover: #8F1420;
  --on-primary: #FFFFFF;
  --green: #00D84A;
  --green-dark: #0A8A35;
  --ok: #0A8A35;
  --ok-soft: #DFF7E5;
  --warn: #A37F3D;
  --warn-soft: #FFF3D6;
  --danger: #C11F2E;
  --danger-soft: #FBDDE0;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-xs: 2px 2px 0 var(--ink);
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --nav-h: 60px;
  --ease: cubic-bezier(.2, .9, .3, 1);
  --font: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

/* Kunci ke terang ala video (tanpa mode gelap). */
:root[data-theme="dark"] {
  --red: #C11F2E;
  --red-dark: #8F1420;
  --gold: #C9A05E;
  --gold-dark: #A37F3D;
  --gold-soft: #F3E3C0;
  --cream: #FFF6DD;
  --bg: #FDECEC;
  --surface: #FFFFFF;
  --surface-2: #FFF6DD;
  --ink: #1B1B1B;
  --heading: #1B1B1B;
  --muted: #8B8378;
  --faint: #B7AFA2;
  --border: #1B1B1B;
  --primary: #C11F2E;
  --primary-hover: #8F1420;
  --on-primary: #FFFFFF;
  --ok: #0A8A35;
  --ok-soft: #DFF7E5;
  --warn: #A37F3D;
  --warn-soft: #FFF3D6;
  --danger: #C11F2E;
  --danger-soft: #FBDDE0;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-xs: 2px 2px 0 var(--ink);
  color-scheme: light;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: #3a3a3a;
  color: var(--ink);
  min-height: 100dvh;
}
body.lock { overflow: hidden; }
img { max-width: 100%; }
button { font-family: inherit; }
.num, .price { font-variant-numeric: tabular-nums; }
.price { font-weight: 800; }
.hidden { display: none !important; }

.container { max-width: 480px; margin: 0 auto; background: var(--bg); min-height: 100dvh; position: relative; }

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

/* ── Topnav ala video: putih, border bawah ── */
.topnav {
  position: sticky; top: 0; z-index: 40;
  min-height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 2px solid var(--ink);
}
.topnav.scrolled { box-shadow: 0 4px 0 rgba(27,27,27,.08); }
.topnav-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topnav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 13px; flex: 0 0 auto;
  display: grid; place-items: center; cursor: pointer;
  background: #fff; color: var(--ink);
  border: 2px solid var(--ink); box-shadow: var(--shadow-xs);
}
.icon-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.icon-btn .theme-moon { display: none; }

/* Logo RID Store: hati merah + tulisan gradasi (lihat logoHtml di common.js) */
.logo { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.logo-heart { width: 30px; height: 30px; flex: 0 0 30px; }
.logo-text { font-size: 23px; font-weight: 900; letter-spacing: -.5px; background: linear-gradient(90deg, #A31226, #E86A1F); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.logo-rate { color: #F5A623; font-weight: 800; font-size: 14px; white-space: nowrap; }
.logo img, .logo-by { display: none !important; }

/* ── Tombol ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border-radius: 14px; cursor: pointer;
  font-size: 15px; font-weight: 800; text-decoration: none;
  border: 2px solid var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .08s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-soft { background: #fff; color: var(--ink); }
.btn-outline { background: #fff; color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; }
.link-btn { color: var(--red-dark); font-weight: 800; }

/* ── Teks pembantu ── */
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); font-weight: 800; }
.menu-empty {
  grid-column: 1 / -1;
  width: 100%;
  padding: 24px 20px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 2px dashed var(--gold);
  border-radius: var(--r-lg);
  box-sizing: border-box;
}
.menu-empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }

/* ── Banner tutup ── */
.closed-banner {
  margin: 12px 14px 0; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start;
  background: var(--danger-soft); border: 2px solid var(--ink); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  font-size: 13.5px;
}
.closed-banner strong { display: block; margin-bottom: 2px; }

/* ── Kartu & form ── */
.card { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.field {
  width: 100%; border: 2px solid var(--ink); border-radius: var(--r-sm);
  padding: 12px 14px; font-size: 15px; font-family: inherit; background: #fff; color: var(--ink); outline: none;
}
.field:focus { box-shadow: 0 0 0 3px rgba(0,216,74,.25); border-color: var(--green-dark); }
.field-label { display: block; font-size: 13px; font-weight: 800; margin: 14px 0 6px; }
.field-error { color: var(--danger); font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.field.invalid, .invalid { border-color: var(--danger) !important; }
textarea.field { resize: vertical; }
select.field { appearance: auto; }

/* ── Segmented / pills ── */
.seg { display: grid; grid-auto-flow: column; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { border: none; background: transparent; border-radius: 999px; padding: 9px 6px; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--ink); }
.seg button.active { background: var(--ink); color: #fff; }

.pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--ink); }
.pill-open { background: var(--ok-soft); color: var(--green-dark); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-close { background: var(--danger-soft); color: var(--danger); }

.badge {
  display: inline-flex; align-items: center;
  background: var(--green); color: #fff;
  font-size: 11px; font-weight: 900; letter-spacing: .3px;
  padding: 4px 10px; border-radius: 8px; border: 1.5px solid #06390f;
}
.price-normal { color: var(--faint); text-decoration: line-through; font-size: 12px; font-weight: 600; }
.save-badge {
  display: inline-block; background: #E6F9EC; color: var(--green-dark);
  border: 1.5px solid var(--green-dark); font-size: 12px; font-weight: 900;
  border-radius: 999px; padding: 2px 10px;
}

/* ── Skeleton & spinner ── */
.skel, .skel-card, .skel-row {
  border-radius: var(--r-md); border: 2px solid var(--ink);
  background: linear-gradient(100deg, #fff 30%, var(--cream) 50%, #fff 70%);
  background-size: 200% 100%; animation: shimmer 1.1s infinite linear;
}
.skel-card { height: 220px; }
.skel-row { height: 96px; margin: 10px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--gold-soft); border-top-color: var(--red); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.opt-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; padding: 10px 2px; }

/* ── Bottom sheets & dialog ala video ── */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: rgba(20, 8, 10, .55);
  align-items: flex-end; justify-content: center;
}
.sheet-backdrop.active { display: flex; }
.sheet {
  width: 100%; max-width: 480px; max-height: 88dvh; overflow-y: auto;
  background: var(--bg); border: 3px solid var(--ink); border-bottom: none;
  border-radius: 24px 24px 0 0; padding: 10px 16px 26px;
  animation: sheetUp .25s var(--ease);
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } }
.sheet-handle { width: 44px; height: 5px; border-radius: 99px; background: var(--ink); opacity: .25; margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheet-title { font-size: 20px; font-weight: 900; }
.sheet-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.close-btn {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px;
  display: grid; place-items: center; cursor: pointer;
  background: #fff; border: 2px solid var(--ink); box-shadow: var(--shadow-xs);
}
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }

.dialog-backdrop { align-items: center; padding: 20px; }
.dialog {
  width: 100%; max-width: 400px; background: #fff;
  border: 3px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink);
  padding: 24px 18px 18px; text-align: center; position: relative;
  animation: sheetUp .25s var(--ease);
}
.dialog .close-btn { position: absolute; top: 12px; right: 12px; }
.dialog-icon { width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; border: 2.5px solid var(--ink); }
.dialog-icon.ok, .dialog-icon.brand { background: var(--ok-soft); color: var(--green-dark); }
.dialog-icon.danger { background: var(--danger-soft); color: var(--danger); }
.dialog-title { font-size: 19px; font-weight: 900; }
.dialog-text { color: var(--muted); font-size: 14px; margin-top: 8px; line-height: 1.55; }
.dialog .btn { margin-top: 14px; }
.order-code-box { background: var(--cream); border: 2px solid var(--ink); border-radius: var(--r-md); padding: 12px; margin-top: 14px; }
.order-code { font-size: 26px; font-weight: 900; letter-spacing: 1px; }
.order-code-total { margin-top: 4px; color: var(--red); }

/* ── Drawer ── */
.drawer-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(20,8,10,.55); display: none; }
.drawer-overlay.active { display: block; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 50%; z-index: 96; width: min(340px, 88vw);
  transform: translate(-50%, 0) translateX(-110%); transition: transform .25s var(--ease);
  background: #fff; border-right: 3px solid var(--ink);
  display: flex; flex-direction: column; margin-left: -240px;
}
.drawer.active { transform: translate(-50%, 0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-bottom: 2px solid var(--ink); }
.drawer-nav { padding: 10px 14px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.drawer-label { margin: 12px 2px 4px; }
.drawer-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px;
  font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none;
  background: transparent; border: 2px solid transparent; cursor: pointer; text-align: left; width: 100%;
}
.drawer-link.active { background: var(--cream); border-color: var(--ink); }
.drawer-link .brand-ico { width: 26px; height: 26px; object-fit: contain; }
.drawer-foot { padding: 14px; border-top: 2px solid var(--ink); color: var(--muted); font-size: 12px; }

/* ── Toast ── */
.toast, #toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 200;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 14px;
  padding: 12px 20px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: 92vw; text-align: center;
  border: 2px solid #000;
}
.toast.show, #toast.show { opacity: 1; transform: translateX(-50%); }

/* ── Cart bar ── */
.cart-bar {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 80;
  width: min(448px, calc(100% - 28px));
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--ink); color: #fff; border: 2px solid #000; border-radius: 18px;
  padding: 12px 16px; cursor: pointer; box-shadow: 0 12px 30px rgba(0,0,0,.35);
  font-family: inherit;
}
.cart-bar.show { display: flex; }
.cart-bar.bump { animation: bump .35s var(--ease); }
@keyframes bump { 30% { transform: translateX(-50%) scale(1.04); } }
.cart-bar-left { display: flex; align-items: center; gap: 12px; }
.cart-bar-icon { position: relative; display: grid; place-items: center; }
.cart-bar-badge {
  position: absolute; top: -9px; right: -11px; min-width: 22px; height: 22px; padding: 0 5px;
  background: var(--red); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 900;
  display: grid; place-items: center; border: 2px solid #fff;
}
.cart-bar-text { text-align: left; }
.cart-bar-text b { display: block; font-size: 15px; }
.cart-bar-text small { opacity: .75; font-size: 12px; }
.cart-bar-right { display: flex; align-items: center; gap: 8px; }
.cart-bar-right .price { font-size: 16px; }
body.has-cart { padding-bottom: 0; }
.attention { animation: nudge .6s var(--ease) 2; }
@keyframes nudge { 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }

/* ── Info sheets: cara order / tentang / CS ── */
.timeline { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.tl-step { display: flex; gap: 12px; background: #fff; border: 2px solid var(--ink); border-radius: var(--r-md); padding: 12px; box-shadow: var(--shadow-xs); }
.tl-num { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 900; display: grid; place-items: center; border: 2px solid var(--ink); }
.tl-step h4 { font-size: 15px; }
.tl-step p { font-size: 13.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.fee-box { background: var(--cream); border: 2px solid var(--ink); border-radius: var(--r-md); padding: 12px 14px; margin-top: 14px; font-size: 13.5px; }
.fee-brand { font-weight: 900; margin-top: 8px; }
.fee-brand:first-of-type { margin-top: 6px; }
.about-list { display: flex; flex-direction: column; gap: 10px; }
.about-item { display: flex; gap: 12px; background: #fff; border: 2px solid var(--ink); border-radius: var(--r-md); padding: 12px; box-shadow: var(--shadow-xs); }
.about-item .ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; background: var(--gold-soft); border: 2px solid var(--ink); display: grid; place-items: center; }
.about-item h4 { font-size: 15px; }
.about-item p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.cs-admins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cs-admin {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px;
  border-radius: 999px; background: #fff; border: 2px solid var(--ink); font-weight: 800; font-size: 14px; cursor: pointer;
}
.cs-admin.active { background: var(--ink); color: #fff; }
.cs-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.cs-admin.active .cs-avatar { background: #fff; color: var(--ink); }
.cs-empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

/* ── Footer ── */
footer.foot, #foot {
  margin: 22px 14px 0; padding: 20px 16px 26px; text-align: center;
  background: #fff; border: 2px solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.foot-logo { height: 44px; object-fit: contain; }
.foot-tag { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.55; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 12px; }
.foot-links a, .foot-links button { background: none; border: none; color: var(--red-dark); font-weight: 800; font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit; }
.foot-legal { color: var(--faint); font-size: 11.5px; margin-top: 12px; line-height: 1.6; }

/* ── FAB WA ── */
.fab-wa, #fabWa {
  position: fixed; bottom: 86px; right: max(16px, calc(50% - 224px)); z-index: 70;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--green); color: #fff; display: grid; place-items: center;
  border: 2px solid var(--ink); box-shadow: var(--shadow-sm);
}
body.has-cart .fab-wa, body.has-cart #fabWa { bottom: 156px; }
