/* ==========================================================================
   Firqa.id — tema publik
   Gaya: marketplace produk digital, terang & bersih, dengan mode gelap.
   ========================================================================== */

/* ----- Token: mode terang ----- */
:root {
  --bg:          #f6f7fb;
  --bg-soft:     #eef1f8;
  --surface:     #ffffff;
  --surface-2:   #f4f6fb;
  --surface-3:   #e9edf7;
  --text:        #414b60;
  --text-strong: #141a2a;
  --muted:       #6b768e;
  --border:      #e2e7f2;
  --border-soft: #edf0f7;

  --accent:        #4f46e5;
  --accent-strong: #4338ca;
  --accent-2:      #8b5cf6;
  --accent-soft:   rgba(79, 70, 229, .10);
  --accent-line:   rgba(79, 70, 229, .28);
  --on-accent:     #ffffff;

  --ok:    #0f9d76;
  --warn:  #c2870b;
  --dang:  #dc4c56;
  --info:  #2f80d6;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow:    0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .04);
  --shadow-lg: 0 18px 40px rgba(16, 24, 40, .10), 0 6px 14px rgba(16, 24, 40, .05);
  --shadow-accent: 0 10px 26px rgba(79, 70, 229, .26);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --maxw: 1180px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --t: .2s cubic-bezier(.4, 0, .2, 1);
}

/* Varian aksen */
:root[data-accent="emerald"] { --accent:#0d9488; --accent-strong:#0f766e; --accent-2:#34d399; --accent-soft:rgba(13,148,136,.11); --accent-line:rgba(13,148,136,.3); --shadow-accent:0 10px 26px rgba(13,148,136,.26); }
:root[data-accent="sunset"]  { --accent:#e2622b; --accent-strong:#c9501e; --accent-2:#f59e0b; --accent-soft:rgba(226,98,43,.11);  --accent-line:rgba(226,98,43,.3);  --shadow-accent:0 10px 26px rgba(226,98,43,.26); }
:root[data-accent="ocean"]   { --accent:#0369a1; --accent-strong:#075985; --accent-2:#06b6d4; --accent-soft:rgba(3,105,161,.11);  --accent-line:rgba(3,105,161,.3);  --shadow-accent:0 10px 26px rgba(3,105,161,.26); }
:root[data-accent="rose"]    { --accent:#be3455; --accent-strong:#9f2c48; --accent-2:#f472b6; --accent-soft:rgba(190,52,85,.11);  --accent-line:rgba(190,52,85,.3);  --shadow-accent:0 10px 26px rgba(190,52,85,.26); }

/* ----- Token: mode gelap ----- */
:root[data-theme="dark"] {
  --bg:          #0c1018;
  --bg-soft:     #10151f;
  --surface:     #151b27;
  --surface-2:   #1b2230;
  --surface-3:   #232b3b;
  --text:        #b8c2d4;
  --text-strong: #f0f4fa;
  --muted:       #8290a8;
  --border:      #262f40;
  --border-soft: #1e2534;

  --accent:        #7c8cff;
  --accent-strong: #98a5ff;
  --accent-2:      #b388ff;
  --accent-soft:   rgba(124, 140, 255, .14);
  --accent-line:   rgba(124, 140, 255, .34);
  --on-accent:     #0b1020;

  --ok:   #34d399;
  --warn: #fbbf24;
  --dang: #f87171;
  --info: #60a5fa;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .36);
  --shadow:    0 4px 14px rgba(0, 0, 0, .4);
  --shadow-lg: 0 20px 46px rgba(0, 0, 0, .5);
  --shadow-accent: 0 10px 26px rgba(124, 140, 255, .25);
}
:root[data-theme="dark"][data-accent="emerald"] { --accent:#2dd4bf; --accent-strong:#5eead4; --accent-2:#6ee7b7; --accent-soft:rgba(45,212,191,.14); --accent-line:rgba(45,212,191,.34); --on-accent:#05201c; --shadow-accent:0 10px 26px rgba(45,212,191,.22); }
:root[data-theme="dark"][data-accent="sunset"]  { --accent:#fb923c; --accent-strong:#fdba74; --accent-2:#fbbf24; --accent-soft:rgba(251,146,60,.14); --accent-line:rgba(251,146,60,.34); --on-accent:#2a1206; --shadow-accent:0 10px 26px rgba(251,146,60,.22); }
:root[data-theme="dark"][data-accent="ocean"]   { --accent:#38bdf8; --accent-strong:#7dd3fc; --accent-2:#22d3ee; --accent-soft:rgba(56,189,248,.14); --accent-line:rgba(56,189,248,.34); --on-accent:#04202e; --shadow-accent:0 10px 26px rgba(56,189,248,.22); }
:root[data-theme="dark"][data-accent="rose"]    { --accent:#fb7185; --accent-strong:#fda4af; --accent-2:#f472b6; --accent-soft:rgba(251,113,133,.14); --accent-line:rgba(251,113,133,.34); --on-accent:#2b0913; --shadow-accent:0 10px 26px rgba(251,113,133,.22); }

/* ----- Dasar ----- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--accent-strong); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5 {
  color: var(--text-strong);
  line-height: 1.2;
  margin: 0 0 .6rem;
  font-weight: 700;
  letter-spacing: -.022em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); letter-spacing: -.032em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); letter-spacing: -.026em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.container-narrow { max-width: 860px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--accent); color: var(--on-accent);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.topnav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t);
}
.topnav.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-xs); }
.nav-inner { display: flex; align-items: center; gap: 1rem; height: 72px; }

.brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; color: var(--text-strong); letter-spacing: -.02em; }
.brand:hover { color: var(--text-strong); }
.brand-mark {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: grid; place-items: center;
  font-size: .92rem; font-weight: 800; letter-spacing: -.02em;
  box-shadow: var(--shadow-accent);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text b { font-size: 1.02rem; }
.brand-text small { font-size: .76rem; font-weight: 500; color: var(--muted); letter-spacing: .01em; }

.nav-links { display: flex; gap: .1rem; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--muted); padding: .5rem .85rem; border-radius: 10px;
  font-size: .92rem; font-weight: 550; transition: var(--t);
}
.nav-links a:hover { color: var(--text-strong); background: var(--surface-2); }
.nav-links a.active { color: var(--accent-strong); background: var(--accent-soft); font-weight: 650; }
.nav-actions { display: flex; align-items: center; gap: .5rem; margin-left: .6rem; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); border-radius: 11px; cursor: pointer; transition: var(--t);
}
.icon-btn:hover { color: var(--accent-strong); border-color: var(--accent-line); background: var(--surface-2); }
.nav-toggle { display: none; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }

/* ==========================================================================
   Tombol
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.35rem; border-radius: 12px; border: 1px solid transparent;
  font-family: inherit; font-size: .94rem; font-weight: 650; line-height: 1.3;
  cursor: pointer; transition: var(--t); white-space: nowrap; text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { flex: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: var(--shadow-accent);
}
:root[data-theme="dark"] .btn-primary { color: var(--on-accent); }
.btn-primary:hover { color: #fff; filter: brightness(1.06); }
:root[data-theme="dark"] .btn-primary:hover { color: var(--on-accent); }

.btn-solid { background: var(--text-strong); color: var(--bg); }
.btn-solid:hover { color: var(--bg); opacity: .9; }

.btn-ghost { background: var(--surface); color: var(--text-strong); border-color: var(--border); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent-strong); }


.btn-wa { background: #22a45d; color: #fff; box-shadow: 0 10px 24px rgba(34,164,93,.24); }
.btn-wa:hover { background: #1c8d4f; color: #fff; }

.btn-sm { padding: .48rem .9rem; font-size: .86rem; border-radius: 10px; }
.btn-lg { padding: .95rem 1.8rem; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ==========================================================================
   Elemen umum
   ========================================================================== */
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 750;
  color: var(--accent-strong); background: var(--accent-soft);
  padding: .34rem .8rem; border-radius: 999px; margin-bottom: 1rem;
  border: 1px solid var(--accent-line);
}
.lead { color: var(--muted); font-size: 1.06rem; line-height: 1.7; }

.section { padding: clamp(60px, 8vw, 100px) 0; position: relative; }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 660px; margin-bottom: 2.8rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-bottom: 0; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: var(--t);
}
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.tag {
  display: inline-block; font-size: .78rem; font-weight: 600;
  padding: .22rem .62rem; border-radius: 7px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-soft);
}
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }

.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .76rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase;
  padding: .26rem .6rem; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}

.empty {
  padding: 3.2rem 1.5rem; text-align: center; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface);
}
.empty h3 { color: var(--text-strong); }

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.stack { display: grid; gap: 1.2rem; grid-template-columns: minmax(0, 1fr); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 8vw, 96px) 0 clamp(56px, 8vw, 92px);
}
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 130%;
  background:
    radial-gradient(48% 42% at 18% 8%,  color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(42% 40% at 88% 4%,  color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 68%);
  pointer-events: none; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--text-strong) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--text-strong) 6%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 100%);
}
.hero > .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.1rem; }
.hero p.lead { font-size: 1.12rem; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }

.hero-trust { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2.2rem; color: var(--muted); font-size: .89rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-trust svg { color: var(--ok); flex: none; }

/* Mockup jendela browser di hero */
.hero-visual { position: relative; }
.browser {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
  transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}
.browser:hover { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg) translateY(-4px); }
.browser-bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .7rem .9rem; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: block; }
.browser-bar i:nth-child(1) { background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-url {
  margin-left: .6rem; flex: 1; height: 24px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 .6rem;
  font-size: .7rem; color: var(--muted); font-family: var(--mono); overflow: hidden; white-space: nowrap;
}
.browser-body { aspect-ratio: 16 / 11; background: var(--surface-2); overflow: hidden; }
.browser-body img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* Cuplikan katalog di dalam bingkai browser (dipakai bila belum ada gambar hero) */
.browser-demo { height: 100%; padding: 1rem 1.1rem; display: grid; grid-template-rows: auto 1fr; gap: .8rem; }
.demo-head b { color: var(--text-strong); font-size: .95rem; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; min-height: 0; }
.demo-item {
  position: relative; border-radius: 12px; overflow: hidden; min-height: 0;
  border: 1px solid var(--border); background: var(--surface);
}
.demo-item .cover { height: 100%; }
.demo-item .cover-title { font-size: .72rem; }
.demo-item .cover { padding: .7rem .75rem .75rem; gap: .35rem; }
.demo-item .cover-ico { width: 30px; height: 30px; border-radius: 9px; }
.demo-price {
  position: absolute; right: .45rem; top: .45rem; z-index: 2;
  background: var(--surface); color: var(--text-strong); border-radius: 999px;
  padding: .15rem .5rem; font-size: .7rem; font-weight: 700; box-shadow: var(--shadow-sm);
}

/* Sampul otomatis untuk produk tanpa tangkapan layar */
.cover {
  --cover-h: 240;
  width: 100%; height: 100%; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .5rem;
  padding: 1rem 1.1rem 1.1rem; color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, hsl(calc(var(--cover-h) + 40) 85% 68% / .55), transparent 60%),
    linear-gradient(135deg, hsl(var(--cover-h) 70% 46%), hsl(calc(var(--cover-h) + 35) 72% 38%));
}
.cover::after { /* pola garis halus agar sampul tidak terasa polos */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(200deg, #000 10%, transparent 70%);
  -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 70%);
}
.cover-ico {
  position: relative; z-index: 1; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
}
.cover-title {
  position: relative; z-index: 1; font-weight: 750; line-height: 1.25; font-size: .98rem;
  letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.cover-lg { padding: 1.6rem 1.8rem 1.8rem; gap: .8rem; }
.cover-plain { justify-content: center; align-items: center; }
.cover-plain .cover-ico { width: 64px; height: 64px; border-radius: 18px; }
.cover-plain .cover-ico svg { width: 30px; height: 30px; }
.cover-lg .cover-ico { width: 62px; height: 62px; border-radius: 16px; }
.cover-lg .cover-title { font-size: clamp(1.25rem, 3vw, 1.7rem); max-width: 22ch; }

.float-card {
  position: absolute; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: .7rem .95rem; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: .65rem; font-size: .84rem; z-index: 2;
  animation: bob 5s ease-in-out infinite;
}
.float-card b { color: var(--text-strong); display: block; font-size: .9rem; line-height: 1.25; }
.float-card small { color: var(--muted); }
.float-card .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.float-a { left: -18px; bottom: 16%; }
.float-b { right: -10px; top: 12%; animation-delay: -2.5s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ==========================================================================
   Statistik
   ========================================================================== */
.stats-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
.stats-strip .item { background: var(--surface); padding: 1.5rem 1.2rem; text-align: center; }
.stats-strip .num {
  font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats-strip .lbl { font-size: .84rem; color: var(--muted); margin-top: .15rem; }

/* ==========================================================================
   Kartu kategori
   ========================================================================== */
.cat-card {
  padding: 1.5rem 1.4rem; display: grid; gap: .5rem; color: inherit; position: relative; overflow: hidden;
}
.cat-card:hover { color: inherit; transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-line); }
.cat-card .ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 1.4rem; margin-bottom: .35rem;
}
.cat-card h3 { margin: 0; font-size: 1.05rem; }
.cat-card p { margin: 0; font-size: .89rem; color: var(--muted); }
.cat-card .count { font-size: .8rem; color: var(--accent-strong); font-weight: 650; margin-top: .35rem; }

/* ==========================================================================
   Kartu produk
   ========================================================================== */
.product-card { display: flex; flex-direction: column; overflow: hidden; position: relative; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent-line); }
.product-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .55s cubic-bezier(.4,0,.2,1); }
.product-card:hover .product-thumb img { transform: scale(1.045); }
.thumb-badge { position: absolute; top: .7rem; left: .7rem; z-index: 2; }
.thumb-cat {
  position: absolute; bottom: .7rem; left: .7rem; z-index: 2;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border); color: var(--text-strong);
  font-size: .78rem; font-weight: 650; padding: .22rem .6rem; border-radius: 7px;
}

.product-body { padding: 1.15rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.product-body h3 { margin: 0; font-size: 1.06rem; line-height: 1.35; }
.product-body h3 a { color: var(--text-strong); }
.product-body h3 a:hover { color: var(--accent-strong); }
.product-body .desc { color: var(--muted); font-size: .89rem; margin: 0; flex: 1; }

.rating { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); }
.rating .stars { color: #f5a524; letter-spacing: .5px; }

.price-row {
  display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
  padding-top: .6rem; margin-top: auto; border-top: 1px solid var(--border-soft);
}
.price { font-size: 1.22rem; font-weight: 800; color: var(--text-strong); letter-spacing: -.02em; }
.price-old { font-size: .84rem; color: var(--muted); text-decoration: line-through; }
.price-off {
  font-size: .76rem; font-weight: 750; color: var(--dang);
  background: color-mix(in srgb, var(--dang) 12%, transparent);
  padding: .15rem .45rem; border-radius: 6px;
}
.product-actions { display: flex; gap: .5rem; margin-top: .8rem; }
.product-actions .btn { flex: 1; }

/* ==========================================================================
   Filter katalog
   ========================================================================== */
.filter-bar {
  display: flex; gap: .8rem; flex-wrap: wrap; align-items: center;
  padding: 1rem 1.15rem; margin-bottom: 1.8rem;
}
.filter-bar .search { flex: 1 1 240px; position: relative; }
.filter-bar .search input { padding-left: 2.5rem; }
.filter-bar .search svg { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filter-bar select { width: auto; min-width: 165px; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: .45rem 1rem; border-radius: 999px; font-size: .87rem; font-weight: 550;
  cursor: pointer; transition: var(--t); font-family: inherit; text-decoration: none;
}
.chip:hover { color: var(--text-strong); border-color: var(--accent-line); }
.chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border-color: transparent; font-weight: 650; box-shadow: var(--shadow-accent);
}
.chip.active:hover { color: #fff; }

.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; padding: 0 .7rem; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: .9rem; font-weight: 600; transition: var(--t);
}
.pagination a:hover { border-color: var(--accent-line); color: var(--accent-strong); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .pagination .current { color: var(--on-accent); }
.pagination .disabled { opacity: .4; }

/* ==========================================================================
   Fitur / keunggulan
   ========================================================================== */
.why-card { padding: 1.6rem 1.5rem; }
.why-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent-line); }
.why-card .ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  margin-bottom: 1rem; box-shadow: var(--shadow-accent);
}
.why-card h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.why-card p { margin: 0; font-size: .91rem; color: var(--muted); }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .93rem; }
.check-list li svg { flex: none; color: var(--ok); margin-top: .18rem; }
.check-list li.off { color: var(--muted); }
.check-list li.off svg { color: var(--muted); opacity: .5; }

/* ==========================================================================
   Paket lisensi
   ========================================================================== */
.plan {
  padding: 1.8rem 1.6rem; display: flex; flex-direction: column; gap: .3rem; position: relative;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan.popular {
  border-color: var(--accent); box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 32%);
}
.plan-ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-size: .76rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .9rem; border-radius: 999px; box-shadow: var(--shadow-accent); white-space: nowrap;
}
.plan h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.plan .plan-sum { font-size: .87rem; color: var(--muted); margin-bottom: 1.1rem; min-height: 2.4em; }
.plan .plan-price { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.plan .plan-price b { font-size: 1.9rem; font-weight: 800; color: var(--text-strong); letter-spacing: -.03em; }
.plan .plan-price span { font-size: .85rem; color: var(--muted); }
.plan .check-list { margin-bottom: 1.5rem; flex: 1; }
.plan .btn { margin-top: auto; }

/* ==========================================================================
   Testimoni
   ========================================================================== */
.testi { padding: 1.6rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.testi:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.testi .quote { color: var(--text); font-size: .95rem; line-height: 1.7; margin: 0; flex: 1; }
.testi .stars { color: #f5a524; font-size: .95rem; letter-spacing: 1px; }
.testi-who { display: flex; align-items: center; gap: .75rem; padding-top: .9rem; border-top: 1px solid var(--border-soft); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .92rem;
  border: 2px solid var(--surface); box-shadow: var(--shadow-xs);
}
.testi-who b { display: block; color: var(--text-strong); font-size: .93rem; line-height: 1.3; }
.testi-who small { color: var(--muted); font-size: .82rem; }

/* ==========================================================================
   FAQ (accordion)
   ========================================================================== */
.faq-list { display: grid; gap: .8rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: var(--t); }
.faq-item[open] { border-color: var(--accent-line); box-shadow: var(--shadow-sm); }
.faq-item summary {
  padding: 1.1rem 1.3rem; cursor: pointer; font-weight: 650; color: var(--text-strong);
  display: flex; align-items: center; gap: 1rem; list-style: none; font-size: .98rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; margin-left: auto; flex: none; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform var(--t); margin-top: -4px;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.faq-item .answer { padding: 0 1.3rem 1.2rem; color: var(--muted); font-size: .93rem; }
.faq-item .answer p:last-child { margin-bottom: 0; }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-band {
  border-radius: var(--radius-xl); padding: clamp(2.2rem, 5vw, 3.4rem);
  background: linear-gradient(125deg, var(--accent), var(--accent-2));
  color: #fff; text-align: center; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(60% 60% at 50% 40%, #000, transparent);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 40%, #000, transparent);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; margin-bottom: .7rem; }
.cta-band p { color: rgba(255,255,255,.88); max-width: 58ch; margin-inline: auto; }
.cta-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }
.cta-band .btn-ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(4px); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
.cta-band .btn-solid { background: #fff; color: var(--accent-strong); }
.cta-band .btn-solid:hover { background: #fff; color: var(--accent-strong); opacity: .93; }

/* ==========================================================================
   Halaman detail produk
   ========================================================================== */
.breadcrumb { display: flex; gap: .45rem; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-strong); }
.breadcrumb .sep { opacity: .5; }

.detail-top { padding: 2.2rem 0 0; }
.detail-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 2.2rem; align-items: start; margin-top: 1.4rem; }

.gallery { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.gallery-main { aspect-ratio: 16 / 10; background: var(--surface-2); position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.gallery-thumbs { display: flex; gap: .55rem; padding: .7rem; overflow-x: auto; background: var(--surface); }
.gallery-thumbs button {
  flex: none; width: 92px; aspect-ratio: 16/10; border-radius: 9px; overflow: hidden;
  border: 2px solid transparent; background: var(--surface-2); cursor: pointer; padding: 0; transition: var(--t);
}
.gallery-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs button:hover { border-color: var(--accent-line); }
.gallery-thumbs button.active { border-color: var(--accent); }

.buy-box { position: sticky; top: 92px; padding: 1.6rem 1.5rem; display: grid; gap: 1rem; }
.buy-price { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.buy-price b { font-size: 2rem; font-weight: 800; color: var(--text-strong); letter-spacing: -.03em; }
.buy-meta { display: grid; gap: .6rem; font-size: .88rem; }
.buy-meta div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.buy-meta dt, .buy-meta .k { color: var(--muted); }
.buy-meta dd, .buy-meta .v { margin: 0; color: var(--text-strong); font-weight: 600; text-align: right; }

.demo-cred {
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: .8rem 1rem; font-size: .84rem; display: grid; gap: .25rem;
}
.demo-cred code { font-family: var(--mono); color: var(--accent-strong); font-size: .85rem; }

.prose { max-width: 72ch; }
.prose p { color: var(--text); }
.prose h3 { margin-top: 1.8rem; }


/* ==========================================================================
   Form
   ========================================================================== */
.form { padding: 1.7rem; display: grid; gap: 1.1rem; }
.field { display: grid; gap: .38rem; grid-template-columns: minmax(0, 1fr); }
.field label { font-size: .87rem; font-weight: 650; color: var(--text-strong); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="tel"], input[type="number"], input[type="date"], input[type="month"],
input[type="search"], select, textarea {
  width: 100%; padding: .74rem .9rem;
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: .94rem; transition: var(--t);
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b768e' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.3rem;
}
textarea { resize: vertical; min-height: 130px; line-height: 1.65; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 68%, transparent); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.radio-cards { display: grid; gap: .7rem; }
.radio-card {
  display: flex; gap: .8rem; align-items: flex-start; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .9rem 1rem; transition: var(--t); background: var(--surface);
}
.radio-card:hover { border-color: var(--accent-line); }
.radio-card input { margin-top: .25rem; width: auto; accent-color: var(--accent); flex: none; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card b { display: block; color: var(--text-strong); font-size: .94rem; }
.radio-card small { color: var(--muted); font-size: .83rem; }
.radio-card .rc-price { margin-left: auto; font-weight: 750; color: var(--accent-strong); white-space: nowrap; }

/* ==========================================================================
   Alert
   ========================================================================== */
.alert {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .9rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  font-size: .92rem; margin-bottom: 1rem; box-shadow: var(--shadow-xs);
}
.alert svg { flex: none; margin-top: .15rem; }
.alert-success { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); background: color-mix(in srgb, var(--ok) 9%, var(--surface)); color: color-mix(in srgb, var(--ok) 72%, var(--text-strong)); }
.alert-error   { border-color: color-mix(in srgb, var(--dang) 40%, var(--border)); background: color-mix(in srgb, var(--dang) 9%, var(--surface)); color: color-mix(in srgb, var(--dang) 72%, var(--text-strong)); }
.alert-warning { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: color-mix(in srgb, var(--warn) 11%, var(--surface)); color: color-mix(in srgb, var(--warn) 72%, var(--text-strong)); }
.alert-info    { border-color: color-mix(in srgb, var(--info) 40%, var(--border)); background: color-mix(in srgb, var(--info) 9%, var(--surface)); color: color-mix(in srgb, var(--info) 72%, var(--text-strong)); }

/* ==========================================================================
   Kontak
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2.2rem; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: .85rem; align-items: flex-start; }
.contact-list .ic {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center;
}
.contact-list b { display: block; color: var(--text-strong); font-size: .88rem; }
.contact-list span.val { color: var(--muted); font-size: .91rem; word-break: break-word; }
.socials { display: flex; gap: .5rem; margin-top: 1.6rem; flex-wrap: wrap; }
.social-btn {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); transition: var(--t);
}
.social-btn:hover { color: var(--accent-strong); border-color: var(--accent-line); transform: translateY(-2px); }

/* Kotak sukses pesanan */
.success-box { text-align: center; padding: 2.6rem 1.8rem; }
.success-box .tick {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 1.3rem;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--ok), color-mix(in srgb, var(--ok) 60%, var(--accent-2)));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--ok) 34%, transparent);
}
.order-code {
  display: inline-block; font-family: var(--mono); font-size: 1.25rem; font-weight: 700;
  letter-spacing: .06em; color: var(--accent-strong);
  background: var(--accent-soft); border: 1px dashed var(--accent-line);
  padding: .6rem 1.2rem; border-radius: 12px; margin: .6rem 0 1.4rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 3.4rem 0 1.6rem; color: var(--muted); font-size: .91rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 2.2rem; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-strong); margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer ul a { color: var(--muted); font-size: .91rem; }
.footer ul a:hover { color: var(--accent-strong); }
.footer .brand { margin-bottom: .9rem; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--border); font-size: .86rem;
}

/* Tombol WA melayang */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #22a45d; color: #fff; box-shadow: 0 8px 24px rgba(34,164,93,.4);
  transition: var(--t);
}
.wa-float:hover { color: #fff; transform: scale(1.08); }

/* Bilah beli di bawah layar — hanya muncul di layar sempit (lihat bagian Responsif) */
.buy-bar { display: none; }

/* ==========================================================================
   Animasi masuk
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s cubic-bezier(.4,0,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsif
   ========================================================================== */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin-inline: auto; width: 100%; }
  .browser { transform: none; }
  .browser:hover { transform: translateY(-3px); }
  .float-a { left: 0; } .float-b { right: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .buy-box { position: static; }
  /* Di ponsel urutannya: galeri → kotak harga/pesan → deskripsi.
     Sebelumnya harga dan tombol pesan baru muncul setelah seluruh deskripsi. */
  .detail-main { display: contents; }
  .detail-main > .gallery { order: 0; }
  .detail-aside { order: 1; }
  .detail-main > :not(.gallery) { order: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .buy-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 65;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .7rem 16px calc(.7rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(16, 24, 40, .08);
    transform: translateY(110%); transition: transform .25s ease;
  }
  .buy-bar.is-visible { transform: none; }
  .buy-bar-price { display: grid; min-width: 0; line-height: 1.25; }
  .buy-bar-price small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buy-bar-price b { color: var(--text-strong); font-size: 1.1rem; }
  .buy-bar .btn { flex: none; min-height: 46px; }
  /* Tombol WA naik supaya tidak menutupi bilah beli */
  body:has(.buy-bar.is-visible) .wa-float { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body:has(.buy-bar) .footer { padding-bottom: 96px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed; inset: 72px 0 auto; flex-direction: column; align-items: stretch;
    gap: .15rem; padding: .9rem 22px 1.4rem; background: var(--bg);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .75rem .7rem; font-size: 1rem; }
  .nav-actions { margin-left: auto; }
  .nav-actions .btn { display: none; }
  body { font-size: 15.5px; }
  .form { padding: 1.25rem; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .float-card { display: none; }
  .section { padding: 52px 0; }

  /* Minimal 16px: di bawah itu Safari iPhone otomatis memperbesar layar saat kolom diketuk. */
  input[type="text"], input[type="email"], input[type="password"], input[type="url"],
  input[type="tel"], input[type="number"], input[type="date"], input[type="month"],
  input[type="search"], select, textarea { font-size: 16px; }

  /* Tautan footer: area ketuk lebih tinggi dan tidak berdempetan. */
  .footer ul { gap: .1rem; }
  .footer ul a { display: inline-block; padding: .45rem 0; }
  .footer-bottom a { display: inline-block; padding: .4rem 0; }

  /* Katalog: filter ringkas, kategori digeser ke samping (bukan 3 baris bertumpuk). */
  .filter-bar { padding: .85rem; gap: .6rem; margin-bottom: 1.2rem; }
  .filter-bar .search { flex: 1 1 100%; }
  .filter-bar select { flex: 1 1 0; min-width: 118px; }
  .filter-bar .btn { flex: none; padding-inline: .95rem; }
  .filter-bar .btn-reset { padding-inline: .8rem; }
  .btn-reset-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: -22px; padding: 0 22px .2rem; scroll-padding-inline: 22px;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; white-space: nowrap; }

  /* Tombol WA lebih ringkas & tidak terlalu menutupi isi halaman. */
  .wa-float { width: 50px; height: 50px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .wa-float svg { width: 23px; height: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .topnav, .footer, .wa-float, .hero-actions, .cta-band, form { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Mengikuti preferensi sistem bila pengguna belum memilih tema */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #0c1018; --bg-soft: #10151f; --surface: #151b27; --surface-2: #1b2230; --surface-3: #232b3b;
    --text: #b8c2d4; --text-strong: #f0f4fa; --muted: #8290a8; --border: #262f40; --border-soft: #1e2534;
    --accent: #7c8cff; --accent-strong: #98a5ff; --accent-2: #b388ff;
    --accent-soft: rgba(124,140,255,.14); --accent-line: rgba(124,140,255,.34); --on-accent: #0b1020;
    --ok: #34d399; --warn: #fbbf24; --dang: #f87171; --info: #60a5fa;
    --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.36);
    --shadow: 0 4px 14px rgba(0,0,0,.4);
    --shadow-lg: 0 20px 46px rgba(0,0,0,.5);
    --shadow-accent: 0 10px 26px rgba(124,140,255,.25);
  }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .theme-icon-dark { display: block; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .theme-icon-light { display: none; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .btn-primary { color: var(--on-accent); }
}

/* ==========================================================================
   Halaman pembayaran (bayar.php)
   ========================================================================== */

/* Utilitas yang aslinya hanya ada di panel admin, dipakai juga di sini. */
.panel { padding: 1.4rem 1.5rem; }
.stack-sm { display: grid; gap: .95rem; grid-template-columns: minmax(0, 1fr); }

.invoice-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding: 1.5rem 1.6rem; margin-bottom: 1.4rem;
}
.invoice-no {
  font-family: var(--mono); font-size: 1.45rem; letter-spacing: .01em;
  margin: .35rem 0 0; color: var(--text-strong); word-break: break-all;
}

/* Lencana status tagihan */
.pay-status {
  display: inline-flex; align-items: center; gap: .4rem; flex: none;
  font-size: .78rem; font-weight: 750; padding: .34rem .8rem; border-radius: 999px;
  background: var(--surface-3); color: var(--muted); white-space: nowrap;
}
.pay-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pay-status.pending { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.pay-status.review  { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pay-status.paid    { background: color-mix(in srgb, var(--ok) 14%, transparent);   color: var(--ok); }
.pay-status.expired { background: var(--surface-3); color: var(--muted); }
.pay-status.failed  { background: color-mix(in srgb, var(--dang) 13%, transparent); color: var(--dang); }
.pay-status.refund  { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent-strong); }

.invoice-page .card.panel { margin-bottom: 1.4rem; }
.invoice-section {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.02rem; margin: 0 0 1.1rem; color: var(--text-strong);
}
.invoice-section svg { color: var(--accent); flex: none; }

/* Rincian tagihan */
.invoice-lines { list-style: none; padding: 0; margin: 0; display: grid; }
.invoice-lines li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.2rem;
  padding: .8rem 0; border-bottom: 1px solid var(--border-soft);
}
.invoice-lines li span { display: grid; gap: .15rem; }
.invoice-lines li small { color: var(--muted); font-size: .81rem; font-weight: 400; line-height: 1.5; }
.invoice-lines li b { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-strong); }
.invoice-lines li.total {
  border-bottom: 0; border-top: 2px solid var(--border);
  margin-top: .3rem; padding-top: 1rem; font-size: 1.05rem;
}
.invoice-lines li.total b { font-size: 1.5rem; font-weight: 800; color: var(--accent-strong); }

.invoice-warn {
  display: flex; gap: .6rem; align-items: flex-start; margin: 1.1rem 0 0;
  padding: .8rem .95rem; border-radius: var(--radius-sm); font-size: .88rem; line-height: 1.6;
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
  color: var(--text-strong);
}
.invoice-warn svg { color: var(--warn); flex: none; margin-top: .15rem; }

.pay-countdown {
  display: flex; align-items: center; gap: .5rem; margin-top: 1rem;
  font-size: .9rem; color: var(--muted);
}
.pay-countdown b { font-variant-numeric: tabular-nums; color: var(--text-strong); }
.pay-countdown.is-urgent, .pay-countdown.is-urgent b { color: var(--dang); }

/* Pemilih metode pembayaran */
.method-picker { display: grid; gap: .7rem; }
.method-card {
  display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left;
  padding: .95rem 1.05rem; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border);
  color: inherit; font: inherit; transition: var(--t);
}
.method-card:hover { border-color: var(--accent-line); background: var(--surface-2); }
.method-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.method-card .mc-ico {
  width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--accent);
}
.method-card.is-active .mc-ico { background: var(--accent); color: var(--on-accent); }
.method-card .mc-body { display: grid; gap: .15rem; flex: 1; }
.method-card .mc-body b { color: var(--text-strong); font-size: .96rem; }
.method-card .mc-body small { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.method-card .mc-check {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--border); color: transparent;
}
.method-card.is-active .mc-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* QRIS */
.qris-box { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 1.6rem; align-items: start; }
.qris-frame {
  padding: .9rem; border-radius: var(--radius-sm); background: #fff;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); line-height: 0;
}
.qris-frame .qr-svg, .qris-frame img { width: 100%; height: auto; display: block; }
.qris-side { display: grid; gap: .7rem; }
.qris-merchant { margin: 0; display: grid; gap: .1rem; }
.qris-merchant b { color: var(--text-strong); font-size: 1.02rem; }
.qris-merchant small { color: var(--muted); font-family: var(--mono); font-size: .78rem; }
.qris-amount {
  margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -.01em;
  color: var(--accent-strong); font-variant-numeric: tabular-nums;
  display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .7rem;
}
.qris-amount .btn { font-size: .82rem; letter-spacing: 0; }
.qris-steps { margin: .4rem 0 0; padding-left: 1.15rem; display: grid; gap: .4rem; font-size: .89rem; color: var(--text); }
.qris-steps b { color: var(--text-strong); }

/* Daftar rekening bank */
.bank-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.bank-list li {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: .75rem .9rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.bank-list .bank-ico { color: var(--accent); flex: none; display: grid; place-items: center; }
.bank-list .bank-amount { background: var(--accent-soft); border-color: var(--accent-line); }
.bank-amount-text { flex: 1 1 200px; display: grid; gap: .1rem; }
.bank-amount-text small { color: var(--muted); font-size: .8rem; }
.bank-amount-text code { font-size: 1.1rem; font-weight: 750; color: var(--accent-strong); }
.bank-list code {
  flex: 1 1 0; min-width: 0; font-family: var(--mono); font-size: .88rem;
  color: var(--text-strong); word-break: break-word;
}
.bank-list li { flex-wrap: nowrap; }
.bank-list .btn { flex: none; }

/* Pemilih berkas bukti pembayaran */
.field .label { font-size: .87rem; font-weight: 650; color: var(--text-strong); }
.file-drop {
  position: relative; display: flex; align-items: center; gap: .9rem;
  padding: 1rem 1.1rem; border-radius: var(--radius-sm); cursor: pointer;
  border: 1.5px dashed var(--border); background: var(--surface-2); transition: var(--t);
}
.file-drop:hover, .file-drop:focus-within { border-color: var(--accent-line); background: var(--accent-soft); }
.file-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop-ico {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong);
}
.file-drop-text { display: grid; gap: .15rem; min-width: 0; }
.file-drop-text b { color: var(--text-strong); font-size: .95rem; overflow-wrap: anywhere; }
.file-drop-text small { color: var(--muted); font-size: .8rem; }
.file-drop.has-file { border-style: solid; border-color: var(--ok); }
.file-drop.has-file .file-drop-ico { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.file-drop.is-error { border-color: var(--dang); }
.file-drop.is-error b { color: var(--dang); }

/* Kunci lisensi yang muncul setelah lunas */
.license-drop {
  margin-top: 1.6rem; padding: 1.2rem 1.3rem; text-align: left;
  border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
}
.license-drop h3 {
  display: flex; align-items: center; gap: .45rem;
  font-size: .95rem; margin: 0 0 .8rem; color: var(--text-strong);
}
.license-key-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.license-key {
  flex: 1 1 220px; font-family: var(--mono); font-size: 1.05rem; font-weight: 700;
  letter-spacing: .06em; color: var(--accent-strong); word-break: break-all;
  padding: .55rem .75rem; border-radius: var(--radius-xs);
  background: var(--surface); border: 1px dashed var(--accent-line);
}

.help-box { background: var(--surface-2); }

@media (max-width: 720px) {
  .qris-box { grid-template-columns: 1fr; }
  .qris-frame { max-width: 300px; margin: 0 auto; }
  .invoice-lines li.total b { font-size: 1.3rem; }
}

/* Cetak faktur: sisakan isinya saja. */
@media print {
  .topnav, .footer, .wa-float, .breadcrumb, .method-picker, .help-box,
  .pay-countdown, form, .btn, .skip-link { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .section { padding: 0; }
}

/* Kode & alamat panjang boleh patah baris agar halaman tidak melebar di ponsel. */
:not(pre) > code { overflow-wrap: anywhere; }
