/* ANDRE JAYA ELECTRONIC Online Shop - Mobile-first, Lazada-style, Navy/White theme */

:root {
    --navy: #0d1b4c;
    --navy-dark: #081235;
    --blue-accent: #2f6bff;
    --blue-light: #eaf1ff;
    --bg: #ffffff;
    --bg-soft: #f4f6fb;
    --text: #1c1f2b;
    --text-muted: #6b7280;
    --border: #e3e7f1;
    --danger: #e74c3c;
    --success: #1aa260;
    --warning: #f5a623;
    --radius: 12px;
    --max-width: 480px;
    --topbar-height: 58px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg-soft);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

.app-shell {
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--bg);
    min-height: 100vh;
    position: relative;
    padding-bottom: 72px;
    box-shadow: 0 0 24px rgba(13, 27, 76, 0.08);
}

/* ===== Top Sticky Bar (fixed 2-row layout, white background) ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    color: var(--navy);
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
}
.topbar-form { display: flex; flex-direction: column; gap: 8px; }
.topbar-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    position: relative;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-top: 2px; }
.topbar-actions .icon-btn { color: var(--navy); }
.notif-dropdown {
    display: none;
    position: absolute;
    top: 46px;
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(8, 18, 53, 0.25);
    overflow: hidden;
    z-index: 80;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-title {
    padding: 10px 14px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--navy);
    border-bottom: 1px solid var(--border);
}
.notif-empty {
    padding: 20px 14px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}
.topbar-logo { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
/* Varian dengan lambang: lambang di kiri, teks menumpuk di kanannya. */
.topbar-logo.has-mark { flex-direction: row; align-items: center; gap: 9px; min-width: 0; }
.topbar-logo-mark { width: 42px; height: 42px; flex-shrink: 0; object-fit: contain; display: block; }
.topbar-logo-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
/* Nama toko panjang ("SUKSES JAYA BERSAMA") harus muat di sebelah lambang pada
   layar 360px, jadi teksnya mengecil begitu ada lambang. */
.topbar-logo.has-mark .topbar-logo-line1 { font-size: 13.5px; letter-spacing: 0.2px; }
.topbar-logo.has-mark .topbar-logo-line2 { font-size: 11px; letter-spacing: 1.2px; }
.topbar-logo.has-mark .topbar-tagline { font-size: 9px; margin-top: 2px; }
/* Di 320px, nama panjang + lambang + 2 ikon aksi tidak muat pada ukuran di atas:
   teksnya (nowrap) menabrak ikon chat, bukan membungkus. Kecilkan keduanya. */
@media (max-width: 360px) {
    .topbar-logo.has-mark { gap: 7px; }
    .topbar-logo.has-mark .topbar-logo-mark { width: 36px; height: 36px; }
    .topbar-logo.has-mark .topbar-logo-line1 { font-size: 11.5px; }
    .topbar-logo.has-mark .topbar-logo-line2 { font-size: 9.5px; letter-spacing: 0.8px; }
    .topbar-logo.has-mark .topbar-tagline { font-size: 8px; }
}
.topbar-logo-line1 {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    color: var(--navy);
}
.topbar-logo-line2 {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1.5px;
    white-space: nowrap;
    color: var(--blue-accent);
}
.topbar-tagline {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
}
.search-wrap { position: relative; width: 100%; }
.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 7px 12px;
    gap: 6px;
}
.search-bar input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 0;
    width: 100%;
    font-size: 13px;
    color: var(--text);
}
.search-suggest {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(8, 18, 53, 0.28);
    overflow: hidden;
    max-height: 340px;
    overflow-y: auto;
    z-index: 80;
}
.search-suggest.open { display: block; }
.search-suggest-note {
    padding: 9px 14px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}
.search-suggest-note a { color: var(--blue-accent); font-weight: 700; }
.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.search-suggest-item:last-child { border-bottom: none; }
.search-suggest-item img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.search-suggest-item .name { font-size: 12.5px; flex: 1; }
.search-suggest-item .price { font-size: 12px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.search-suggest-empty { padding: 16px 14px; font-size: 12px; color: var(--text-muted); text-align: center; }
.icon-btn {
    position: relative;
    color: #fff;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.ico { display: block; }
.ic-inline { display: flex; align-items: center; color: var(--text-muted); }
.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
}
/* ===== Hero Carousel ===== */
.hero-carousel-wrap { position: relative; }
.hero-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.hero-dots .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: width 0.2s, border-radius 0.2s, background 0.2s;
}
.hero-dots .dot.active { background: #fff; width: 16px; border-radius: 3px; }
.hero-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
}
.hero-carousel::-webkit-scrollbar { display: none; }
.hero-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    position: relative;
}
.hero-slide img { width: 100%; height: 150px; object-fit: cover; }
.hero-slide .hero-caption {
    position: absolute;
    left: 16px;
    bottom: 14px;
    color: #fff;
}
.hero-caption h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.hero-caption p { margin: 0; font-size: 12px; opacity: 0.9; }

/* ===== Section Titles ===== */
.section {
    padding: 16px 14px;
}
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.section-title h2 { font-size: 15px; margin: 0; font-weight: 800; color: var(--navy); }
.section-title a { font-size: 12px; color: var(--blue-accent); font-weight: 600; }

/* ===== Quick Categories ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.category-item {
    text-align: center;
    font-size: 11px;
    color: var(--text);
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}
.category-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}
.category-icon img { width: 28px; height: 28px; }
.category-icon.story-ring {
    border: 2.5px solid transparent;
    background:
        linear-gradient(var(--blue-light), var(--blue-light)) padding-box,
        linear-gradient(135deg, var(--blue-accent), var(--navy), var(--blue-accent), var(--navy)) border-box;
    background-size: 100% 100%, 300% 300%;
    animation: story-ring-flow 3.5s linear infinite;
}
@keyframes story-ring-flow {
    0% { background-position: 0% 0%, 0% 0%; }
    100% { background-position: 0% 0%, 100% 100%; }
}

/* ===== Category Story Viewer (IG/WA Story style) ===== */
.story-viewer {
    display: none;
    position: fixed;
    inset: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: var(--max-width);
    width: 100%;
    background: #000;
    z-index: 300;
    flex-direction: column;
}
.story-viewer.open { display: flex; }
.story-progress { display: flex; gap: 4px; padding: 10px 10px 0; z-index: 3; }
.story-progress-seg { flex: 1; height: 3px; background: rgba(255,255,255,0.35); border-radius: 2px; overflow: hidden; }
.story-progress-seg .fill { height: 100%; width: 0%; background: #fff; border-radius: 2px; }
.story-progress-seg.done .fill { width: 100%; transition: none; }
.story-progress-seg.active .fill { transition: width linear; }
.story-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; position: relative; z-index: 3; }
.story-header-icon { width: 26px; height: 26px; border-radius: 50%; background: #fff; padding: 3px; }
.story-header-name { color: #fff; font-weight: 700; font-size: 13px; flex: 1; }
.story-close { background: none; border: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 6px; }
.story-slide-content { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: #10193f; }
.story-slide-content img,
.story-slide-content video { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Video demo produk mengisi bingkai potret penuh, seperti story di IG/WA.
   object-fit: cover dipakai supaya video landscape pun tetap memenuhi layar
   tanpa bilah hitam di atas-bawah. */
.story-slide-content video {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Slide foto diberi gerakan Ken Burns supaya story tetap "hidup" selama video
   produk asli dari klien belum ada. Dinyalakan lewat kelas .is-animated yang
   dipasang ulang JS tiap ganti slide, agar animasinya mengulang. */
@keyframes storyKenBurns {
    from { transform: scale(1) translate3d(0, 0, 0); }
    to   { transform: scale(1.12) translate3d(0, -1.5%, 0); }
}
.story-slide-content img.is-animated {
    animation: storyKenBurns 5s ease-out forwards;
}

/* Hormati preferensi sistem: sebagian orang mual oleh gerakan berulang. */
@media (prefers-reduced-motion: reduce) {
    .story-slide-content img.is-animated { animation: none; }
}
.story-tap-zone { position: absolute; top: 50px; bottom: 96px; width: 50%; z-index: 1; }
.story-tap-prev { left: 0; }
.story-tap-next { right: 0; }
.story-caption { padding: 14px 16px 22px; background: linear-gradient(0deg, rgba(0,0,0,0.8), transparent); position: relative; z-index: 3; }
.story-caption-title { color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.story-caption-price { color: #9fc0ff; font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.story-caption-actions { display: flex; gap: 8px; }
.story-caption-actions .btn { flex: 1; text-align: center; }

/* ===== Flash Sale ===== */
.flash-sale-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, var(--navy), var(--blue-accent));
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius) var(--radius) 0 0;
}
.flash-sale-header h2 { font-size: 14px; margin: 0; font-weight: 800; }
.countdown {
    display: flex;
    gap: 4px;
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
}
.countdown span { background: rgba(255,255,255,0.2); padding: 2px 6px; border-radius: 4px; }
.flash-sale-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px;
    background: var(--blue-light);
    border-radius: 0 0 var(--radius) var(--radius);
}
.flash-sale-strip .product-card { flex: 0 0 130px; }

/* ===== Product Grid / Card ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.product-card .thumb { position: relative; }
.product-card .thumb img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.badge-discount {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}
.product-info { padding: 8px 10px 10px; }
.product-info .title {
    font-size: 12.5px;
    line-height: 1.3;
    height: 32px;
    overflow: hidden;
    margin-bottom: 4px;
}
.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price-now { color: var(--navy); font-weight: 800; font-size: 14px; }
.price-old { color: var(--text-muted); font-size: 11px; text-decoration: line-through; }
.meta-row { display: flex; justify-content: space-between; flex-wrap: wrap; row-gap: 4px; margin-top: 6px; font-size: 10.5px; color: var(--text-muted); }
.rating { color: var(--warning); }
.sold-count { display: inline-flex; align-items: center; gap: 4px; }
.badge-tag { display: inline-block; font-size: 9.5px; font-weight: 700; padding: 1.5px 6px; border-radius: 4px; white-space: nowrap; }
.badge-bestseller { background: #fff4e0; color: #b9740a; }
.badge-new { background: #e8f8f0; color: var(--success); }
.product-card.is-bestseller {
    border: 1px solid var(--border);
    box-shadow: 0 0 18px 3px rgba(245, 166, 35, 0.55);
}
.product-card.is-new { border-color: var(--success); }

/* ===== Filter / Sort Bar ===== */
.filter-bar-wrap {
    position: sticky;
    top: var(--topbar-height, 58px);
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.filter-row {
    display: flex;
    gap: 8px;
    padding: 9px 14px;
    overflow-x: auto;
}
.filter-row.sort-row {
    border-top: 1px dashed var(--border);
    overflow-x: hidden;
    align-items: center;
}
.sort-chips { display: flex; gap: 8px; overflow-x: auto; flex: 1; }
.filter-fab-btn {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; position: relative;
}
.filter-fab-btn.has-filter::after {
    content: '';
    position: absolute; top: 1px; right: 1px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--danger); border: 1.5px solid #fff;
}

/* ===== Full Filter Side Panel ===== */
.filter-overlay {
    display: none;
    position: fixed; inset: 0;
    left: 50%; transform: translateX(-50%);
    max-width: var(--max-width); width: 100%;
    background: rgba(8, 18, 53, 0.45);
    z-index: 90;
}
.filter-overlay.open { display: block; }
.filter-panel {
    position: fixed;
    top: 0; bottom: 0; right: 0;
    transform: translateX(100%);
    width: 82%;
    max-width: 380px;
    background: #fff;
    z-index: 91;
    display: flex;
    flex-direction: column;
    transition: transform 0.28s ease;
    box-shadow: -6px 0 20px rgba(8, 18, 53, 0.2);
}
.filter-panel.open { transform: translateX(0); }
@media (min-width: 481px) {
    .filter-panel { right: calc(50% - var(--max-width) / 2); }
}
.filter-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; border-bottom: 1px solid var(--border);
}
.filter-panel-header h3 { margin: 0; font-size: 15px; color: var(--navy); }
.filter-panel-header .story-close { color: var(--navy); }
.filter-panel-body { flex: 1; overflow-y: auto; padding: 4px 16px; }
.filter-panel-section { padding: 14px 0; border-bottom: 1px solid var(--border); }
.filter-panel-section h4 { font-size: 12.5px; color: var(--navy); margin: 0 0 10px; }
.filter-option-list { display: flex; flex-direction: column; gap: 10px; }
.filter-option { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.filter-option input { width: auto; margin: 0; accent-color: var(--navy); }
.price-range-row { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.price-range-row input {
    flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}
.filter-panel-footer { display: flex; gap: 10px; padding: 14px 0 24px; position: sticky; bottom: 0; background: #fff; }
.filter-panel-footer .btn { flex: 1; }
.filter-chip {
    white-space: nowrap;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    color: var(--text);
    background: #fff;
}
.filter-chip.active, .filter-chip:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    text-align: center;
    padding: 11px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    border: none;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-accent { background: var(--blue-accent); color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-danger { background: var(--danger); color: #fff; }

/* ===== Product Detail Page ===== */
.gallery { position: relative; }
.gallery-main img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 6px; padding: 8px 14px; overflow-x: auto; }
.gallery-thumbs img {
    width: 56px; height: 56px; object-fit: cover; border-radius: 8px;
    border: 2px solid transparent; opacity: 0.7;
}
.gallery-thumbs img.active { border-color: var(--blue-accent); opacity: 1; }
.video-slot {
    display: flex; align-items: center; gap: 8px;
    background: var(--blue-light); border-radius: 8px; padding: 8px 10px;
    margin: 0 14px 10px; font-size: 12px; color: var(--navy);
}
.video-slot .play-icon {
    width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}

.price-panel { padding: 14px; border-bottom: 8px solid var(--bg-soft); }
.price-panel h1 { font-size: 16px; margin: 0 0 8px; line-height: 1.35; }
.price-panel .price-now { font-size: 22px; }
.warranty-tag {
    display: inline-block; margin-top: 8px; font-size: 11px; color: var(--success);
    background: #e8f8f0; padding: 3px 8px; border-radius: 4px; font-weight: 700;
}

.variant-block { padding: 14px; border-bottom: 8px solid var(--bg-soft); }
.variant-block h4 { font-size: 13px; margin: 0 0 8px; color: var(--navy); }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.variant-pill {
    padding: 7px 14px; border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 12.5px; background: #fff;
}
.variant-pill.selected { border-color: var(--navy); background: var(--navy); color: #fff; }

.spec-table { padding: 14px; border-bottom: 8px solid var(--bg-soft); }
.spec-table h4 { font-size: 13px; margin: 0 0 10px; color: var(--navy); }
.spec-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.spec-table td { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.spec-table td:first-child { color: var(--text-muted); width: 45%; }

.desc-block { padding: 14px 14px 90px; font-size: 13px; line-height: 1.6; color: #333; }
.desc-block h4 { font-size: 13px; margin: 0 0 8px; color: var(--navy); }

.sticky-action-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: var(--max-width);
    background: #fff;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
    z-index: 60;
}
.sticky-action-bar .wa-btn {
    flex: 0 0 46px;
    background: #e8f8f0;
    color: var(--success);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.sticky-action-bar .btn { flex: 1; }

/* ===== Cart Page ===== */
.cart-item {
    display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cart-item .info { flex: 1; }
.cart-item .title { font-size: 13px; margin-bottom: 2px; }
.cart-item .variant { font-size: 11px; color: var(--text-muted); }
.cart-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cart-price-row .unit-price { font-size: 13px; font-weight: 800; color: var(--navy); }
.cart-price-row .subtotal-price { font-size: 11.5px; color: var(--text-muted); }
.qty-control { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.qty-control button {
    width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border); background: #fff;
}
/* Ganti varian langsung dari keranjang — sejajar dengan stepper jumlah. */
.qty-control .variant-select {
    font-size: 11.5px; color: var(--text); border: 1px solid var(--border); border-radius: 6px;
    padding: 3px 6px; background: #fff; max-width: 120px;
}
.cart-note-input {
    width: 100%;
    margin-top: 8px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 11.5px;
    font-family: inherit;
    color: var(--text);
    resize: none;
    min-height: 34px;
}
.cart-note-input::placeholder { color: #b6bccb; }
.cart-summary {
    position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border);
    padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.cart-summary .total { flex: 1; }
.cart-summary .total .label { font-size: 11px; color: var(--text-muted); }
.cart-summary .total .value { font-size: 16px; font-weight: 800; color: var(--navy); }

/* ===== Checkout ===== */
.checkout-section { padding: 14px; border-bottom: 8px solid var(--bg-soft); }
.checkout-section h3 { font-size: 13px; color: var(--navy); margin: 0 0 10px; }
.form-group { margin-bottom: 10px; }
.form-group label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}
.form-row { display: flex; gap: 8px; }
.form-row .form-group { flex: 1; }
.option-card {
    display: flex; align-items: center; gap: 10px; padding: 10px; border: 1.5px solid var(--border);
    border-radius: 8px; margin-bottom: 8px; font-size: 13px;
}
.option-card.selected { border-color: var(--blue-accent); background: var(--blue-light); }
.option-card .name { flex: 1; }
.option-card .cost { font-weight: 700; color: var(--navy); }

/* ===== Auth ===== */
.auth-wrap {
    position: relative;
    min-height: 100vh;
    padding: 40px 24px;
    background: linear-gradient(160deg, var(--navy-dark), var(--navy) 55%, #132a6b);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.auth-logo { position: relative; z-index: 2; text-align: center; margin-bottom: 24px; }
.auth-logo .brand { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.25; }
/* Dua bagian nama ditumpuk, bukan disambung: nama panjang seperti
   "SUKSES JAYA BERSAMA" + "ELEKTRONIK" akan menyatu jadi satu kata kalau
   dibiarkan inline (dulu tidak terlihat karena nama lama pendek). */
.auth-logo .brand .l1 { display: block; font-size: 19px; letter-spacing: 0.3px; }
.auth-logo .brand .l2 { display: block; font-size: 14px; letter-spacing: 3px; color: #7fb0ff; margin-top: 1px; }
.auth-logo .tagline { font-size: 11.5px; color: #b8c8ef; margin-top: 4px; }
.auth-card {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 16px;
    padding: 24px 22px;
    box-shadow: 0 20px 50px rgba(3, 9, 34, 0.45);
}
.auth-switch { text-align: center; margin-top: 16px; font-size: 12.5px; }
.auth-switch a { color: var(--blue-accent); font-weight: 700; }
.alert { padding: 10px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 14px; }
.alert-danger { background: #fdecea; color: var(--danger); }
.alert-success { background: #e8f8f0; color: var(--success); }
.auth-divider {
    display: flex; align-items: center; gap: 10px;
    margin: 16px 0; font-size: 11.5px; color: var(--text-muted);
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.google-login-note {
    background: var(--bg-soft); border-radius: 8px; padding: 10px 12px;
    font-size: 11px; color: var(--text-muted); margin-bottom: 16px;
}
.google-login-note code { background: #fff; padding: 1px 5px; border-radius: 4px; color: var(--navy); }

/* ===== Bottom Tab Nav (customer) ===== */
.bottom-nav {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%;
    max-width: var(--max-width); background: #fff; border-top: 1px solid var(--border);
    display: flex; z-index: 60;
}
.bottom-nav a {
    flex: 1; text-align: center; padding: 8px 2px 6px; font-size: 9.5px; color: var(--text-muted); line-height: 1.2;
}
.bottom-nav a .ic { display: flex; width: fit-content; margin: 0 auto 2px; }
.bottom-nav a.active { color: var(--navy); font-weight: 700; }

/* Tombol tengah yang menonjol. Dipakai tab Promo; .live-tab dipertahankan
   supaya modul Live Shopping langsung tampil benar saat dinyalakan lagi. */
.bottom-nav a.promo-tab,
.bottom-nav a.live-tab { color: var(--text-muted); font-weight: 600; }
.bottom-nav a.promo-tab .ic,
.bottom-nav a.live-tab .ic {
    width: 42px; height: 42px;
    margin: -20px auto 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff5f6d, #ffa751);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(255, 95, 109, 0.45);
}
.bottom-nav a.promo-tab.active,
.bottom-nav a.live-tab.active { color: #ff5f6d; }
.bottom-nav a.promo-tab.active .ic,
.bottom-nav a.live-tab.active .ic { box-shadow: 0 4px 14px rgba(255, 95, 109, 0.65); }

/* ===== Admin / Owner Dashboard — mobile-app style (top bar + bottom tabs) ===== */
.admin-shell { max-width: 1100px; margin: 0 auto; background: #fff; min-height: 100vh; position: relative; }
.admin-topbar {
    position: sticky; top: 0; z-index: 50;
    background: var(--navy); color: #fff; padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.admin-topbar .brand { font-weight: 800; font-size: 14px; white-space: nowrap; }
.admin-topbar-sub { font-size: 11px; color: #c7d5f7; margin-top: 2px; }
.admin-body { padding: 16px 16px 90px; overflow-x: auto; }

.admin-bottom-nav {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%;
    max-width: 1100px; background: #fff; border-top: 1px solid var(--border);
    display: flex; z-index: 60; box-shadow: 0 -2px 10px rgba(13, 27, 76, 0.06);
}
.admin-bottom-nav a { flex: 1; text-align: center; padding: 9px 4px 7px; font-size: 10.5px; color: var(--text-muted); }
.admin-bottom-nav a .ic { display: flex; justify-content: center; margin-bottom: 2px; }
.admin-bottom-nav a.active { color: var(--navy); font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat-card .label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.stat-card .value { font-size: 20px; font-weight: 800; color: var(--navy); }
.panel { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.panel-header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 700; color: var(--navy); font-size: 13.5px; display: flex; justify-content: space-between; align-items: center; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th, table.data-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); text-align: left; }
table.data-table th { background: var(--bg-soft); color: var(--text-muted); font-size: 11.5px; text-transform: uppercase; }
.status-pill { padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.order-item-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.order-item-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.order-item-text { font-size: 12.5px; flex: 1; }
.status-new, .status-pending { background: #fff4e0; color: var(--warning); }
.status-processed, .status-paid { background: var(--blue-light); color: var(--blue-accent); }
.status-shipped { background: #e6f0ff; color: var(--navy); }
.status-completed { background: #e8f8f0; color: var(--success); }
.status-cancelled, .status-expired { background: #fdecea; color: var(--danger); }

.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding: 10px 4px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.bar-chart .bar .fill { width: 100%; background: linear-gradient(180deg, var(--blue-accent), var(--navy)); border-radius: 4px 4px 0 0; }
.bar-chart .bar .fill-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.bar-chart .bar .bar-value { font-size: 10.5px; color: var(--navy); font-weight: 700; margin-bottom: 4px; }

.form-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; max-width: 560px; }

/* ===== Live Shopping ===== */
.live-video-wrap { position: relative; background: #000; }
.live-video-bg { width: 100%; height: 260px; object-fit: cover; opacity: 0.85; }
.live-badge-live {
    position: absolute; top: 12px; left: 12px;
    background: #ff3b3b; color: #fff; font-size: 11px; font-weight: 800;
    padding: 4px 9px; border-radius: 5px; display: flex; align-items: center; gap: 5px;
}
.live-badge-live .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: live-pulse 1.2s infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.live-badge-viewers {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 9px; border-radius: 5px; display: flex; align-items: center; gap: 4px;
}
.live-host-bar {
    position: absolute; left: 12px; right: 12px; bottom: 12px;
    background: rgba(8,18,53,0.55); backdrop-filter: blur(2px);
    border-radius: 10px; padding: 8px 10px;
    display: flex; align-items: center; gap: 10px;
}
.live-host-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.live-host-info { flex: 1; min-width: 0; }
.live-host-info .name { color: #fff; font-size: 12.5px; font-weight: 700; }
.live-host-info .sub { color: #d6def5; font-size: 10.5px; }

.live-product-strip { display: flex; gap: 10px; overflow-x: auto; }
.live-product-card {
    flex: 0 0 120px; position: relative;
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff;
}
.live-product-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.live-product-info { padding: 6px 8px 8px; }
.live-product-info .title { font-size: 11px; height: 28px; overflow: hidden; margin-bottom: 3px; }
.live-product-info .price-now { font-size: 12.5px; }
.live-add-btn {
    position: absolute; top: 6px; right: 6px;
    width: 22px; height: 22px; border-radius: 50%; border: none;
    background: var(--navy); color: #fff; font-size: 15px; line-height: 1; font-weight: 700;
}

.live-chat-wrap { margin: 0 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.live-chat-feed { max-height: 160px; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--bg-soft); }
.live-chat-msg { font-size: 12px; color: var(--text); }
.live-chat-msg b { color: var(--navy); }
.live-chat-input { display: flex; border-top: 1px solid var(--border); background: #fff; }
.live-chat-input input { flex: 1; border: none; outline: none; padding: 10px 12px; font-size: 12.5px; min-width: 0; }
.live-chat-input button { background: none; border: none; color: var(--navy); padding: 0 14px; }

/* ===== Footer ===== */
.site-footer { padding: 20px 14px 90px; text-align: center; font-size: 11px; color: var(--text-muted); }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { display: flex; justify-content: center; margin-bottom: 10px; }

/* ===== Product Reviews ===== */
.star-input { display: flex; gap: 2px; }
.star-input .star-btn {
    background: none; border: none; padding: 0 1px; cursor: pointer;
    font-size: 22px; line-height: 1; color: #d5d9e3;
}
.star-input .star-btn.on { color: var(--warning); }
.review-list { padding: 0 14px; }
.review-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.review-item:last-child { border-bottom: none; }
.review-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.review-author { font-size: 12.5px; font-weight: 700; color: var(--navy); }
.review-stars { color: var(--warning); font-size: 13px; letter-spacing: 1px; }
.review-date { font-size: 10.5px; color: var(--text-muted); }
.review-comment { font-size: 12.5px; color: var(--text); line-height: 1.5; }
.review-summary {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    border-bottom: 8px solid var(--bg-soft);
}
.review-summary .avg { font-size: 26px; font-weight: 800; color: var(--navy); }
.review-summary .avg-stars { color: var(--warning); font-size: 14px; }
.review-summary .avg-count { font-size: 11.5px; color: var(--text-muted); }
.review-empty { padding: 16px 14px; font-size: 12.5px; color: var(--text-muted); border-bottom: 8px solid var(--bg-soft); }

/* ===== Halaman Promo ===== */
.promo-hero { position: relative; overflow: hidden; min-height: 190px; display: flex; align-items: flex-end; }
.promo-hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transform: scale(1.05);
}
.promo-hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(13,27,76,.25) 0%, rgba(13,27,76,.88) 100%);
}
.promo-hero-inner { position: relative; z-index: 1; padding: 20px 16px 18px; color: #fff; }
.promo-hero-kicker {
    display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; padding: 4px 10px; border-radius: 99px;
    background: linear-gradient(135deg, #ff5f6d, #ffa751); margin-bottom: 8px;
}
.promo-hero-title { font-size: 24px; font-weight: 800; line-height: 1.2; margin: 0 0 6px; }
.promo-hero-sub { font-size: 12.5px; opacity: .9; margin: 0; line-height: 1.55; }

.promo-card { padding-bottom: 4px; }
.promo-card .section-title h2 { display: flex; align-items: center; gap: 7px; }
.promo-countdown { font-size: 12px; color: var(--text-muted); }
.promo-countdown b {
    background: var(--navy); color: #fff; padding: 2px 5px;
    border-radius: 4px; font-size: 11.5px; margin: 0 1px;
}

/* Kartu voucher — bentuk tiket dengan takik di sisi kiri */
.voucher-card {
    display: flex; align-items: stretch; gap: 12px;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    padding: 12px; margin-bottom: 10px; position: relative; overflow: hidden;
}
.voucher-card::before {
    content: ''; position: absolute; left: 92px; top: 0; bottom: 0;
    border-left: 1px dashed var(--border);
}
.voucher-left {
    width: 80px; flex-shrink: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
}
.voucher-value { font-size: 17px; font-weight: 800; color: #ff5f6d; line-height: 1.15; }
.voucher-code {
    font-size: 10px; color: var(--text-muted); margin-top: 3px;
    font-family: ui-monospace, monospace; letter-spacing: .04em;
}
.voucher-right {
    flex: 1; padding-left: 12px; display: flex; align-items: center;
    justify-content: space-between; gap: 10px;
}
.voucher-detail { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.voucher-claimed-tag {
    display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
    font-size: 11.5px; font-weight: 600; color: var(--success, #17916b);
}
.voucher-card.is-claimed { background: #f7fbf9; }

/* Pilihan voucher di halaman checkout */
.voucher-pick {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px;
    font-size: 13px; cursor: pointer;
}
.voucher-pick.selected { border-color: var(--navy); background: #f5f8ff; }
.voucher-pick .potongan { margin-left: auto; font-weight: 700; color: #ff5f6d; }

/* ===== Toast — pengganti window.alert() bawaan browser =====
   Non-blocking, tampil di atas bottom-nav, hilang sendiri. Lebar mengikuti
   .app-shell di halaman customer; di panel admin (lebih lebar) jadi kartu
   kecil di pojok kanan-bawah supaya tidak menutupi tabel. */
#toastContainer {
    position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
    z-index: 999; width: calc(100% - 32px); max-width: calc(var(--max-width) - 32px);
    display: flex; flex-direction: column; gap: 8px; align-items: center;
    pointer-events: none;
}
.admin-shell #toastContainer {
    left: auto; right: 24px; bottom: 84px; transform: none;
    width: auto; max-width: 320px; align-items: stretch;
}
.toast {
    pointer-events: auto; display: flex; align-items: center; gap: 8px;
    background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 500; line-height: 1.4;
    box-shadow: 0 8px 24px rgba(13, 27, 76, .25);
    opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease;
    cursor: pointer;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

/* ===== Modal konfirmasi — pengganti window.confirm() bawaan browser ===== */
.confirm-overlay {
    position: fixed; inset: 0; background: rgba(13, 27, 76, .45); z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.confirm-overlay.show { opacity: 1; pointer-events: auto; }
.confirm-dialog {
    background: #fff; border-radius: var(--radius); padding: 20px;
    width: 100%; max-width: 300px; text-align: center;
    transform: scale(.96); transition: transform .15s ease;
    box-shadow: 0 20px 50px rgba(13, 27, 76, .3);
}
.confirm-overlay.show .confirm-dialog { transform: scale(1); }
.confirm-dialog p { font-size: 13.5px; color: var(--text); margin-bottom: 16px; line-height: 1.5; }
.confirm-dialog .confirm-actions { display: flex; gap: 8px; }
.confirm-dialog .confirm-actions button {
    flex: 1; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 700; border: none;
}
.confirm-dialog .confirm-cancel { background: var(--bg-soft); color: var(--text); }
.confirm-dialog .confirm-ok { background: var(--danger); color: #fff; }

/* ---- Aset merek (logo) ---- */
/* Halaman auth berlatar navy gelap. Dipakai monogram (warnanya kontras di
   latar gelap), BUKAN lockup penuh — tulisan "SUKSES" pada lockup berwarna
   navy dan akan tenggelam di latar yang sama. Nama toko tetap teks putih. */
.auth-logo-mark {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: contain;
    margin: 0 auto 10px;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}
/* Panel admin: lambang kecil di samping nama toko. */
.admin-brand-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-brand-mark { width: 34px; height: 34px; flex-shrink: 0; object-fit: contain; display: block; }
