:root {
  /* Warna dasar (bisa diganti oleh tema lewat /js/themes.js) */
  --bg: #0c0c11;
  --card: #17171e;
  --card-2: #1e1e27;
  --accent: #ff3358;
  --accent-2: #ff6b81;
  --accent-3: #ff6b3d;   /* ujung gradasi tombol */
  --on-accent: #ffffff;  /* warna teks di atas warna aksen */
  --text: #f4f4f6;
  --muted: #9a9aa5;
  --border: #2a2a34;
  --danger: #ff6b81;
  --ok: #4ade80;

  /* Turunan (dihitung otomatis dari warna di atas kalau browser mendukung) */
  --accent-soft: rgba(255, 51, 88, 0.09);
  --bg-blur: rgba(12, 12, 17, 0.95);
  --grid: rgba(255, 255, 255, 0.055);
  --star-off: #3a3a46;
  --text-soft: #d6d6dc;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
    --bg-blur: color-mix(in srgb, var(--bg) 95%, transparent);
    --grid: color-mix(in srgb, var(--text) 5.5%, transparent);
    --star-off: color-mix(in srgb, var(--text) 22%, var(--bg));
    --text-soft: color-mix(in srgb, var(--text) 86%, var(--muted));
  }
}

* { box-sizing: border-box; }

/* ---- Icon logos (replace emoji) ---- */
.ic { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; }
.ic-sm { width: 14px; height: 14px; vertical-align: -2px; }
.ic-lg { width: 28px; height: 28px; }
.ic-xl { width: 44px; height: 44px; }

body {
  margin: 0;
  background-color: var(--bg);
  /* Background garis kotak-kotak */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  padding-bottom: 78px;
}

a { color: inherit; text-decoration: none; }

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

/* ---- Header ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
}
.topbar .greet { display: flex; align-items: center; gap: 10px; flex: 1; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card-2); display: flex; align-items: center; justify-content: center;
  font-weight: 700; border: 1px solid var(--border);
}
.greet-text { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .greet { min-width: 0; }
.greet-text b { color: var(--accent-2); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; position: relative;
  background: var(--card-2); border: 1px solid var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  padding: 0; cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn.playing { color: var(--accent-2); border-color: var(--accent); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--card-2); }
/* Tombol musik + lonceng (di topbar dan header halaman produk) */
.music-ctl { display: none; }
.music-ctl.show { display: contents; }
[data-tools-slot] { display: contents; }

/* ---- Section titles ---- */
.section-title {
  color: var(--accent-2); text-transform: uppercase; letter-spacing: 2px;
  font-size: 13px; font-weight: 700; margin: 18px 0 10px; text-align: center;
}
.section-title .count { color: var(--muted); font-weight: 400; letter-spacing: 0; text-transform: none; }

/* ---- Cards / stats ---- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px;
}
.stat-row { display: flex; gap: 10px; margin: 14px 0; }
.stat { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 8px; text-align: center; }
.stat b { display: block; font-size: 20px; }
.stat span { color: var(--muted); font-size: 12px; }

/* ---- Search + tabs ---- */
.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--card);
  border: 1px solid var(--border); border-radius: 999px; padding: 12px 16px; margin-bottom: 12px;
}
.search-box input {
  background: transparent; border: none; outline: none; color: var(--text); flex: 1; font-size: 14px;
}
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 6px; }
.tab {
  white-space: nowrap; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--muted); font-size: 13px; cursor: pointer;
}
.tab.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---- Product grid ---- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px; }
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.product-thumb {
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  font-size: 40px; background: linear-gradient(160deg, var(--card-2), var(--bg)); position: relative;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 6px; right: 6px; font-size: 9px; padding: 3px 7px; border-radius: 8px;
  background: var(--bg-blur); border: 1px solid var(--border); color: var(--accent-2);
}
.product-info { padding: 8px; text-align: center; }
.product-name { font-size: 12px; font-weight: 600; margin-bottom: 8px; line-height: 1.2; min-height: 28px; }
.btn-lihat {
  display: block; width: 100%; padding: 7px 0; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent-soft); color: var(--accent-2); font-size: 12px; font-weight: 700; cursor: pointer;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px; border-radius: 12px; border: none; font-size: 14px; font-weight: 700; cursor: pointer;
  width: 100%;
}
.btn-primary { background: linear-gradient(90deg, var(--accent), var(--accent-3)); color: var(--on-accent); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-wa { background: #25d366; color: #06210f; }
.btn-tele { background: #2aa1de; color: #05202e; }
.btn-secondary { background: var(--card-2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-sm { padding: 8px 12px; font-size: 12px; width: auto; }

/* ---- Forms ---- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: var(--card-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--text); font-size: 14px; outline: none;
}
.form-group textarea { resize: vertical; min-height: 70px; }
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }
.hint { font-size: 12px; color: var(--muted); margin-top: -8px; margin-bottom: 14px; }
.error-msg { color: var(--danger); font-size: 13px; margin-bottom: 10px; min-height: 16px; }
.success-msg { color: var(--ok); font-size: 13px; margin-bottom: 10px; min-height: 16px; }

.auth-page { min-height: 90vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { text-align: center; margin-bottom: 4px; }
.auth-card p.sub { text-align: center; color: var(--muted); margin-top: 0; margin-bottom: 22px; font-size: 13px; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--accent-2); font-weight: 600; }

/* ---- Toggle switch ---- */
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; inset: 0; background: var(--card-2); border: 1px solid var(--border);
  border-radius: 999px; cursor: pointer; transition: 0.2s;
}
.toggle .slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: var(--muted); border-radius: 50%; transition: 0.2s;
}
.toggle input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .slider::before { transform: translateX(20px); background: #fff; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---- Bottom nav ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: var(--bg-blur); border-top: 1px solid var(--border);
  display: flex; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(6px);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-size: 11px; padding: 6px 0; border-radius: 10px;
}
.bottom-nav a.active { color: var(--accent-2); background: var(--accent-soft); }
.bottom-nav a .ic { font-size: 18px; }

/* ---- Info marquee ---- */
.info-bar {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; font-size: 12px; color: var(--muted); margin-bottom: 14px;
  display: flex; gap: 8px; align-items: center;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  width: 100%; max-width: 380px; padding: 20px; max-height: 85vh; overflow-y: auto;
}
.modal-box h3 { margin-top: 0; }
.modal-close { float: right; cursor: pointer; color: var(--muted); font-size: 18px; }

/* ---- AI widget ---- */
.ai-fab {
  position: fixed; right: 16px; bottom: 90px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35); border: none;
}
.ai-panel {
  position: fixed; right: 16px; bottom: 154px; z-index: 60; width: min(320px, 88vw);
  height: 420px; background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  display: none; flex-direction: column; overflow: hidden;
}
.ai-panel.open { display: flex; }
.ai-head { padding: 12px 14px; background: var(--card-2); display: flex; justify-content: space-between; align-items: center; }
.ai-body { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; }
.ai-msg.bot { background: var(--card-2); align-self: flex-start; }
.ai-msg.user { background: var(--accent); color: var(--on-accent); align-self: flex-end; }
.ai-input-row { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--border); }
.ai-input-row input {
  flex: 1; background: var(--card-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 14px; color: var(--text); outline: none; font-size: 13px;
}
.ai-input-row button {
  background: var(--accent); border: none; color: var(--on-accent); border-radius: 999px; width: 40px; cursor: pointer;
}

/* ---- Admin ---- */
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.list-item {
  display: flex; align-items: center; gap: 10px; background: var(--card-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
.list-item .li-main { flex: 1; font-size: 13px; }
.list-item .li-main small { display: block; color: var(--muted); }

.empty-state { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 13px; }

/* ---- Statistik ---- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.stat-card b { display: block; font-size: 22px; }
.stat-card span { color: var(--muted); font-size: 12px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.bar-row .bar-label { width: 60px; color: var(--muted); flex-shrink: 0; }
.bar-track { flex: 1; height: 10px; background: var(--card-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.bar-count { width: 22px; text-align: right; color: var(--muted); flex-shrink: 0; }
.chart-cols { display: flex; align-items: flex-end; gap: 8px; height: 110px; margin-bottom: 6px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.chart-col .col-fill { width: 100%; background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-radius: 6px 6px 0 0; min-height: 4px; }
.chart-col .col-label { font-size: 10px; color: var(--muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.on { background: var(--ok); }
.status-dot.off { background: #6b6b76; }

/* ---- Entry gate: verification + loading ---- */
.gate-overlay {
  position: fixed; inset: 0; z-index: 999; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  transition: opacity 0.4s ease;
}
.gate-overlay.gate-hide { opacity: 0; pointer-events: none; }
.gate-box { width: 100%; max-width: 360px; text-align: center; }
.gate-stage { display: none; }
.gate-stage.active { display: block; }

.gate-shield { color: var(--accent-2); margin-bottom: 14px; }
.gate-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.gate-sub { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.gate-check-row {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-align: left;
}
.gate-spinner {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid var(--border); border-top-color: var(--accent);
  animation: gate-spin 0.7s linear infinite;
}
.gate-check-row.done .gate-spinner {
  border: none; animation: none; display: flex; align-items: center; justify-content: center;
  background: var(--ok); color: #06210f;
}
@keyframes gate-spin { to { transform: rotate(360deg); } }
.gate-check-label { font-size: 13px; flex: 1; }
.gate-check-label small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.gate-foot { margin-top: 16px; font-size: 10px; color: var(--muted); letter-spacing: 0.5px; }

.gate-name {
  font-size: 22px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase;
  display: flex; justify-content: center; flex-wrap: wrap; margin-bottom: 26px;
}
.gate-name .gl {
  display: inline-block; opacity: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  animation: gate-wave 2.2s ease-in-out infinite;
}
.gate-name .gsp { width: 10px; display: inline-block; }
@keyframes gate-wave {
  0% { opacity: 0; } 20% { opacity: 1; } 55% { opacity: 1; } 75% { opacity: 0; } 100% { opacity: 0; }
}
.gate-bar-track { width: 100%; max-width: 260px; height: 3px; margin: 0 auto; overflow: visible; position: relative; }
.gate-bar {
  height: 100%; width: 55%; border-radius: 3px; margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--accent-2), var(--accent), transparent);
  animation: gate-bar-move 1.5s ease-in-out infinite;
}
@keyframes gate-bar-move {
  0% { transform: translateX(-70px) scaleX(0.3); opacity: 0.35; }
  25% { transform: translateX(0) scaleX(1); opacity: 1; }
  50% { transform: translateX(70px) scaleX(0.3); opacity: 0.35; }
  75% { transform: translateX(0) scaleX(1); opacity: 1; }
  100% { transform: translateX(-70px) scaleX(0.3); opacity: 0.35; }
}
.gate-loading-label { margin-top: 16px; font-size: 11px; letter-spacing: 3px; color: var(--muted); text-transform: uppercase; }
.gated { visibility: hidden; }

/* ---- Kartu produk sebagai link ---- */
a.product-card { color: inherit; }
.btn-lihat { text-align: center; }
.card-rating { font-size: 11px; color: var(--muted); margin: -4px 0 8px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.card-rating small { color: var(--muted); }

/* ---- Bintang ---- */
.star { width: 16px; height: 16px; color: var(--star-off); fill: currentColor; stroke: currentColor; stroke-width: 1; vertical-align: -3px; }
.star.on { color: #ffb02e; }
.stars { display: inline-flex; gap: 1px; align-items: center; }

/* ---- Halaman produk ---- */
.pd-header {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  position: sticky; top: 0; z-index: 30; background: var(--bg-blur); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.pd-header-title { flex: 1; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd .section-title { margin-top: 22px; }

.gallery { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--card-2); }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-empty { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; color: var(--accent-2); background: linear-gradient(160deg, var(--card-2), var(--bg)); }
.gallery-badge { top: 10px; right: 10px; font-size: 11px; }
.gallery-count {
  position: absolute; left: 10px; bottom: 10px; font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255,255,255,0.15); color: #fff;
}
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 2px; scrollbar-width: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex: 0 0 60px; width: 60px; height: 60px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid var(--border); background: var(--card); opacity: 0.65;
}
.gallery-thumb.active { border-color: var(--accent); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pd-info { margin-top: 14px; }
.pd-cat { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.pd-name { font-size: 22px; margin: 4px 0 6px; line-height: 1.25; }
.pd-price { font-size: 20px; font-weight: 800; color: var(--accent-2); margin-bottom: 8px; }
.pd-rating-line { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.pd-caption { font-size: 14px; line-height: 1.6; color: var(--text-soft); white-space: pre-line; border-top: 1px solid var(--border); padding-top: 12px; }

/* ---- Ulasan ---- */
.rv-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.rv-avg { font-size: 38px; font-weight: 800; line-height: 1; }
.rv-summary .star { width: 18px; height: 18px; }
.rv-count { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rv-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.rv-form-title { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.rv-form-title b { color: var(--text); }
.rv-login { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.star-picker { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.star-picker button { background: none; border: none; padding: 4px; cursor: pointer; line-height: 0; color: var(--star-off); }
.star-picker button .star { width: 32px; height: 32px; color: inherit; }
.star-picker button.on { color: #ffb02e; }
.star-label { font-size: 12px; color: var(--muted); margin-left: 6px; }

.rv-item { padding: 14px; margin-bottom: 10px; }
.rv-head { display: flex; align-items: center; gap: 10px; }
.rv-avatar { width: 34px; height: 34px; font-size: 14px; flex-shrink: 0; }
.rv-who { flex: 1; font-size: 13px; min-width: 0; }
.rv-who b { overflow-wrap: anywhere; }
.rv-who small { display: block; color: var(--muted); font-size: 11px; }
.rv-mine { font-size: 10px; color: var(--accent-2); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.rv-text { margin-top: 10px; font-size: 13px; line-height: 1.55; color: var(--text-soft); white-space: pre-line; overflow-wrap: anywhere; }
.rv-del { margin-top: 10px; }

/* ---- Tombol beli (bawah) ---- */
.buy-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-blur); border-top: 1px solid var(--border); backdrop-filter: blur(6px);
}
.buy-price small { display: block; font-size: 10px; color: var(--muted); }
.buy-price b { font-size: 16px; color: var(--accent-2); white-space: nowrap; }
.buy-bar .btn { flex: 1; }
body:has(.buy-bar) { padding-bottom: 90px; }
body:has(.buy-bar) .ai-fab { bottom: 96px; }
body:has(.buy-bar) .ai-panel { bottom: 160px; }

/* Modal pilihan beli tampil sebagai sheet dari bawah */
.modal-overlay.sheet { align-items: flex-end; padding: 0; }
.modal-overlay.sheet .modal-box { max-width: 720px; border-radius: 18px 18px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }

/* poles */
.product-info { flex: 1; display: flex; flex-direction: column; }
.product-info .btn-lihat { margin-top: auto; }
.rv-who { line-height: 1.6; }

/* Ikon HTML (<svg data-icon="...">) yang belum terisi tetap punya ukuran, supaya layout tidak loncat */
svg[data-icon]:not([viewBox]) { width: 18px; height: 18px; }
svg.ic-sm[data-icon]:not([viewBox]) { width: 14px; height: 14px; }
svg.ic-lg[data-icon]:not([viewBox]) { width: 28px; height: 28px; }
svg.ic-xl[data-icon]:not([viewBox]) { width: 44px; height: 44px; }


/* ---- Toast ---- */
.toast {
  position: fixed; top: 74px; left: 50%; transform: translate(-50%, -8px); z-index: 500;
  max-width: 86vw; padding: 9px 16px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--card); color: var(--text); border: 1px solid var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Panel lonceng (pengumuman + kontak) ---- */
.notice-text { white-space: pre-line; font-size: 14px; line-height: 1.6; color: var(--text-soft); overflow-wrap: anywhere; }
.notice-links { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.notice-links .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ---- Slider banner (foto saja) ---- */
.banner-slider { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 16px; background: var(--card); }
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 16 / 7; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.banner-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.55); transition: width 0.2s, background 0.2s; }
.banner-dots i.on { width: 16px; background: #fff; }
.banner-item { display: flex; align-items: center; gap: 12px; }
.banner-item img { width: 96px; height: 42px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; background: var(--card-2); }
.banner-item .li-main { min-width: 0; }
.banner-item .li-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ---- Pemilih tema ---- */
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-height: 360px; overflow-y: auto; padding: 2px; }
.theme-item { background: none; border: none; padding: 0; cursor: pointer; color: var(--muted); font-size: 10px; font-family: inherit; text-align: center; min-width: 0; }
.theme-swatch {
  display: block; aspect-ratio: 1 / 1; border-radius: 14px; border: 2px solid var(--border); position: relative; margin-bottom: 4px;
  background: linear-gradient(135deg, var(--sw-bg) 0 50%, var(--sw-accent) 50% 100%);
}
.theme-swatch::after { content: ""; position: absolute; left: 7px; bottom: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--sw-card); border: 1px solid rgba(128,128,128,0.4); }
.theme-item.active .theme-swatch { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.theme-item.active { color: var(--accent-2); font-weight: 700; }
.theme-item span.tn { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-note { font-size: 12px; color: var(--muted); margin: 6px 0 12px; }

/* ---- Halaman loading (splash) ---- */
#splash { z-index: 1000; font-family: "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); }

/* ---- Cahaya halus yang mengelilingi banner ---- */
@property --beam { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.banner-slider::before,
.banner-slider::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  padding: 2px;
  /* dua titik cahaya, berseberangan, berputar mengelilingi tepi banner */
  background: conic-gradient(from var(--beam),
    transparent 0deg, var(--accent-2) 24deg, transparent 64deg,
    transparent 180deg, var(--accent-3) 204deg, transparent 244deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: beam-spin 7s linear infinite;
}
.banner-slider::after { padding: 6px; filter: blur(8px); opacity: 0.85; }
@keyframes beam-spin { to { --beam: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .banner-slider::before, .banner-slider::after { animation: none; }
}

/* ---- Teks iklan berjalan ---- */
.ad-marquee {
  align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 9px 12px; margin-bottom: 10px; overflow: hidden;
}
.ad-ic { color: var(--accent-2); display: flex; flex-shrink: 0; }
.ad-view {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ad-track { display: flex; width: max-content; animation: ad-scroll 20s linear infinite; }
.ad-half { display: flex; flex-shrink: 0; }
.ad-item { font-size: 13px; font-weight: 600; white-space: nowrap; }
.ad-gap { display: inline-block; width: 56px; flex-shrink: 0; }
@keyframes ad-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ad-track { animation-duration: 60s !important; } }

/* ---- Produk memakai foto ---- */
.thumb-empty { color: var(--muted); opacity: 0.6; display: flex; }
.gallery-empty { flex-direction: column; gap: 8px; }
.gallery-empty small { font-size: 12px; color: var(--muted); }

/* ---- Lonceng: informasi ---- */
.notice-when { font-size: 11px; color: var(--muted); margin: -4px 0 12px; }
.contact-links { display: flex; flex-direction: column; gap: 8px; }
.contact-links .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ---- Alur beli / pembayaran ---- */
.pay-summary { display: flex; justify-content: space-between; gap: 12px; background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.pay-summary small { display: block; color: var(--muted); font-size: 11px; }
.pay-summary b { font-size: 14px; }
.pay-total { color: var(--accent-2); font-size: 16px !important; }
.pay-label { font-size: 12px; color: var(--muted); margin: 14px 0 8px; }
.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-method {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px;
  cursor: pointer; color: var(--text); font-family: inherit;
}
.pay-method:active { border-color: var(--accent); }
.pay-method b { display: block; font-size: 14px; }
.pay-method small { color: var(--muted); font-size: 11px; }
.pm-go { transform: rotate(180deg); color: var(--muted); display: flex; }
.pay-back { background: none; border: none; color: var(--accent-2); font-size: 13px; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 4px; font-family: inherit; }
.qris-box { background: #fff; border-radius: 14px; padding: 12px; text-align: center; }
.qris-box img { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 auto; }
.qris-open { display: inline-block; margin-top: 8px; font-size: 12px; color: #333; text-decoration: underline; }
.acct-box { background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; }
.acct-box small { color: var(--muted); font-size: 11px; }
.acct-num { font-size: 22px; font-weight: 800; letter-spacing: 1px; margin: 4px 0; word-break: break-all; }
.acct-name { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.pay-note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.pay-note b { color: var(--text); }
.proof-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 110px;
  border: 2px dashed var(--border); border-radius: 12px; padding: 12px; cursor: pointer; color: var(--muted);
  font-size: 13px; text-align: center; margin-bottom: 10px;
}
.proof-box.has-file { border-style: solid; border-color: var(--accent); }
.proof-box img { max-width: 100%; max-height: 240px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.done-mark { width: 56px; height: 56px; border-radius: 50%; margin: 4px auto 0; display: flex; align-items: center; justify-content: center; background: var(--ok); color: #06210f; }
.done-proof { display: block; max-width: 100%; max-height: 200px; margin: 12px auto; border-radius: 10px; border: 1px solid var(--border); }
.done-lines { display: flex; flex-direction: column; gap: 6px; background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.done-lines div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.done-lines small { color: var(--muted); }

/* ---- Admin: pembayaran, upload, thumbnail produk ---- */
.pay-admin { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--card-2); }
.pay-admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pay-admin .form-group:last-child { margin-bottom: 0; }
.qris-prev { display: block; max-width: 160px; margin-top: 8px; border-radius: 8px; background: #fff; padding: 6px; }
.upload-btn { display: inline-flex !important; align-items: center; gap: 6px; cursor: pointer; width: auto !important; }
.prod-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); background: var(--card); }
.prod-thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
