/*
 * Skala tipografi & ikon storefront Digitize Store (font Plus Jakarta Sans, ikon Phosphor).
 * Dimuat PALING AKHIR sehingga menjadi satu-satunya acuan ukuran huruf untuk judul dan teks.
 * Halaman voucher Tivan (iframe hotspot) sengaja tidak diatur di sini.
 *
 * Peran          HP -> desktop   Pemakaian
 * display        34 -> 56px      judul hero beranda & produk digital
 * h1             26 -> 34px      judul produk, judul halaman, akun, penjual
 * h2             22 -> 28px      judul bagian
 * h3             19px            judul panel/ringkasan
 * card-title     13 -> 14px      nama produk di kartu
 * body           15 -> 16px      paragraf
 * small          13px            keterangan
 * eyebrow        11px            label kecil di atas judul
 */
:root {
    /* Plus Jakarta Sans (Tokotype, OFL) untuk judul dan teks: modern, hangat, angka rapi. */
    --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

    --fs-display: clamp(34px, 2.6vw + 22px, 56px);
    --fs-h1: clamp(26px, 1vw + 21px, 34px);
    --fs-h2: clamp(22px, 0.6vw + 19px, 28px);
    --fs-h3: 19px;
    --fs-card-title: clamp(13px, 0.15vw + 12.5px, 14px);
    --fs-price-card: 16px;
    --fs-price-detail: clamp(24px, 0.8vw + 20px, 30px);
    --fs-lead: clamp(15px, 0.3vw + 14px, 17px);
    --fs-body: clamp(15px, 0.15vw + 14.5px, 16px);
    --fs-small: 13px;
    --fs-eyebrow: 11px;

    --lh-tight: 1.1;
    --lh-heading: 1.2;
    --lh-body: 1.6;
}

body:not(.tivan-voucher-embed-page) {
    font-family: var(--font-body);
}

/* Display */
body:not(.tivan-voucher-embed-page) .hero-copy h1,
body:not(.tivan-voucher-embed-page) .digital-store-hero h1 {
    font-family: var(--font-heading);
    font-size: var(--fs-display);
    font-weight: 800;
    line-height: var(--lh-tight);
    letter-spacing: -0.035em;
}

/* H1: judul halaman & produk */
body:not(.tivan-voucher-embed-page) .detail-info h1,
body:not(.tivan-voucher-embed-page) .digital-detail-info h1,
body:not(.tivan-voucher-embed-page) .store-page-heading h1,
body:not(.tivan-voucher-embed-page) .customer-welcome h1,
body:not(.tivan-voucher-embed-page) .store-account-card h1,
body:not(.tivan-voucher-embed-page) .digital-seller-hero h1,
body:not(.tivan-voucher-embed-page) .physical-catalog-section .digital-catalog-heading h1 {
    font-family: var(--font-heading);
    font-size: var(--fs-h1);
    font-weight: 750;
    line-height: var(--lh-heading);
    letter-spacing: -0.025em;
}

/* H2: judul bagian */
body:not(.tivan-voucher-embed-page) .section-heading h2,
body:not(.tivan-voucher-embed-page) .spec-section h2,
body:not(.tivan-voucher-embed-page) .digital-catalog-heading h2,
body:not(.tivan-voucher-embed-page) .customer-section-heading h2,
body:not(.tivan-voucher-embed-page) .closing-banner h2 {
    font-family: var(--font-heading);
    font-size: var(--fs-h2);
    font-weight: 700;
    line-height: var(--lh-heading);
    letter-spacing: -0.02em;
}

/* H3: judul panel */
body:not(.tivan-voucher-embed-page) .store-panel-heading h2,
body:not(.tivan-voucher-embed-page) .store-summary-panel h2,
body:not(.tivan-voucher-embed-page) .digital-checkout-summary h2,
body:not(.tivan-voucher-embed-page) .empty-state h3,
body:not(.tivan-voucher-embed-page) .digital-catalog-empty h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-h3);
    font-weight: 700;
    line-height: 1.3;
}

/* Kartu produk (fisik & digital) */
body:not(.tivan-voucher-embed-page) .product-name,
body:not(.tivan-voucher-embed-page) .digital-product-name,
body:not(.tivan-voucher-embed-page) .digital-catalog-page .digital-product-name {
    min-height: calc(2em * 1.35);
    font-size: var(--fs-card-title);
    font-weight: 600;
    line-height: 1.35;
}
body:not(.tivan-voucher-embed-page) .product-price,
body:not(.tivan-voucher-embed-page) .digital-product-price,
body:not(.tivan-voucher-embed-page) .digital-product-price-current {
    font-family: var(--font-heading);
    font-size: var(--fs-price-card);
    font-weight: 750;
}
body:not(.tivan-voucher-embed-page) .product-category {
    font-size: 11px;
    letter-spacing: 0.04em;
}

/* Harga & ringkasan di halaman detail */
body:not(.tivan-voucher-embed-page) .detail-price,
body:not(.tivan-voucher-embed-page) .digital-purchase-price strong {
    font-family: var(--font-heading);
    font-size: var(--fs-price-detail);
    font-weight: 750;
    line-height: 1.15;
}
body:not(.tivan-voucher-embed-page) .detail-summary {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
}

/* Teks pengantar & keterangan */
body:not(.tivan-voucher-embed-page) .hero-copy p,
body:not(.tivan-voucher-embed-page) .digital-store-hero p {
    font-size: var(--fs-lead);
    line-height: var(--lh-body);
}
body:not(.tivan-voucher-embed-page) .section-heading p,
body:not(.tivan-voucher-embed-page) .digital-seller-hero p,
body:not(.tivan-voucher-embed-page) .store-account-card > p {
    max-width: 46ch;
    font-size: var(--fs-small);
    line-height: 1.55;
}
body:not(.tivan-voucher-embed-page) .eyebrow {
    font-size: var(--fs-eyebrow);
    letter-spacing: 0.1em;
}
body:not(.tivan-voucher-embed-page) .detail-highlights small,
body:not(.tivan-voucher-embed-page) .spec-grid span,
body:not(.tivan-voucher-embed-page) .breadcrumbs {
    font-size: var(--fs-small);
}
body:not(.tivan-voucher-embed-page) .spec-grid strong {
    font-size: 14px;
}

/* Tombol pesan & status stok di halaman produk */
.detail-order {
    display: grid;
    gap: 12px;
    margin: 22px 0 6px;
}
.detail-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: var(--fs-small);
    font-weight: 650;
}
.detail-stock::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}
.detail-stock--available { background: rgb(22 163 74 / 10%); color: #15803d; }
.detail-stock--low { background: rgb(234 179 8 / 14%); color: #a16207; }
.detail-stock--empty { background: rgb(100 116 139 / 12%); color: #475569; }
.detail-order-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.button-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font: 700 15px var(--font-body);
    text-decoration: none;
    box-shadow: 0 10px 24px rgb(22 163 74 / 22%);
    transition: background 0.15s ease, transform 0.15s ease;
}
.button-whatsapp:hover { background: #15803d; transform: translateY(-1px); }
.button-whatsapp:focus-visible { outline: 3px solid rgb(22 163 74 / 40%); outline-offset: 2px; }
.button-whatsapp svg { width: 20px; height: 20px; fill: currentColor; }
.detail-order .button-secondary {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--store-glass-border, #d8e0ec);
    border-radius: 999px;
    color: var(--ink, #14203b);
    font: 650 14px var(--font-body);
    text-decoration: none;
}
.detail-order-note {
    margin: 0;
    color: var(--muted, #6f7889);
    font-size: var(--fs-small);
    line-height: 1.5;
}
[data-theme="dark"] .detail-stock--available { color: #4ade80; }
[data-theme="dark"] .detail-stock--low { color: #facc15; }
[data-theme="dark"] .detail-stock--empty { color: #cbd5e1; }

@media (max-width: 600px) {
    .detail-order-buttons > a { flex: 1 1 100%; }
}

/* Harga memakai angka sama lebar agar sejajar di kartu dan tabel. */
body:not(.tivan-voucher-embed-page) .product-price,
body:not(.tivan-voucher-embed-page) .detail-price,
body:not(.tivan-voucher-embed-page) .digital-product-price,
body:not(.tivan-voucher-embed-page) .digital-purchase-price strong { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ---------- Ikon Phosphor (<x-icon>) ---------- */
svg.ds-icon {
    display: inline-block;
    flex: none;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.2em;
    fill: currentColor !important;
    stroke: none !important;
    overflow: visible;
}
svg.ds-icon * { stroke: none !important; }
.ds-icon--duotone { color: var(--accent, #2563eb); }
.button-primary svg.ds-icon, .store-button-primary svg.ds-icon, .button-whatsapp svg.ds-icon { color: inherit; }
a > svg.ds-icon:last-child, button > svg.ds-icon:last-child { margin-left: 2px; }
a > svg.ds-icon:first-child { margin-right: 2px; }
.ds-icon-sep { width: 0.9em; height: 0.9em; opacity: 0.5; vertical-align: -0.12em; }
.ds-icon-verified { width: 1.1em; height: 1.1em; vertical-align: -0.18em; color: var(--accent, #2563eb); }

/* Header: ukuran ikon seragam 20px */
.shop-header svg.ds-icon, .header-search svg.ds-icon { width: 20px; height: 20px; }
.shop-avatar-button svg.ds-icon { width: 22px; height: 22px; }

/* Placeholder produk tanpa foto: ikon paket duotone besar & lembut */
.product-placeholder svg.ds-icon { width: 46px; height: 46px; color: #9fb0c8; }
.detail-placeholder .product-placeholder svg.ds-icon { width: 72px; height: 72px; }

/* Ikon dalam lingkaran (keunggulan, catatan, pustaka) */
.detail-highlights span svg.ds-icon,
.detail-image-note span svg.ds-icon { width: 20px; height: 20px; }
.digital-checkout-product-mark svg.ds-icon,
.digital-account-icon svg.ds-icon,
.digital-version-icon svg.ds-icon,
.customer-empty-icon svg.ds-icon { width: 55%; height: 55%; }
.hero-points b svg.ds-icon { width: 17px; height: 17px; vertical-align: -0.25em; }
.art-spark svg.ds-icon { width: 1em; height: 1em; }

/* ======================================================================
   Tata letak: konsistensi jarak, simetri, dan efisiensi ruang (18 Nov 2026)
   ====================================================================== */
:root { --page-gutter: 16px; --btn-h: 44px; --btn-h-sm: 36px; }

/* Hero: beri jarak antara judul dan panel ilustrasi agar tidak menempel. */
.hero-copy { padding-right: clamp(20px, 3.5vw, 48px); }
.hero-copy h1 { text-wrap: balance; }
.hero-points b { display: inline-flex; vertical-align: middle; }
.hero-points b svg.ds-icon { width: 16px; height: 16px; color: #16a34a; }

/* Chip kategori: geser halus tanpa scrollbar, tepi kanan memudar (bukan terpotong kasar). */
.category-chips {
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
    padding-right: 40px;
    scroll-padding-inline: 8px;
}
.category-chips::-webkit-scrollbar { display: none; }
.catalog-tools .sort-form { flex: none; }

/* "Produk terlaris": kartu mengisi baris penuh walau jumlahnya tidak kelipatan 4. */
@media (min-width: 900px) {
    .front-product-section .product-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

/* Tombol: tinggi seragam (utama 44px, kecil 36px) dan isi rata tengah. */
.button-primary, .button-secondary, .button-whatsapp, .store-button-primary, .store-button-outline, .store-button-disabled {
    min-height: var(--btn-h);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.store-button-small { min-height: var(--btn-h-sm); }
.header-search button { min-height: 32px; padding-inline: 14px; }

@media (max-width: 700px) {
    /* Jarak tepi halaman sama di semua halaman: 16px. */
    .hero-wrap { padding: 12px var(--page-gutter) 0; }
    .front-product-section, .closing-banner, .digital-catalog-section, .store-page-wrap {
        width: calc(100% - (2 * var(--page-gutter)));
        margin-inline: auto;
    }
    .catalog-section > * { padding-inline: var(--page-gutter); }

    /* Hero ringkas: ilustrasi dekoratif disembunyikan agar produk terlihat di layar pertama. */
    .hero-art { display: none; }
    .hero-copy { padding: 28px 20px 26px; }

    /* Target sentuh nyaman untuk jari (min 40px). */
    .shop-nav a { min-height: 40px; display: inline-flex; align-items: center; }
    .header-search { min-height: 44px; }
    .header-search button { min-height: 36px; }
    .product-card .product-name { padding-block: 2px; }
}
@media (max-width: 700px) {
    .category-chips .chip { min-height: 38px; display: inline-flex; align-items: center; }
    .product-card-foot a[aria-label] { min-width: 38px; min-height: 38px; display: inline-grid; place-items: center; }
}

/* Ritme jarak antarbagian yang seragam: 48px desktop, 32px HP. */
:root { --section-gap: 48px; }
@media (max-width: 700px) { :root { --section-gap: 32px; } }
.front-product-section, .front-banner-section { margin-top: var(--section-gap); }
.catalog-section { padding-top: var(--section-gap); padding-bottom: var(--section-gap); }
.closing-banner { margin-bottom: var(--section-gap); }
