/* ==========================================================================
   DIGITAL PRODUCT COMMERCE OS — Front Store Design System
   Modern · Lightweight · Eye-catching
   ========================================================================== */

:root {
    --brand-50:  #eef2ff;
    --brand-100: #e0e7ff;
    --brand-200: #c7d2fe;
    --brand-400: #818cf8;
    --brand-500: #6366f1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --brand-900: #312e81;
    --brand-950: #1e1b4b;

    --accent-400: #fbbf24;
    --accent-500: #f59e0b;
    --accent-600: #d97706;

    --bg: #f6f7fb;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e9f2;

    --success-bg: #ecfdf5; --success-fg: #047857; --success-bd: #a7f3d0;
    --danger-bg:  #fef2f2; --danger-fg:  #b91c1c; --danger-bd:  #fecaca;
    --warn-bg:    #fffbeb; --warn-fg:    #b45309; --warn-bd:    #fde68a;
    --info-bg:    #eff6ff; --info-fg:    #1d4ed8; --info-bd:    #bfdbfe;

    --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-full: 999px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
    --shadow-md: 0 8px 24px -8px rgba(15,23,42,.12);
    --shadow-lg: 0 24px 48px -16px rgba(49,46,129,.22);
    --grad-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
    --grad-accent: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    --grad-dark: linear-gradient(140deg, #1e1b4b 0%, #312e81 45%, #4c1d95 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15.5px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -.02em; }

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; height: 66px;
}

.brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 1.12rem; color: var(--text);
    letter-spacing: -.02em;
}

.brand .logo-mark {
    width: 36px; height: 36px; border-radius: 11px;
    background: var(--grad-brand);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.05rem;
    box-shadow: 0 6px 16px -6px rgba(99,102,241,.55);
}

.site-header nav { display: flex; align-items: center; gap: 6px; }

.site-header nav a {
    color: var(--muted); font-weight: 600; font-size: .92rem;
    padding: 8px 14px; border-radius: var(--r-full);
    transition: all .18s ease;
}

.site-header nav a:hover { color: var(--brand-700); background: var(--brand-50); }

.nav-cart {
    position: relative;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--brand-600); color: #fff !important;
    padding: 9px 18px !important;
    border-radius: var(--r-full);
    box-shadow: 0 8px 18px -8px rgba(79,70,229,.6);
    transition: transform .18s ease, box-shadow .18s ease;
}
.nav-cart:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(79,70,229,.7); }

.nav-cart .count {
    background: #fff; color: var(--brand-700);
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: var(--r-full);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 800;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    position: relative; overflow: hidden;
    background: var(--grad-dark);
    color: #fff;
    padding: 72px 0 84px;
}

.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%;
    filter: blur(10px); opacity: .5; pointer-events: none;
}
.hero::before {
    width: 480px; height: 480px; right: -140px; top: -160px;
    background: radial-gradient(circle, rgba(168,85,247,.55), transparent 65%);
}
.hero::after {
    width: 420px; height: 420px; left: -120px; bottom: -200px;
    background: radial-gradient(circle, rgba(99,102,241,.5), transparent 65%);
}

.hero-inner { position: relative; z-index: 1; max-width: 720px; }

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    color: #e0e7ff;
    padding: 7px 16px; border-radius: var(--r-full);
    font-size: .8rem; font-weight: 600; letter-spacing: .02em;
    margin-bottom: 20px;
}

.hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 800; }

.grad-text {
    background: var(--grad-accent);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

.hero p { margin-top: 14px; color: #c7d2fe; font-size: 1.05rem; max-width: 560px; }

.hero-search {
    margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    padding: 8px; border-radius: var(--r-md);
    backdrop-filter: blur(6px);
}
.hero-search input[type=text] {
    flex: 1; min-width: 200px;
    background: transparent; border: none; outline: none;
    color: #fff; font-size: .98rem; padding: 10px 14px;
}
.hero-search input::placeholder { color: #a5b4fc; }
.hero-search select {
    background: rgba(255,255,255,.12); color: #fff;
    border: 1px solid rgba(255,255,255,.2); border-radius: 10px;
    padding: 10px 12px; font-size: .92rem; outline: none;
}
.hero-search select option { color: var(--text); }
.hero-search button {
    background: var(--grad-accent); color: #7c2d12;
    border: none; border-radius: 10px; padding: 10px 22px;
    font-weight: 800; font-size: .92rem; cursor: pointer;
    transition: transform .18s ease, filter .18s ease;
}
.hero-search button:hover { transform: translateY(-1px); filter: brightness(1.05); }

.hero-stats {
    margin-top: 30px; display: flex; gap: 28px; flex-wrap: wrap;
}
.hero-stat b { font-size: 1.25rem; display: block; }
.hero-stat span { color: #a5b4fc; font-size: .82rem; }

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section { padding: 44px 0 64px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }

.section-head h2 { font-size: 1.45rem; font-weight: 800; position: relative; padding-left: 16px; }
.section-head h2::before {
    content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
    width: 5px; border-radius: 4px; background: var(--grad-brand);
}

.section-head .sub { color: var(--muted); font-size: .92rem; }

.empty {
    text-align: center; color: var(--muted);
    background: var(--surface); border: 1px dashed var(--border);
    border-radius: var(--r-lg); padding: 48px 20px; font-size: .95rem;
}

/* ==========================================================================
   PRODUCT CARDS
   ========================================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 22px;
}

.p-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.p-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-200);
}

.p-thumb {
    display: block; position: relative;
    aspect-ratio: 16 / 10;
    background: var(--grad-brand);
    overflow: hidden;
}

.p-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; transition: transform .35s ease; }
.p-card:hover .p-thumb img { transform: scale(1.05); }

.p-thumb .thumb-fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: rgba(255,255,255,.9);
}

.p-flag {
    display: inline-block;
    background: var(--grad-accent); color: #7c2d12;
    font-size: .7rem; font-weight: 800; letter-spacing: .04em;
    padding: 5px 11px; border-radius: var(--r-full);
    text-transform: uppercase; white-space: nowrap;
}
.p-flag.flag-best { background: linear-gradient(135deg, #f97316, #dc2626); color: #fff; }
.p-flag.flag-popular { background: linear-gradient(135deg, #facc15, #f59e0b); color: #78350f; }
.p-flag.flag-new { background: linear-gradient(135deg, #34d399, #059669); color: #fff; }
.p-thumb .p-flags { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pd-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.pd-badges .badge.p-flag { margin: 0; }

/* Catalog sort chips */
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 20px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--r-full);
    border: 1.5px solid var(--border); background: var(--surface);
    color: var(--text); font-weight: 700; font-size: .84rem; transition: all .16s ease;
}
.chip:hover { border-color: var(--brand-200); color: var(--brand-700); }
.chip.active { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px rgba(99,102,241,.7); }

/* "mulai Rp …" on cards with variants */
.p-price .price-from { color: var(--muted); font-size: .78rem; margin-right: 4px; }
.p-price .price-variants { color: var(--muted); font-size: .76rem; margin-left: 6px; }

/* Variant picker on the landing page */
.pd-price-box .price-variant { width: 100%; color: var(--muted); font-size: .82rem; font-weight: 600; }
.pd-variants { margin: 0 0 16px; }
.pd-variants-label { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.variant-option {
    display: flex; align-items: center; gap: 12px;
    border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface);
    padding: 12px 14px; margin-bottom: 8px; cursor: pointer; transition: all .16s ease;
}
.variant-option:hover { border-color: var(--brand-200); }
.variant-option.checked { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.variant-option input { accent-color: var(--brand-600); width: 18px; height: 18px; flex-shrink: 0; }
.variant-option .vo-body { flex: 1; min-width: 0; }
.variant-option .vo-name { display: block; font-weight: 700; font-size: .93rem; }
.variant-option .vo-desc { display: block; color: var(--muted); font-size: .8rem; }
.variant-option .vo-price { white-space: nowrap; font-size: .92rem; }
.variant-option .vo-price s { color: #94a3b8; font-size: .8rem; }
.variant-option .vo-price b { color: var(--brand-700); font-weight: 800; }

/* Header search */
.nav-search-toggle {
    width: 40px; height: 40px; border-radius: var(--r-full); border: 1px solid var(--border);
    background: var(--surface); cursor: pointer; font-size: 1rem; transition: all .18s ease;
}
.nav-search-toggle:hover, .nav-search-toggle.active { background: var(--brand-50); border-color: var(--brand-200); }
.nav-search { border-top: 1px solid var(--border); background: var(--surface); padding: 10px 0; }
.nav-search[hidden] { display: none; }
.nav-search .container { display: flex; gap: 8px; }
.nav-search input {
    flex: 1; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 12px;
    font-size: .95rem; font-family: inherit; outline: none;
}
.nav-search input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }

/* Related products on the landing page */
.related-grid { margin-top: 4px; }
.cart-info .cart-variant { display: inline-block; margin-left: 6px; font-size: .76rem; font-weight: 700; color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-100); padding: 1px 8px; border-radius: var(--r-full); }

.p-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }

.p-body h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.p-body h3 a { color: var(--text); }
.p-body h3 a:hover { color: var(--brand-700); }

.p-desc {
    color: var(--muted); font-size: .86rem; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 12px;
}

.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.p-price .price-now { font-weight: 800; font-size: 1.08rem; color: var(--brand-700); }
.p-price .price-old { color: #94a3b8; text-decoration: line-through; font-size: .82rem; margin-right: 7px; }

.p-actions { display: flex; gap: 8px; margin-top: 14px; }
.p-actions .btn { flex: 1; justify-content: center; display: inline-flex; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); color: var(--text);
    font-weight: 700; font-size: .9rem; line-height: 1.2;
    cursor: pointer; text-decoration: none;
    transition: all .18s ease;
}
.btn:hover { border-color: var(--brand-200); background: var(--brand-50); color: var(--brand-700); transform: translateY(-1px); }

.btn-primary {
    background: var(--grad-brand); border: none; color: #fff;
    box-shadow: 0 10px 22px -10px rgba(99,102,241,.65);
}
.btn-primary:hover { background: var(--grad-brand); filter: brightness(1.06); color: #fff; box-shadow: 0 14px 26px -10px rgba(99,102,241,.75); }

.btn-accent {
    background: var(--grad-accent); border: none; color: #7c2d12;
    box-shadow: 0 10px 22px -10px rgba(249,115,22,.65);
}
.btn-accent:hover { filter: brightness(1.05); color: #7c2d12; transform: translateY(-1px); }

.btn-danger { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-bd); }
.btn-danger:hover { background: #fee2e2; color: #991b1b; }

.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: 7px 13px; font-size: .82rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ==========================================================================
   CARDS / PANELS
   ========================================================================== */

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.panel + .panel { margin-top: 18px; }

.panel h3 { font-size: 1.02rem; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block; font-weight: 600; font-size: .86rem;
    margin-bottom: 6px; color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--border); border-radius: 12px;
    background: #fbfcfe; color: var(--text);
    font-size: .95rem; font-family: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none; background: #fff;
    border-color: var(--brand-400);
    box-shadow: 0 0 0 4px rgba(99,102,241,.14);
}

.radio-option {
    display: flex; align-items: center; gap: 12px;
    border: 1.5px solid var(--border); border-radius: 14px;
    padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
    transition: all .16s ease; background: #fbfcfe;
}
.radio-option:hover { border-color: var(--brand-200); }
.radio-option input { accent-color: var(--brand-600); width: 18px; height: 18px; }
.radio-option.checked, .radio-option:has(input:checked) {
    border-color: var(--brand-500); background: var(--brand-50);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.radio-option .ro-icon { font-size: 1.4rem; }
.radio-option .ro-title { font-weight: 700; font-size: .93rem; }
.radio-option .ro-sub { color: var(--muted); font-size: .8rem; }

fieldset {
    border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 20px; margin-bottom: 18px; background: var(--surface);
    box-shadow: var(--shadow-sm);
}
legend { font-weight: 800; font-size: .9rem; padding: 0 10px; color: var(--brand-700); letter-spacing: .01em; }

/* ==========================================================================
   TABLES (front)
   ========================================================================== */

.data-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.data-table th, .data-table td { padding: 13px 16px; text-align: left; font-size: .92rem; }
.data-table thead th { background: #f8fafc; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; border-bottom: 1px solid var(--border); }
.data-table tbody tr + tr td { border-top: 1px solid var(--border); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   CART
   ========================================================================== */

.cart-list { display: flex; flex-direction: column; gap: 14px; }

.cart-row {
    display: flex; align-items: center; gap: 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 14px 16px;
    transition: box-shadow .18s ease;
}
.cart-row:hover { box-shadow: var(--shadow-md); }

.cart-thumb {
    width: 64px; height: 64px; border-radius: 12px; flex-shrink: 0;
    background: var(--grad-brand); color: rgba(255,255,255,.92);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
    overflow: hidden;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-info { flex: 1; min-width: 0; }
.cart-info a { color: var(--text); font-weight: 700; font-size: .95rem; }
.cart-info .cart-price { color: var(--muted); font-size: .84rem; }

.cart-qty { display: flex; align-items: center; gap: 8px; }
.qty-input {
    width: 64px; text-align: center; padding: 8px 6px;
    border: 1.5px solid var(--border); border-radius: 10px;
    font-weight: 700; font-size: .92rem;
}
.qty-input:focus { outline: none; border-color: var(--brand-400); }

.cart-line { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 110px; text-align: right; }

.btn-remove {
    background: transparent; border: 1px solid transparent; color: #ef4444;
    width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 1rem;
    transition: all .16s ease;
}
.btn-remove:hover { background: var(--danger-bg); border-color: var(--danger-bd); }

.cart-summary {
    position: sticky; top: 86px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-md);
}
.cart-summary .sum-row { display: flex; justify-content: space-between; padding: 7px 0; color: var(--muted); font-size: .93rem; }
.cart-summary .sum-total {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 14px;
    font-weight: 800; font-size: 1.15rem;
}
.cart-summary .sum-total .val { color: var(--brand-700); }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }

/* ==========================================================================
   CHECKOUT
   ========================================================================== */

.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; flex-wrap: wrap; }

.step {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 8px 16px; border-radius: var(--r-full);
    background: var(--surface); border: 1px solid var(--border);
    color: var(--muted); font-size: .84rem; font-weight: 700;
}
.step .n {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--border); color: var(--muted);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .74rem;
}
.step.active { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.step.active .n { background: var(--grad-brand); color: #fff; }
.step-sep { color: #cbd5e1; font-size: .8rem; }

.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }

.checkout-summary { position: sticky; top: 86px; }
.checkout-summary .item-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .9rem; border-bottom: 1px dashed var(--border); }
.checkout-summary .item-row:last-of-type { border-bottom: none; }
.checkout-summary .item-row .n { color: var(--muted); }
.checkout-summary .item-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.checkout-summary .sum-total { display: flex; justify-content: space-between; align-items: center; border-top: 2px solid var(--border); margin-top: 12px; padding-top: 14px; font-weight: 800; font-size: 1.12rem; }
.checkout-summary .sum-total .val { color: var(--brand-700); }

.secure-note {
    display: flex; align-items: center; gap: 8px; justify-content: center;
    color: var(--muted); font-size: .8rem; margin-top: 12px;
}

/* ==========================================================================
   ORDER / RECEIPT
   ========================================================================== */

.receipt {
    max-width: 680px; margin: 0 auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md);
}

.receipt-head {
    background: var(--grad-dark); color: #fff; padding: 30px 28px;
    position: relative; overflow: hidden;
}
.receipt-head::after {
    content: "✓"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    font-size: 4.4rem; opacity: .16;
}
.receipt-head .rc-label { color: #a5b4fc; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.receipt-head .rc-number { font-size: 1.5rem; font-weight: 800; margin-top: 4px; letter-spacing: .01em; }
.receipt-head .rc-sub { color: #c7d2fe; font-size: .85rem; margin-top: 6px; }

.receipt-body { padding: 24px 28px 28px; }

.status-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

.receipt-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.rm-item { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.rm-item .k { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.rm-item .v { font-weight: 700; font-size: .92rem; margin-top: 2px; word-break: break-word; }

.receipt-totals { margin-top: 16px; border-top: 2px solid var(--border); padding-top: 14px; }
.rt-row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--muted); font-size: .92rem; }
.rt-row.grand { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 12px; color: var(--text); font-weight: 800; font-size: 1.1rem; }
.rt-row.grand .val { color: var(--brand-700); }

.success-banner {
    display: flex; gap: 14px; align-items: flex-start;
    background: linear-gradient(135deg, var(--success-bg), #f0fdf4);
    border: 1px solid var(--success-bd); border-radius: var(--r-md);
    padding: 16px 18px; margin-bottom: 22px;
}
.success-banner .ic {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
    background: var(--grad-brand); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.success-banner b { display: block; }
.success-banner p { color: var(--muted); font-size: .88rem; }

/* ==========================================================================
   PAYMENT PAGE
   ========================================================================== */

.pay-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }

.pay-amount-card {
    background: var(--grad-dark); color: #fff;
    border-radius: var(--r-lg); padding: 24px;
    position: relative; overflow: hidden;
}
.pay-amount-card::after {
    content: "💳"; position: absolute; right: 14px; bottom: 8px;
    font-size: 3.4rem; opacity: .14;
}
.pay-amount-card .k { color: #a5b4fc; font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.pay-amount-card .amount { font-size: 2rem; font-weight: 800; margin-top: 4px; letter-spacing: -.01em; }
.pay-amount-card .meta { display: flex; flex-direction: column; gap: 5px; margin-top: 16px; color: #c7d2fe; font-size: .85rem; }
.pay-amount-card .meta b { color: #fff; }

.instruction-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.instruction-box .ib-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.instruction-box .ib-row:last-child { border-bottom: none; }
.instruction-box .ib-row .k { color: var(--muted); }
.instruction-box .ib-row .v { font-weight: 700; text-align: right; word-break: break-word; }
.instruction-box .ib-row .v.big { font-size: 1.15rem; letter-spacing: .06em; color: var(--brand-700); }

.upload-zone {
    display: block; position: relative; cursor: pointer;
    border: 2px dashed var(--brand-200); border-radius: var(--r-md);
    background: var(--brand-50);
    padding: 34px 20px; text-align: center;
    transition: all .18s ease;
}
.upload-zone:hover { border-color: var(--brand-400); background: var(--brand-100); }
.upload-zone .uz-icon { font-size: 2.2rem; }
.upload-zone .uz-title { font-weight: 800; margin-top: 8px; color: var(--brand-700); }
.upload-zone .uz-sub { color: var(--muted); font-size: .82rem; margin-top: 3px; }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.proof-item {
    display: flex; justify-content: space-between; gap: 10px;
    background: #f8fafc; border: 1px solid var(--border);
    border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; font-size: .88rem;
}
.proof-item .sz { color: var(--muted); }

/* ==========================================================================
   TRACKING
   ========================================================================== */

.track-hero { text-align: center; padding: 40px 0 8px; }
.track-hero h1 { font-size: 1.7rem; font-weight: 800; }
.track-hero p { color: var(--muted); margin-top: 6px; }

.track-card { max-width: 520px; margin: 26px auto 0; }

.timeline { position: relative; padding-left: 6px; }

.timeline-step {
    position: relative; display: flex; gap: 16px;
    padding: 0 0 26px 34px;
}
.timeline-step::before {
    content: ""; position: absolute; left: 12px; top: 22px; bottom: 0;
    width: 2px; background: var(--border);
}
.timeline-step:last-child::before { display: none; }

.timeline-dot {
    position: absolute; left: 0; top: 0;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--border);
    color: #94a3b8; font-size: .72rem;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
}
.timeline-step.done .timeline-dot {
    background: var(--grad-brand); border-color: transparent; color: #fff;
    box-shadow: 0 4px 12px -4px rgba(99,102,241,.6);
}
.timeline-step .tl-label { font-weight: 700; font-size: .93rem; color: #94a3b8; }
.timeline-step.done .tl-label { color: var(--text); }
.timeline-step .tl-time { color: var(--muted); font-size: .8rem; margin-top: 1px; }

.ent-card {
    border: 1px solid var(--border); border-radius: var(--r-md);
    padding: 18px; background: linear-gradient(180deg, #fbfcff, #fff);
}
.ent-card + .ent-card { margin-top: 12px; }
.ent-card .ent-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ent-card .ent-title { font-weight: 800; }
.ent-card .ent-meta { color: var(--muted); font-size: .84rem; margin-top: 6px; }
.ent-card .lic-key {
    display: inline-block; background: #f1f5f9; border: 1px solid var(--border);
    border-radius: 8px; padding: 4px 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem;
    letter-spacing: .04em;
}

/* ==========================================================================
   BADGES / ALERTS
   ========================================================================== */

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: var(--r-full);
    font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.badge-pending, .badge-awaiting_payment { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-bd); }
.badge-submitted, .badge-payment_submitted { background: var(--info-bg); color: var(--info-fg); border: 1px solid var(--info-bd); }
.badge-verified, .badge-paid, .badge-completed { background: var(--success-bg); color: var(--success-fg); border: 1px solid var(--success-bd); }
.badge-rejected { background: var(--danger-bg); color: var(--danger-fg); border: 1px solid var(--danger-bd); }
.badge-expired, .badge-cancelled { background: #f1f5f9; color: #475569; border: 1px solid var(--border); }
.badge-delivered { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-200); }
.badge-refunded { background: #faf5ff; color: #7e22ce; border: 1px solid #e9d5ff; }

.alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 14px 16px; border-radius: var(--r-md); margin-bottom: 18px;
    font-size: .92rem;
}
.alert-success { background: var(--success-bg); color: var(--success-fg); border: 1px solid var(--success-bd); }
.alert-error { background: var(--danger-bg); color: var(--danger-fg); border: 1px solid var(--danger-bd); }

/* ==========================================================================
   MISC PAGES
   ========================================================================== */

.page-center { max-width: 560px; margin: 0 auto; text-align: center; padding: 70px 0; }
.page-center .big-ic { font-size: 4rem; }
.page-center h1 { font-size: 1.8rem; margin: 14px 0 8px; }
.page-center p { color: var(--muted); margin-bottom: 22px; }

.breadcrumb { color: var(--muted); font-size: .85rem; margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand-600); }

/* ==========================================================================
   PRODUCT DETAIL PAGE
   ========================================================================== */

.pd-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: start; }

.pd-media {
    position: relative; border-radius: var(--r-lg); overflow: hidden;
    aspect-ratio: 4 / 3; background: var(--grad-brand);
    box-shadow: var(--shadow-lg);
}
.pd-media img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 10px; }
.pd-media .thumb-fallback {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 5rem; color: rgba(255,255,255,.9);
}

.pd-info .pd-badges .badge { margin: 0; }
.pd-info h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }

.pd-price-box {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    background: var(--brand-50); border: 1px solid var(--brand-100);
    border-radius: var(--r-md); padding: 16px 20px; margin: 18px 0;
}
.pd-price-box .price-now { font-size: 1.7rem; font-weight: 800; color: var(--brand-700); letter-spacing: -.01em; }
.pd-price-box .price-old { color: #94a3b8; text-decoration: line-through; font-size: 1rem; }
.pd-price-box .save-tag {
    background: var(--grad-accent); color: #7c2d12;
    font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: var(--r-full);
}

.pd-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.pd-cta form { flex: 1; min-width: 170px; }
.pd-cta .btn { width: 100%; }

.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.trust-item {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 12px; text-align: center;
}
.trust-item .ic { font-size: 1.3rem; }
.trust-item .t { font-size: .76rem; font-weight: 700; margin-top: 4px; color: #334155; }

.pd-desc { margin-top: 28px; }
.pd-desc .panel { line-height: 1.75; color: #334155; }

/* Promo countdown (product page + homepage popup) */
.promo-countdown {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border: 1px solid var(--warn-bd); border-radius: var(--r-md);
    padding: 14px 16px; margin: 0 0 16px;
}
.promo-countdown .pc-head { font-size: .8rem; font-weight: 800; color: var(--warn-fg); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.promo-countdown .pc-timer { display: flex; gap: 10px; flex-wrap: wrap; }
.promo-countdown .pc-timer span {
    display: flex; flex-direction: column; align-items: center; min-width: 58px;
    background: #fff; border: 1px solid var(--warn-bd); border-radius: 12px; padding: 6px 8px;
}
.promo-countdown .pc-timer b { font-size: 1.35rem; font-weight: 800; color: #9a3412; font-variant-numeric: tabular-nums; line-height: 1.1; }
.promo-countdown .pc-timer small { font-size: .66rem; font-weight: 700; color: var(--warn-fg); text-transform: uppercase; letter-spacing: .06em; }
.promo-countdown .pc-coupon { margin-top: 10px; font-size: .88rem; color: #7c2d12; }
.promo-countdown .pc-coupon code { background: #fff; border: 1px dashed var(--accent-500); border-radius: 8px; padding: 2px 8px; font-weight: 800; letter-spacing: .06em; }
.promo-countdown .pc-ended { font-weight: 700; color: var(--muted); }
.promo-countdown.compact { padding: 12px 14px; margin: 12px 0 14px; }
.promo-countdown.compact .pc-timer span { min-width: 50px; padding: 5px 6px; }
.promo-countdown.compact .pc-timer b { font-size: 1.15rem; }

/* Homepage promo popup — floats over the locked page, 50% x 50% of the viewport, centred;
   the JS drifts .promo-modal-card after the cursor via an inline transform. */
.promo-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.promo-modal[hidden] { display: none; }
.promo-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.6); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s ease; }
.promo-modal-card {
    position: relative; width: 50vw; height: 50vh; min-width: 560px; min-height: 340px;
    background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
    box-shadow: 0 40px 90px -20px rgba(15,23,42,.6), 0 0 0 1px rgba(255,255,255,.15);
    display: grid; grid-template-columns: minmax(180px, 42%) 1fr;
    opacity: 0; scale: .94; transition: opacity .25s ease, scale .25s ease;
    will-change: transform;
}
.promo-modal.open .promo-modal-backdrop { opacity: 1; }
.promo-modal.open .promo-modal-card { opacity: 1; scale: 1; }
.promo-modal-close {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(15,23,42,.7); color: #fff; font-size: .95rem; font-weight: 700;
}
.promo-modal-close:hover, .promo-modal-close:focus-visible { background: #0f172a; outline: 2px solid var(--accent-400); }
.promo-modal-media { background: #fff; border-right: 1px solid var(--border); display: flex; align-items: center; justify-content: center; padding: 14px; min-height: 0; }
.promo-modal-media img { width: 100%; height: 100%; object-fit: contain; }
.promo-modal-media .thumb-fallback { font-size: 4rem; }
.promo-modal-body { padding: 18px 20px 16px; display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.promo-modal-eyebrow {
    align-self: flex-start; background: var(--grad-accent); color: #7c2d12;
    font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    padding: 4px 11px; border-radius: var(--r-full); margin-bottom: 8px;
}
.promo-modal-body h3 { font-size: clamp(1rem, 1.6vw, 1.3rem); font-weight: 800; margin-bottom: 4px; line-height: 1.25; }
.promo-modal-desc { color: var(--muted); font-size: .84rem; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.promo-modal-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.promo-modal-price .price-now { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 800; color: var(--brand-700); }
.promo-modal-price .price-old { color: #94a3b8; text-decoration: line-through; font-size: .9rem; }
.promo-modal-price .save-tag { background: var(--grad-accent); color: #7c2d12; font-size: .68rem; font-weight: 800; padding: 3px 9px; border-radius: var(--r-full); }
.promo-modal-body .promo-countdown.compact { margin: 10px 0 12px; padding: 10px 12px; }
.promo-modal-body .promo-countdown.compact .pc-head { margin-bottom: 6px; font-size: .72rem; }
.promo-modal-body .promo-countdown.compact .pc-timer { gap: 6px; }
.promo-modal-body .promo-countdown.compact .pc-timer span { min-width: 46px; padding: 4px 5px; }
.promo-modal-body .promo-countdown.compact .pc-timer b { font-size: 1.05rem; }
.promo-modal-body .promo-countdown.compact .pc-coupon { margin-top: 6px; font-size: .8rem; }
.promo-modal-body .btn-lg { padding: 11px 18px; font-size: .92rem; margin-top: auto; }
.promo-modal-later { margin-top: 8px; background: none; border: none; color: var(--muted); font-size: .82rem; cursor: pointer; text-decoration: underline; }
body.promo-modal-open { overflow: hidden; }

/* QRIS image on the payment page */
.qris-box { text-align: center; margin-bottom: 16px; }
.qris-box img {
    width: min(280px, 100%); margin: 0 auto 10px; background: #fff;
    border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px; box-shadow: var(--shadow-sm);
}
.qris-box p { color: var(--muted); font-size: .9rem; }

/* Gallery thumbnails (up to 5 images) */
.pd-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.pd-thumb {
    padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden;
    background: var(--surface); cursor: pointer; aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm); transition: border-color .15s ease, transform .15s ease;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; }
.pd-thumb:hover { transform: translateY(-2px); }
.pd-thumb.active { border-color: var(--brand-500); }

/* Video embed */
.pd-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: #0f172a; }
.pd-video iframe, .pd-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Rating + testimonials */
.stars { color: var(--accent-500); letter-spacing: 1px; white-space: nowrap; }
.stars.big { font-size: 1.3rem; }
.pd-rating {
    display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 4px;
    color: var(--text); font-size: .92rem; text-decoration: none;
}
.pd-rating .muted { color: var(--muted); }
.pd-rating:hover { color: var(--brand-700); }
.testi-summary {
    display: flex; align-items: center; gap: 16px;
    background: var(--brand-50); border: 1px solid var(--brand-100);
    border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 18px;
}
.testi-summary .testi-score { font-size: 2.2rem; font-weight: 800; color: var(--brand-700); line-height: 1; }
.testi-summary .muted { color: var(--muted); font-size: .85rem; }
.testi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.testi-card {
    margin: 0; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px;
}
.testi-card p { color: #334155; font-size: .93rem; line-height: 1.65; flex: 1; }
.testi-card footer { font-weight: 700; font-size: .85rem; color: var(--brand-700); display: flex; align-items: center; gap: 10px; }
.testi-card footer small { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; }
.testi-avatar {
    flex: 0 0 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--grad-brand); color: #fff; font-size: .85rem;
}
.testi-images { display: flex; gap: 8px; flex-wrap: wrap; }
.testi-img {
    width: 84px; height: 84px; padding: 0; border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; cursor: zoom-in; background: var(--surface);
}
.testi-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.testi-img:hover img { transform: scale(1.06); }
.lightbox {
    position: fixed; inset: 0; z-index: 300; background: rgba(15, 23, 42, .88);
    display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: var(--shadow-lg); cursor: default; }
.lightbox-close {
    position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.1rem; cursor: pointer;
}
body.lightbox-open { overflow: hidden; }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: #0f172a; color: #94a3b8;
    margin-top: 40px; padding: 44px 0 0;
}
.site-footer .f-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 34px; }
.site-footer .f-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.site-footer .f-brand .logo-mark { width: 32px; height: 32px; font-size: .95rem; }
.site-footer p { font-size: .88rem; max-width: 320px; }
.site-footer h4 { color: #e2e8f0; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul a { color: #94a3b8; font-size: .9rem; }
.site-footer ul a:hover { color: #fff; }
.site-footer .f-bottom { border-top: 1px solid rgba(148,163,184,.18); padding: 16px 0; text-align: center; font-size: .8rem; color: #64748b; }

/* ==========================================================================
   TOAST
   ========================================================================== */

.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: #0f172a; color: #fff;
    padding: 12px 18px; border-radius: 12px;
    font-size: .88rem; font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: toastIn .3s ease;
}
.toast.ok { background: linear-gradient(135deg, #059669, #10b981); }
.toast.err { background: linear-gradient(135deg, #dc2626, #ef4444); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* toasts sit above the chat button */
.toast-wrap { bottom: 92px; }

/* ==========================================================================
   PURCHASE COUNT ("terjual")
   ========================================================================== */
.p-sold { color: var(--muted); font-size: .8rem; margin: -6px 0 10px; }
.p-sold b { color: var(--text); }
.pd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 10px 0 4px; }
.pd-meta .pd-rating { margin: 0; }
.pd-sold { font-size: .92rem; color: var(--muted); }
.pd-sold b { color: var(--text); }

/* ==========================================================================
   COOKIE CONSENT (ad pixels, optional)
   ========================================================================== */
.consent-bar {
    position: fixed; left: 18px; bottom: 18px; z-index: 96; max-width: min(460px, calc(100vw - 110px));
    display: flex; flex-direction: column; gap: 10px; padding: 14px 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
    font-size: .84rem; color: var(--text);
}
.consent-bar[hidden] { display: none; }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 640px) { .consent-bar { left: 8px; right: 80px; max-width: none; } }

/* ==========================================================================
   SOCIAL PROOF (bottom right, above the chat button)
   ========================================================================== */
.sp-wrap { position: fixed; right: 18px; bottom: 92px; z-index: 90; max-width: min(340px, calc(100vw - 32px)); }
.sp-card {
    position: relative; display: flex; gap: 12px; align-items: center;
    padding: 10px 34px 10px 10px; border-radius: var(--r-md);
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    color: var(--text); text-decoration: none;
    opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .35s ease;
}
.sp-card.in { opacity: 1; transform: none; }
.sp-card:hover { border-color: var(--brand-200); }
.sp-media {
    flex: 0 0 52px; height: 52px; border-radius: 12px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-50); font-size: 1.5rem;
}
.sp-media img { width: 100%; height: 100%; object-fit: cover; }
.sp-text { display: flex; flex-direction: column; min-width: 0; font-size: .84rem; line-height: 1.35; }
.sp-line { color: var(--muted); }
.sp-product { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-ago { color: #059669; font-size: .74rem; font-weight: 600; margin-top: 2px; }
.sp-close {
    position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 50%;
    background: transparent; color: var(--muted); cursor: pointer; font-size: .75rem;
}
.sp-close:hover { background: var(--bg); color: var(--text); }
body.chat-open .sp-wrap { display: none; }

/* ==========================================================================
   CHAT CS WIDGET
   ========================================================================== */
.chat-widget { position: fixed; right: 18px; bottom: 18px; z-index: 95; }
.chat-fab {
    display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 20px 0 16px;
    border: 0; border-radius: var(--r-full); cursor: pointer;
    background: var(--grad-brand); color: #fff; font: inherit; font-weight: 700;
    box-shadow: var(--shadow-lg); transition: transform .15s ease;
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab-ic { font-size: 1.35rem; }
body.chat-open .chat-fab { display: none; }
.chat-panel {
    position: fixed; right: 18px; bottom: 18px;
    width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 110px));
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--grad-dark); color: #fff; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.chat-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-title small { opacity: .8; font-size: .74rem; }
.chat-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d399; margin-right: 3px; }
.chat-icon-btn { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.chat-icon-btn:hover { background: rgba(255,255,255,.25); }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; flex-direction: column; max-width: 88%; }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.bot { align-self: flex-start; }
.chat-bubble { padding: 9px 13px; border-radius: 16px; font-size: .9rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.bot .chat-bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.chat-msg.me .chat-bubble { background: var(--brand-600); color: #fff; border-bottom-right-radius: 6px; }
.chat-msg.me .chat-bubble a { color: #fff; }
.chat-msg.typing .chat-bubble { color: var(--muted); letter-spacing: 2px; animation: chatPulse 1s infinite; }
@keyframes chatPulse { 50% { opacity: .4; } }
.chat-products { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; width: 100%; }
.chat-product {
    display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
}
.chat-product:hover { border-color: var(--brand-400); }
.cp-thumb { flex: 0 0 44px; height: 44px; border-radius: 10px; overflow: hidden; background: var(--brand-50); display: flex; align-items: center; justify-content: center; }
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cp-info { display: flex; flex-direction: column; min-width: 0; font-size: .82rem; }
.cp-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-price { color: var(--brand-700); font-weight: 700; }
.cp-price s { color: var(--muted); font-weight: 400; }
.cp-info small { color: var(--muted); }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; background: var(--surface); }
.chat-suggest[hidden] { display: none; }
.chat-suggest button {
    border: 1px solid var(--brand-200); background: var(--brand-50); color: var(--brand-700);
    border-radius: var(--r-full); padding: 5px 11px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer;
}
.chat-form { display: flex; gap: 8px; padding: 10px 12px; background: var(--surface); }
.chat-form input { flex: 1; min-width: 0; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--r-full); font: inherit; font-size: .9rem; }
.chat-form input:focus { outline: none; border-color: var(--brand-400); }
.chat-form .btn { border-radius: var(--r-full); padding: 0 16px; }
.chat-foot { padding: 0 12px 10px; background: var(--surface); color: var(--muted); font-size: .7rem; text-align: center; }
@media (max-width: 640px) {
    .chat-fab-label { display: none; }
    .chat-fab { width: 56px; padding: 0; justify-content: center; }
    .chat-panel { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100vh - 80px); }
    .sp-wrap { right: 12px; left: 12px; bottom: 86px; max-width: none; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
    .promo-modal-card { min-width: 0; width: 80vw; height: auto; min-height: 0; max-height: 80vh; }
    .cart-layout, .checkout-layout, .pay-layout { grid-template-columns: 1fr; }
    .cart-summary, .checkout-summary { position: static; }
    .pd-layout { grid-template-columns: 1fr; }
    .trust-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    body { font-size: 15px; }
    .pd-thumbs { gap: 6px; }
    .testi-grid { grid-template-columns: 1fr; }
    .promo-modal { padding: 12px; }
    /* Phones: 50% of a phone screen is unusable — use the width, keep the height to content */
    .promo-modal-card { width: 100%; min-width: 0; height: auto; min-height: 0; max-height: calc(100vh - 24px); grid-template-columns: 1fr; overflow: auto; }
    .promo-modal-media { min-height: 150px; max-height: 190px; border-right: none; border-bottom: 1px solid var(--border); }
    .promo-modal-body { padding: 16px 16px 14px; overflow: visible; }
    .promo-countdown .pc-timer span { min-width: 50px; }
    .site-header .container { height: 60px; }
    .site-header nav a:not(.nav-cart) { display: none; }
    .nav-search-toggle { width: 38px; height: 38px; }
    .filter-chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .chip { white-space: nowrap; }
    .hero { padding: 52px 0 62px; }
    .hero-stats { gap: 18px; }
    .cart-row { flex-wrap: wrap; }
    .cart-line { min-width: 0; width: 100%; text-align: left; }
    .data-table { display: block; overflow-x: auto; }
    .site-footer .f-grid { grid-template-columns: 1fr; gap: 22px; }
}

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