/* ==========================================================================
   STYLES.CSS — Core & Global Layout
   ========================================================================== */

/* ---------- 1. ROOT & RESETS ---------- */
html {
    font-size: calc(100vw / 25);
}

html, body {
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
}

body {
    background-image: url("https://img.sukahemat.com/ilustrasi/bg-katalog.avif");
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    padding-bottom: calc(5.4rem + env(safe-area-inset-bottom));
}

button {
    touch-action: manipulation;
}

h2 {
    font-weight: 700;
    color: #2c3e50;
}

/* Proteksi gambar produk & banner */
.product-img,
.product-image,
.carousel-item img,
.variant-sheet-item img {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

/* Container halaman utama */
.main-container {
    padding-top: 0.5rem !important;
    padding-bottom: 1.75rem !important;
}

.row {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
}

.col-4 {
    padding: 0.15rem !important;
}

.col-6 {
    padding: 0.5rem 0.25rem !important;
    margin: 0 !important;
}

/* ---------- 2. STICKY HEADER & CONTROLS ---------- */
.header {
    background-image: url("https://img.sukahemat.com/ilustrasi/bg-header-katalog.avif"); /*linear-gradient(135deg, #3498db, #2c3e50)*/
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    color: white;
    padding: 0.75rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    margin: 0;
}

.header .container-fluid {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.75rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 1000;
    white-space: nowrap;
    margin-bottom: 0.5rem;
}

.header h1 i {
    font-size: 1.4rem;
}

#app-title .app-main-title {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
    margin-left: -0.75rem;
    cursor: pointer;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: -1rem;
}

.search-container {
    position: relative;
    flex-grow: 1;
}

.search-box {
    background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23666" viewBox="0 0 16 16"%3E%3Cpath d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/%3E%3C/svg%3E') no-repeat 0.5rem center;
}

.header-controls .search-box {
    flex-grow: 1;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    font-size: 1rem;
    padding: 0 0 0 1.8rem;
    background-size: 1rem;
}

#searchInput {
    padding-right: 1.75rem;
}

.clear-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ddd;
    border: none;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 1rem;
    cursor: pointer;
    color: #555;
    padding: 0;
}

/* Badge merah notifikasi/counter navbar */
.nav-badge {
    position: absolute;
    top: 0.3rem;
    left: calc(50% + 0.35rem);
    min-width: 0.9rem;
    height: 0.9rem;
    padding: 0 0.2rem;
    border-radius: 0.5rem;
    background: #e74c3c;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 0.9rem;
    text-align: center;
}

/* ---------- 3. BANNER PROMO / IKLAN ---------- */
.carousel {
    border-radius: 0.5rem;
    margin: 0.5rem 0 1rem;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    aspect-ratio: 2 / 1;
}

.carousel-indicators {
    margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
    width: 1rem;
    height: 0.1rem;
    background-color: #6c757d;
    border-radius: 0.5rem;
}

.carousel-indicators .active {
    background-color: #3498db;
    width: 1rem;
    height: 0.1rem;
    border-radius: 0.5rem;
}

#adCarousel .carousel-item img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
}

/* ---------- 4. BILAH KATEGORI (STICKY) ---------- */
.category-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    padding: 0.5rem 0.75rem;
    margin: 0 0 1.5rem;
    position: sticky;
    top: 5.4rem;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    width: 100vw;
    margin-left: calc(50% - 50vw);
    box-sizing: border-box;
}

.category-sort-btn {
    flex: 0 0 auto;
    align-self: stretch;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    padding: 0;
    background-color: #ebf5fb;
    border: 1px solid #cfe6f7;
    border-radius: 0.5rem;
    color: #3498db;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.category-sort-btn:active {
    background-color: #d6eaf8;
    transform: scale(0.94);
}

.category-sort-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* Titik penanda: urutan bukan default */
.category-sort-btn.is-active::after {
    content: "";
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #e74c3c;
    border: 1.5px solid #fff;
}

.category-buttons {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    white-space: nowrap;
    /* garis pemisah dari tombol sort */
    border-left: 1px solid #e3e7eb;
    /* ruang untuk focus ring chip agar tidak terpotong */
    padding: 3px 1.5rem 3px 0.5rem;
    margin: -3px 0;
    /* tepi kanan memudar = petunjuk bisa digeser */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 1.5rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 1.5rem), transparent);
    /* sembunyikan scrollbar di layar sentuh */
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.category-buttons::-webkit-scrollbar {
    display: none;
}

/* Desktop (mouse): scrollbar tipis & lembut agar tetap bisa digeser */
@media (hover: hover) and (pointer: fine) {
    .category-buttons {
        scrollbar-width: thin;
        scrollbar-color: #c5d3df transparent;
        padding-bottom: 6px;
    }

    .category-buttons::-webkit-scrollbar {
        display: block;
        height: 5px;
    }

    .category-buttons::-webkit-scrollbar-track {
        background: transparent;
    }

    .category-buttons::-webkit-scrollbar-thumb {
        background: #c5d3df;
        border-radius: 3px;
    }

    .category-buttons::-webkit-scrollbar-thumb:hover {
        background: #9fb6c9;
    }
}

.category-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    flex: 0 0 auto;
}

.category-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.category-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* ---------- 5. SISTEM PANEL / HALAMAN MANDIRI ---------- */
.user-panel,
.cart-panel {
    position: static !important;
    width: 100% !important;
    max-width: 48rem !important;
    margin: 0 auto !important;
    height: auto !important;
    min-height: calc(100vh - 5.4rem - env(safe-area-inset-bottom));
    min-height: calc(100dvh - 5.4rem - env(safe-area-inset-bottom));
    transform: none !important;
    transition: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.user-panel {
    background-image: url("https://img.sukahemat.com/ilustrasi/bg-transaksi.avif");
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

/* Saat membuka subhalaman (keranjang, akun, affiliator, transaksi), sembunyikan katalog & header */
body.on-subpage .main-container,
body.on-subpage .header {
    display: none !important;
}

.user-panel:not(.active),
.cart-panel:not(.active) {
    display: none !important;
}

/* ---------- 6. HALAMAN RIWAYAT TRANSAKSI ---------- */
.trx-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.25rem 0 1rem;
}

.trx-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin: 0 -0.25rem 0.75rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #3498db;
}

.trx-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.trx-id {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    word-break: break-all;
}

.trx-date {
    font-size: 0.8rem;
    color: #95a5a6;
    margin-top: 0.1rem;
}

.trx-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    white-space: nowrap;
}

.trx-badge.pickup {
    background: #eafaf1;
    color: #27ae60;
}

.trx-badge.paid {
    background: #eafaf1;
    color: #27ae60;
}

.trx-badge.unpaid {
    background: #fef5e7;
    color: #e67e22;
}

.trx-badge.unknown {
    background: #f1f2f4;
    color: #7f8c8d;
}

.trx-badge.delivery {
    background: #ebf5fb;
    color: #3498db;
}

.trx-items {
    margin: 0.55rem 0 0.4rem;
    padding: 0.45rem 0;
    border-top: 1px dashed #e0e0e0;
    border-bottom: 1px dashed #e0e0e0;
}

.trx-item {
    display: flex;
    gap: 0.4rem;
    font-size: 0.8rem;
    line-height: 1.25;
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.trx-item:last-of-type {
    margin-bottom: 0;
}

.trx-qty {
    flex: 0 0 3ch;
    min-width: 3ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    font-weight: 600;
    color: #7f8c8d;
}

.trx-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.trx-name small {
    color: #95a5a6;
    font-size: 0.8rem;
}

.trx-card:not(.open) .trx-item:nth-child(n+3) {
    display: none;
}

.trx-more {
    font-size: 0.8rem;
    color: #3498db;
    margin-top: 0.25rem;
}

.trx-card.open .trx-more {
    display: none;
}

.trx-meta {
    display: none;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.4rem;
}

.trx-meta i {
    width: 1rem;
}

.trx-card.open .trx-meta {
    display: block;
}

.trx-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.5rem;
}

.trx-total-label {
    font-size: 0.8rem;
    color: #95a5a6;
}

.trx-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #27ae60;
    line-height: 1.2;
}

.trx-actions {
    display: flex;
    gap: 0.35rem;
}

.trx-btn,
.trx-btn-outline {
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.3rem 0.6rem;
    white-space: nowrap;
}

.trx-btn {
    background: #3498db;
    color: #fff;
    border: 1px solid #3498db;
}

.trx-btn-outline {
    background: #fff;
    color: #3498db;
    border: 1px solid #3498db;
}

.trx-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #95a5a6;
}

.trx-empty i {
    font-size: 2.2rem;
    opacity: 0.45;
    display: block;
    margin-bottom: 0.5rem;
}

/* ---------- 7. BOTTOM SHEET CEK MUTASI ---------- */
#mutasi-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1070;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#mutasi-sheet-overlay.active {
    opacity: 1;
}

#mutasi-sheet-panel {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 80vh;
    background: #fff;
    border-radius: 1rem 1rem 0 0;
    z-index: 1071;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
}

#mutasi-sheet-panel.active {
    transform: translateY(0);
}

.mutasi-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    color: #2c3e50;
}

.mutasi-sheet-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
}

.mutasi-sheet-list {
    overflow-y: auto;
    padding: 0.5rem 0.75rem 1rem;
}

.mutasi-item {
    background: #f8f9fa;
    border-left: 3px solid #3498db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.mutasi-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
}

.mutasi-item-body {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.3;
}

.mutasi-item-time {
    font-size: 0.65rem;
    color: #95a5a6;
    margin-top: 0.15rem;
}

.mutasi-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #95a5a6;
    font-size: 0.9rem;
}

.mutasi-empty i {
    display: block;
    font-size: 2rem;
    opacity: 0.45;
    margin-bottom: 0.4rem;
}

/* ---------- 7b. BAYAR TAGIHAN (SALDO TOKO) ---------- */
.trx-pay-btn {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

#bayar-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1070;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#bayar-sheet-overlay.active {
    opacity: 1;
}

#bayar-sheet-panel {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 85vh;
    background: #fff;
    border-radius: 1rem 1rem 0 0;
    z-index: 1071;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
}

#bayar-sheet-panel.active {
    transform: translateY(0);
}

.bayar-body {
    overflow-y: auto;
    padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom));
}

.bayar-hint {
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.bayar-scan-box {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #000;
}

.bayar-scan-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bayar-scan-frame {
    position: absolute;
    inset: 18%;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 0.75rem;
    pointer-events: none;
}

.bayar-msg {
    min-height: 1.4rem;
    margin-top: 0.6rem;
    text-align: center;
    font-size: 0.8rem;
    color: #e74c3c;
}

.bayar-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e3e6ea;
    border-left: 3px solid #3498db;
    border-radius: 0.5rem;
    padding: 0.7rem 0.75rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

.bayar-order:active {
    background: #eef5fb;
}

.bayar-order-id {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
}

.bayar-order-total {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c3e50;
    white-space: nowrap;
}

.bayar-result {
    text-align: center;
    padding: 1.5rem 0.5rem 0.5rem;
}

.bayar-result i {
    font-size: 3rem;
    margin-bottom: 0.6rem;
}

.bayar-result.ok i {
    color: #27ae60;
}

.bayar-result.fail i {
    color: #e74c3c;
}

.bayar-result p {
    font-size: 0.95rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.bayar-result button {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.55rem 1.5rem;
    font-weight: 700;
}

/* ---------- 8. PENGUMUMAN BERJALAN (MARQUEE) ---------- */
.announcement-bar {
    position: fixed;
    bottom: 0;
    height: calc(1.6rem + env(safe-area-inset-bottom));
    left: 0;
    width: 100%;
    z-index: 1055;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background: linear-gradient(to right, #3498db, #2c3e50);
    border-top: 1px dashed white;
    color: #d9e2ff;
}

.announcement-text {
    white-space: nowrap;
    display: inline-block;
    padding: 0 3rem 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    animation: marquee linear infinite;
    will-change: transform;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

@keyframes marquee {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* ---------- 9. DIALOG (SweetAlert2) ----------
   Penamaan: dlg-<elemen>, varian dlg-<elemen>--<varian>, bagian dlg-<blok>__<elemen>, state .is-<state>.
   Kelas dasar dipasang otomatis oleh DIALOG_CLASSES di showSwalWithBackHandler() (script.js). */
:root {
    --dlg-z-index: 2200;
    --dlg-radius: 1rem;
    --dlg-radius-sm: 0.5rem;
    --dlg-color-text: #2c3e50;
    --dlg-color-muted: #666;
    --dlg-color-border: #dee2e6;
    --dlg-color-primary: #3498db;
    --dlg-color-primary-dark: #2980b9;
    --dlg-color-primary-soft: #ebf5fb;
    --dlg-color-success: #2ecc71;
    --dlg-color-danger: #e74c3c;
    --dlg-color-neutral: #95a5a6;
}

/* Kerangka */
.dlg-container { z-index: var(--dlg-z-index); }

.dlg-popup {
    width: min(92vw, 26rem);
    padding: 1.25rem 1rem 1rem;
    border-radius: var(--dlg-radius);
    color: var(--dlg-color-text);
    font-size: 0.85rem;
}

.dlg-title {
    margin: 0;
    padding: 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: inherit;
}

.dlg-body {
    margin: 0.75rem 0 0;
    padding: 0 0.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    color: inherit;
}

.dlg-compact { font-size: 0.8rem; line-height: 1.3; text-align: left; }
.dlg-section { margin-bottom: 1rem; }

/* Teks */
.dlg-text { margin: 0 0 0.75rem; }
.dlg-text--center { text-align: center; }
.dlg-text--muted { color: var(--dlg-color-muted); font-size: 0.9rem; }
.dlg-text--sm { font-size: 0.9rem; }

/* Form */
.dlg-input {
    width: 100%;
    height: 3rem;
    margin: 0 0 1rem;
    box-sizing: border-box;
    border: 2px solid var(--dlg-color-primary);
    border-radius: var(--dlg-radius-sm);
    font-size: 1rem;
    text-align: center;
}
.dlg-input:focus {
    border-color: var(--dlg-color-primary-dark);
    background-color: #f7faff;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
    outline: none;
}
.dlg-input.is-valid { border-color: var(--dlg-color-success); }

.dlg-validation {
    margin: 0.75rem 0 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* Tombol */
.dlg-actions { gap: 0.5rem; margin: 1rem 0 0; }

.dlg-btn {
    min-width: 6rem;
    min-height: 2.5rem;
    margin: 0;
    padding: 0.4rem 1.5rem;
    border: 0;
    border-radius: var(--dlg-radius-sm);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}
.dlg-btn:active { transform: scale(0.97); }
.dlg-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.dlg-btn--confirm { background-color: var(--dlg-color-primary); }
.dlg-btn--cancel { background-color: var(--dlg-color-neutral); }
.dlg-btn--deny { background-color: var(--dlg-color-danger); }

/* Callout (kotak info) */
.dlg-callout {
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-radius: var(--dlg-radius-sm);
    font-size: 0.8rem;
}
.dlg-callout--warning { background: #fff3cd; border-color: #ffc107; color: #856404; }
.dlg-callout--success { background: #d1f2eb; border-color: var(--dlg-color-success); color: #1a6648; }

/* Langkah bernomor (panduan izin lokasi) */
.dlg-steps { display: flex; flex-direction: column; gap: 0.5rem; margin: 0 0 0.75rem; }
.dlg-steps + .dlg-callout { margin-top: 1rem; }
.dlg-step { display: flex; align-items: center; gap: 0.5rem; }
.dlg-step__num {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background: var(--dlg-color-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}
.dlg-step__desc { color: var(--dlg-color-muted); font-size: 0.8rem; }

/* Dialog Pilihan Sortir */
.dlg-sort-list { display: flex; flex-direction: column; gap: 0.4rem; text-align: left; }
.dlg-sort-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--dlg-color-border);
    border-radius: var(--dlg-radius-sm);
    background: #fff;
    color: var(--dlg-color-text);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.dlg-sort-item.is-active {
    border-color: var(--dlg-color-primary);
    background: var(--dlg-color-primary-soft);
}
.dlg-sort-item__check { color: var(--dlg-color-primary); }

/* Dialog Konfirmasi Checkout */
.dlg-schedule {
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    margin-top: -0.75rem;
    font-size: 0.8rem;
    text-align: left;
}
.dlg-schedule__icon { flex-shrink: 0; margin-top: 0.1rem; }

/* Dialog Atur Lokasi */
.dlg-geo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 0;
    border-radius: var(--dlg-radius-sm);
    background: var(--dlg-color-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}
.dlg-geo-btn:active { transform: scale(0.98); }
.dlg-geo-btn:disabled { opacity: 0.7; cursor: progress; }

.dlg-divider-text {
    margin: 0 0 0.75rem;
    color: var(--dlg-color-muted);
    font-size: 0.8rem;
    text-align: center;
}

.dlg-status {
    min-height: 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    text-align: center;
}
.dlg-status--info { color: #0b7a8f; }
.dlg-status--success { color: #1e8449; }
.dlg-status--error { color: #c0392b; }

/* ---------- 10. MODAL INSTALL PWA ----------
   Penamaan: pwa-modal, pwa-modal__<elemen>, pwa-modal__<elemen>--<varian>, state .is-open. */
.pwa-modal {
    position: fixed;
    inset: 0;
    height: 100dvh;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
}
.pwa-modal.is-open { display: flex; animation: pwaModalFade 0.3s ease forwards; }

.pwa-modal__card {
    width: 90%;
    max-width: 380px;
    padding: 32px 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    text-align: center;
    animation: pwaModalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pwa-modal__icon { margin-bottom: 16px; font-size: 56px; line-height: 1; }
.pwa-modal__title { margin: 0 0 12px; color: #fff; font-size: 22px; font-weight: 700; letter-spacing: 0.5px; }
.pwa-modal__subtitle { margin: 0 0 28px; color: rgba(255, 255, 255, 0.7); font-size: 14px; line-height: 1.6; }
.pwa-modal__subtitle strong { color: #fff; }
.pwa-modal__actions { display: flex; flex-direction: column; gap: 10px; }

.pwa-modal__btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}
.pwa-modal__btn:active { transform: scale(0.97); opacity: 0.9; }
.pwa-modal__btn--primary { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.pwa-modal__btn--secondary {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.pwa-modal__steps { margin-bottom: 24px; text-align: left; }
.pwa-modal__step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}
.pwa-modal__step:last-child { border-bottom: none; }
.pwa-modal__step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

@keyframes pwaModalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pwaModalPop {
    from { opacity: 0; transform: scale(0.6) translateY(40px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-modal.is-open,
    .pwa-modal__card { animation: none; }
}

/* ---------- Utility Classes dari HTML/JS ---------- */
.ad-placeholder {
    height: 8rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}
.ad-empty-placeholder {
    height: 300px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}
.cursor-pointer {
    cursor: pointer;
}
.hr-ongkir-divider {
    margin: 0.5rem 0;
}
.body-locked {
    overflow: hidden !important;
}