/*
 * 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. */
/* Kartu "Produk terlaris" berukuran sama persis dengan kartu katalog (6/4/3 kolom mengikuti
   lebar layar); jika jumlahnya kurang dari satu baris, kartu rata kiri sejajar judul, tidak diregangkan. */
@media (min-width: 1200px) {
    .front-product-section .product-grid { grid-template-columns: repeat(auto-fit, calc((100% - 5 * 12px) / 6)); gap: 12px; justify-content: start; }
}
@media (min-width: 961px) and (max-width: 1199px) {
    .front-product-section .product-grid { grid-template-columns: repeat(auto-fit, calc((100% - 3 * 19px) / 4)); gap: 19px; justify-content: start; }
}
@media (min-width: 701px) and (max-width: 960px) {
    .front-product-section .product-grid { grid-template-columns: repeat(auto-fit, calc((100% - 2 * 15px) / 3)); gap: 15px; justify-content: start; }
}

/* 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;
    }

    /* 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); }

/* Tepi kiri "Produk terlaris" sejajar dengan grid katalog di bawahnya (desktop/tablet). */
@media (min-width: 701px) {
    .front-product-section { width: min(1500px, calc(100% - 50px)); }
}

/* Thumbnail produk digital memenuhi kartu (tanpa margin di sekeliling gambar). */
.digital-product-image{padding:0!important}
.digital-product-image img{width:100%!important;height:100%!important;max-width:none!important;padding:0!important;object-fit:cover!important;object-position:center}
/* Gambar lebar (logo) tidak dipotong: tampil utuh di tengah dengan latar putih. */
.digital-product-image.is-wide{background:#fff!important}
.digital-product-image.is-wide img{object-fit:contain!important;padding:12px!important}

/* ===== Katalog digital: halaman depan bervariasi (18 Nov 2026) ===== */
.dl-section-title{display:grid;gap:.2rem;margin:0;font-size:clamp(1.15rem,2.2vw,1.5rem);line-height:1.2}
.dl-section-title .store-eyebrow{font-size:.7rem}
.dl-all-title{margin:2.25rem 0 1rem}
.dl-chips{display:flex;gap:.5rem;margin:1rem 0 1.5rem;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.dl-chips::-webkit-scrollbar{display:none}
.dl-chip{flex:none;display:inline-flex;align-items:center;gap:.45rem;padding:.5rem .95rem;border:1px solid var(--store-glass-border,#dbe4f0);border-radius:999px;background:var(--store-glass-raised,#fff);color:inherit;font-size:.86rem;font-weight:600;text-decoration:none;transition:border-color .15s,color .15s}
.dl-chip span{padding:.05rem .45rem;border-radius:999px;background:rgb(37 99 235 / 10%);color:#1d4ed8;font-size:.72rem}
.dl-chip:hover{border-color:#93b4f5;color:#1d4ed8}
.dl-chip.is-active{border-color:#2563eb;background:#2563eb;color:#fff}

.dl-spotlight{margin-bottom:2rem}
.dl-spotlight .dl-section-title{margin-bottom:1rem}
.dl-spotlight-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:1rem}
.dl-spotlight-grid.is-single{grid-template-columns:1fr}
.dl-hero-card{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);overflow:hidden;border:1px solid var(--store-glass-border,#dbe4f0);border-radius:1.25rem;background:var(--store-glass-raised,#fff);color:inherit;text-decoration:none;box-shadow:0 10px 30px rgb(30 64 120 / 8%);transition:transform .2s,box-shadow .2s}
.dl-hero-card:hover{transform:translateY(-2px);box-shadow:0 16px 40px rgb(30 64 120 / 13%)}
.dl-hero-media{display:block;aspect-ratio:3/4;background:#f1f5fb}
.dl-hero-media img{width:100%;height:100%;object-fit:cover;display:block}
.dl-hero-body{display:flex;flex-direction:column;gap:.6rem;padding:clamp(1rem,2.5vw,1.75rem)}
.dl-hero-name{font-size:clamp(1.15rem,2vw,1.55rem);line-height:1.25}
.dl-seller{color:#64748b;font-size:.85rem}
.dl-access{display:flex;flex-wrap:wrap;gap:.4rem;margin:.25rem 0}
.dl-access span{display:inline-flex;align-items:center;gap:.3rem;padding:.3rem .6rem;border-radius:.5rem;background:rgb(37 99 235 / 7%);color:#334155;font-size:.76rem;font-weight:600}
.dl-hero-price{display:flex;align-items:baseline;gap:.6rem;margin-top:auto}
.dl-hero-price strong{color:#1d4ed8;font-size:clamp(1.35rem,2.4vw,1.75rem)}
.dl-hero-price del,.dl-side-price del{color:#94a3b8;font-size:.85rem}
.dl-hero-cta{align-self:flex-start}
.dl-side-list{display:grid;gap:1rem;grid-auto-rows:1fr}
.dl-side-card{position:relative;display:grid;grid-template-columns:38% minmax(0,1fr);overflow:hidden;border:1px solid var(--store-glass-border,#dbe4f0);border-radius:1rem;background:var(--store-glass-raised,#fff);color:inherit;text-decoration:none;transition:border-color .15s}
.dl-side-card:hover{border-color:#93b4f5}
.dl-side-media{display:block;min-height:100%;background:#f1f5fb}
.dl-side-media img{width:100%;height:100%;object-fit:cover;display:block}
.dl-side-body{display:flex;flex-direction:column;gap:.35rem;padding:.9rem 2.2rem .9rem .9rem}
.dl-side-body strong{font-size:.95rem;line-height:1.3;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.dl-side-price{margin-top:auto;color:#1d4ed8;font-weight:800;display:flex;gap:.4rem;align-items:baseline}
.dl-side-arrow{position:absolute;top:.8rem;right:.8rem;color:#64748b}
.dl-placeholder{display:grid;place-items:center;height:100%;min-height:120px;font-size:2.5rem;color:#94a3b8}

.dl-voucher-strip{margin-bottom:2rem;padding:1.1rem 1.25rem;border:1px solid rgb(225 29 72 / 18%);border-radius:1.1rem;background:linear-gradient(120deg,rgb(255 241 242 / 90%),rgb(255 255 255 / 95%) 60%)}
.dl-voucher-head{display:flex;align-items:center;gap:.9rem}
.dl-voucher-head>div{flex:1;min-width:0}
.dl-voucher-head h2{margin:0;font-size:1.1rem}
.dl-voucher-head p{margin:.15rem 0 0;color:#64748b;font-size:.84rem}
.dl-voucher-icon{display:grid;flex:none;place-items:center;width:44px;height:44px;border-radius:.8rem;background:#e11d48;color:#fff;font-size:1.35rem}
.dl-voucher-pills{display:flex;gap:.55rem;margin-top:.9rem;overflow-x:auto;scrollbar-width:none}
.dl-voucher-pills::-webkit-scrollbar{display:none}
.dl-voucher-pill{flex:none;display:grid;gap:.1rem;min-width:110px;padding:.6rem .85rem;border:1px solid rgb(225 29 72 / 20%);border-radius:.8rem;background:#fff;color:inherit;text-decoration:none}
.dl-voucher-pill span{color:#475569;font-size:.78rem;font-weight:600}
.dl-voucher-pill strong{color:#be123c;font-size:.98rem}
.dl-voucher-pill:hover{border-color:#e11d48}

.dl-category-section{margin-bottom:2rem}
.dl-row-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.dl-row-head>a{display:inline-flex;align-items:center;gap:.3rem;color:#1d4ed8;font-size:.86rem;font-weight:700;text-decoration:none;white-space:nowrap}
.dl-row-scroll{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 3 * 1rem) / 4);gap:1rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:thin;padding-bottom:.4rem}
.dl-row-scroll>.digital-product-card{scroll-snap-align:start}

html[data-theme="dark"] .dl-voucher-strip{background:linear-gradient(120deg,rgb(76 5 25 / 55%),rgb(31 41 56 / 92%) 60%);border-color:rgb(251 113 133 / 25%)}
html[data-theme="dark"] .dl-voucher-pill{background:rgb(36 47 64 / 97%);border-color:rgb(251 113 133 / 25%)}
html[data-theme="dark"] .dl-voucher-pill span,html[data-theme="dark"] .dl-access span{color:#cbd5e1}
html[data-theme="dark"] .dl-voucher-pill strong{color:#fda4af}
html[data-theme="dark"] .dl-hero-price strong,html[data-theme="dark"] .dl-side-price,html[data-theme="dark"] .dl-row-head>a{color:#93c5fd}
html[data-theme="dark"] .dl-hero-media,html[data-theme="dark"] .dl-side-media{background:#1e2735}

@media(max-width:1100px){.dl-row-scroll{grid-auto-columns:calc((100% - 2 * 1rem) / 3)}}
@media(max-width:860px){
  .dl-spotlight-grid{grid-template-columns:1fr}
  .dl-side-list{grid-template-columns:1fr 1fr;grid-auto-rows:auto}
  .dl-side-card{grid-template-columns:1fr}
  .dl-side-media{aspect-ratio:4/3}
  .dl-row-scroll{grid-auto-columns:calc((100% - 1rem) / 2.2)}
}
@media(max-width:560px){
  .dl-hero-card{grid-template-columns:1fr}
  .dl-hero-media{aspect-ratio:4/3}
  .dl-voucher-head{flex-wrap:wrap}
  .dl-voucher-head .store-button-outline{width:100%;justify-content:center}
  .dl-row-scroll{grid-auto-columns:72%;gap:.75rem}
}
