/* ════════════════════════════════════════════════════════════════════════════
   home-market.css — Beranda gaya marketplace
   ────────────────────────────────────────────────────────────────────────────
   • Semua warna dari token yang sudah ada (--brand, --surface, --text, …),
     jadi otomatis ikut tema gelap/terang dan warna logo.
   • Grid produk TIDAK didefinisikan di sini: memakai .products-grid di
     home.css (5 / 4 / 3 / 2 per baris) dan kartu dari globals.css apa adanya.
   • Tanpa gradien, efek kaca, atau glow. Animasi hanya geser banner,
     hitung mundur, dan skeleton.
   ════════════════════════════════════════════════════════════════════════════ */

/* Atribut hidden harus selalu menang atas display:flex/grid di file ini
   (mis. tombol Muat lebih banyak, tab top up yang dimatikan). */
[hidden] {
    display: none !important;
}


.mk-main {
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: 48px;
}

.mk-section {
    margin-top: 36px;
}

.mk-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mk-title {
    font-family: var(--font-display);
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.25;
}

.mk-sub {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-right: auto;
    margin-left: 4px;
}

.mk-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-text);
    white-space: nowrap;
}

.mk-link svg {
    width: 16px;
    height: 16px;
}

/* Grid produk: margin bawah bawaan home.css terlalu besar untuk beranda */
.mk-grid.products-grid {
    margin-bottom: 0;
}

/* Baris yang digeser ke samping (kategori, tab, Flash Sale) */
.mk-hscroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.mk-hscroll::-webkit-scrollbar {
    display: none;
}

/* ══ BANNER ══════════════════════════════════════════════════════════════ */
.mk-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.mk-hero.has-side {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.mk-banner {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--surface-2);
    aspect-ratio: 1600 / 625;
    isolation: isolate;
}

.mk-banner.is-loading {
    background: var(--skeleton);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

.mk-banner-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.mk-banner-track {
    display: flex;
    height: 100%;
    transition: transform 0.45s var(--ease-out);
    will-change: transform;
}

.mk-slide {
    flex: 0 0 100%;
    height: 100%;
}

.mk-banner-link {
    display: block;
    width: 100%;
    height: 100%;
}

.mk-slide-pic,
.mk-side-pic,
.mk-topup-pic {
    display: block;
    width: 100%;
    height: 100%;
}

.mk-slide-pic img,
.mk-side-pic img,
.mk-topup-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.mk-banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .92);
    color: #111827;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--duration-base);
}

.mk-banner-nav svg {
    width: 18px;
    height: 18px;
}

.mk-banner-prev { left: 12px; }
.mk-banner-next { right: 12px; }

.mk-banner:hover .mk-banner-nav,
.mk-banner-nav:focus-visible {
    opacity: 1;
}

.mk-banner.is-single .mk-banner-nav,
.mk-banner.is-loading .mk-banner-nav {
    display: none;
}

.mk-banner-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.mk-dot {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-full);
    border: 0;
    padding: 0;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    transition: width var(--duration-base) var(--ease), background var(--duration-base);
}

.mk-dot.active {
    width: 20px;
    background: #fff;
}

.mk-banner-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    min-height: 0;
}

.mk-banner-side.is-one {
    grid-template-rows: 1fr;
}

.mk-side-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-2);
    min-height: 0;
}

.mk-side-skel {
    background: var(--skeleton);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

/* Banner kecil bawaan (slot belum diisi admin) — warna logo, satu pesan */
.mk-side-fallback {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 100%;
    height: 100%;
    padding: 14px 52px 14px 20px;
    background: var(--brand);
    color: #fff;
}

.mk-side-fallback.is-dark {
    background: #0e1a3a;
}

.mk-sf-title {
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.mk-sf-sub {
    font-size: 0.78rem;
    opacity: .85;
    line-height: 1.35;
}

.mk-sf-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    transition: transform var(--duration-base) var(--ease-out);
}

.mk-side-fallback:hover .mk-sf-arrow {
    transform: translate(3px, -50%);
}

/* Banner bawaan dari CSS (belum ada banner diunggah) */
.mk-banner-fallback {
    width: 100%;
    height: 100%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6%;
    padding: 0 8%;
}

.mk-fb-mark {
    width: clamp(56px, 12%, 140px);
    flex-shrink: 0;
    color: #fff;
}

.mk-fb-mark .brand-mark {
    width: 100%;
    height: auto;
}

.mk-fb-name {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.6vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.mk-fb-tag {
    margin-top: 8px;
    font-size: clamp(0.82rem, 1.5vw, 1.1rem);
    opacity: .9;
    max-width: 36ch;
}

.mk-fb-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    background: #fff;
    color: var(--brand);
    font-weight: 700;
    font-size: 0.86rem;
}

/* ══ KATEGORI — satu baris: label di kiri, ikon sebaris (wireframe) ════ */
.mk-cats-section {
    margin-top: 16px;
}

.mk-cats-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.mk-cats-label {
    flex-shrink: 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    padding-right: 14px;
    border-right: 1px solid var(--border);
}

.mk-cats-row .mk-cats {
    flex: 1;
    min-width: 0;
}

.mk-cats {
    gap: 6px;
    padding-bottom: 2px;
}

.mk-cat {
    flex: 0 0 auto;
    width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text);
    scroll-snap-align: start;
    transition: background var(--duration-fast);
}

.mk-cat:hover {
    background: var(--surface-2);
}

.mk-cat-ic {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand-soft);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mk-cat-ic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Emoji kategori (dipilih di admin → Beranda & Banner → Ikon Kategori) */
.mk-cat-emoji {
    font-size: 1.75rem;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.mk-cat-letter {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand-text);
}

.mk-cat-name {
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mk-cat-skel {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    margin: 10px 18px 26px;
    border-radius: 50%;
    background: var(--skeleton);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

/* ══ TOP UP CEPAT: banner (kiri) + panel 4 tab (kanan) ═════════════════ */
.mk-quick {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
    gap: 16px;
    margin-top: 16px;
    align-items: stretch;
}

.mk-quick.no-banner {
    grid-template-columns: minmax(0, 1fr);
}

.mk-topup-col {
    min-width: 0;
}

.mk-topup-banner {
    position: relative;
    display: block;
    height: 100%;
    min-height: 300px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--surface-2);
}

/* Banner kolom kiri: gambar mengisi tinggi panel di sebelahnya */
.mk-topup-banner .mk-topup-pic,
.mk-topup-banner .mk-topup-pic img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.mk-topup-banner .mk-topup-pic img {
    object-fit: cover;
    object-position: center;
}

/* Banner bawaan (belum ada gambar diunggah): warna logo, tersusun vertikal */
.mk-topup-fallback {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 18px;
    padding: 28px;
    background: #0e1a3a;
    color: #fff;
}

.mk-tf-mark {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 96px;
    color: #1d2c57;
}

.mk-tf-mark .brand-mark {
    width: 100%;
    height: auto;
}

.mk-tf-text {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.mk-tf-text strong {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.mk-tf-text span {
    font-size: 0.88rem;
    color: #cfe0ff;
    line-height: 1.45;
}

.mk-tf-cta {
    position: relative;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 9px 16px;
    border-radius: var(--radius-full);
    background: #fff;
    color: #0e1a3a;
    font-weight: 700;
    font-size: 0.86rem;
}

.mk-tf-cta svg {
    width: 16px;
    height: 16px;
}

/* ── Panel Top Up Cepat ── */
.mk-qk {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.mk-qk.is-loading {
    min-height: 300px;
}

.mk-qk-skel {
    flex: 1;
    background: var(--skeleton);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

.mk-qk-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.mk-qk-tabs::-webkit-scrollbar {
    display: none;
}

/* Keempat tab dibagi rata (flex: 1 1 0) — dulu lebarnya mengikuti panjang
   teks, jadi "Aplikasi Premium" jauh lebih lebar dari "Token PLN". */
.mk-qk-tab {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 15px 10px;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--text-2);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--duration-fast), background var(--duration-fast);
}

.mk-qk-tab svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.mk-qk-tab span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.mk-qk-tab:hover {
    color: var(--text);
}

.mk-qk-tab.active {
    color: var(--brand-text);
    background: var(--brand-soft);
    border-bottom-color: var(--brand);
}

/* Tinggi isi panel DIKUNCI (bukan min-height) supaya tinggi panel — dan
   banner Top Up di kolom kiri yang ikut meregang setinggi panel — tidak
   berubah-ubah saat pindah tab. 232px muat isi terbesar: label + 2 baris
   tile (6 item) + link "Lihat semua aplikasi". */
.mk-qk-body {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
    height: 232px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.mk-qk-label {
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--text);
}

.mk-qk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.mk-qk-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--duration-fast), background var(--duration-fast);
}

.mk-qk-item:hover {
    border-color: var(--brand-ring);
}

.mk-qk-item.is-selected {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.mk-qk-ic {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--brand-soft);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mk-qk-ic b {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--brand-text);
}

.mk-qk-ic img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--surface);
}

.mk-qk-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mk-qk-txt strong {
    font-size: 0.84rem;
    font-weight: 650;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mk-qk-txt small {
    font-size: 0.72rem;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mk-qk-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-2);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
}

.mk-qk-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

.mk-qk-help {
    font-size: 0.78rem;
    color: var(--text-3);
}

/* Pulsa & PLN: Nomor | Nominal dalam satu baris (total & tombol bayar di footer) */
.mk-qk-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}

.mk-qk-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.mk-qk-row .mk-qk-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mk-qk-op {
    display: none;
    padding: 1px 8px;
    border-radius: var(--radius-full);
    background: var(--brand-soft, var(--surface-2));
    color: var(--brand-text);
    font-size: 0.7rem;
    font-weight: 700;
}

.mk-qk-op.show {
    display: inline-block;
}

.mk-qk-row .mk-qk-input {
    height: 44px;
    font-size: 0.9rem;
}

.mk-qk-row .mk-qk-input::placeholder {
    font-weight: 400;
    color: var(--text-3);
}

.mk-qk-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    cursor: pointer;
    text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.mk-qk-select:disabled {
    cursor: not-allowed;
    color: var(--text-3);
}

/* <select> asli tetap ada sebagai sumber nilai, tapi tidak terlihat */
.mk-qk-native {
    display: none !important;
}

/* Tombol pemilih nominal (menggantikan dropdown bawaan browser) */
.mk-qk-pick {
    display: block;
    text-align: left;
    overflow: hidden;
    white-space: nowrap;
}

.mk-qk-pick > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mk-qk-pick:not(.has-value) {
    font-weight: 400;
    color: var(--text-3);
}

.mk-qk-pick[aria-expanded="true"] {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

/* ══ PEMILIH NOMINAL (popover desktop / panel bawah di HP) ══════════════ */
.mk-pick[hidden] {
    display: none;
}

.mk-pick {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.mk-pick-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 24, 0.45);
}

.mk-pick-sheet {
    position: fixed;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: mk-pick-in var(--duration-base) var(--ease-out);
}

@keyframes mk-pick-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

/* Di desktop, backdrop dibuat transparan (hanya penangkap klik di luar) */
@media (min-width: 768px) {
    .mk-pick-backdrop { background: transparent; }
    .mk-pick-grip { display: none; }
}

/* Hanya daftar yang boleh mengecil/menggulir; header, pencarian, dan chip tetap utuh */
.mk-pick-sheet > :not(.mk-pick-list) {
    flex-shrink: 0;
}

.mk-pick-grip {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: var(--border-2);
    margin: 8px auto 0;
}

.mk-pick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 4px 16px;
}

.mk-pick-head strong {
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
}

.mk-pick-x {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-2);
    cursor: pointer;
}

.mk-pick-x svg { width: 16px; height: 16px; }

.mk-pick-search {
    position: relative;
    margin: 8px 14px 0;
}

.mk-pick-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}

.mk-pick-search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 16px;   /* 16px: iOS tidak zoom saat fokus */
    outline: none;
}

.mk-pick-search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

.mk-pick-chips {
    display: flex;
    gap: 6px;
    padding: 10px 14px 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.mk-pick-chips:empty { display: none; }
.mk-pick-chips::-webkit-scrollbar { display: none; }

.mk-pick-chip {
    flex: 0 0 auto;
    padding: 6px 12px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-full);
    background: none;
    color: var(--text-2);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.mk-pick-chip.active {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-text);
}

.mk-pick-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 8px 10px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
}

.mk-pick-group {
    position: sticky;
    top: -8px;
    z-index: 1;
    padding: 8px 10px 4px;
    background: var(--surface);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
}

.mk-pick-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mk-pick-item:hover {
    background: var(--surface-2);
}

.mk-pick-item.is-selected {
    background: var(--brand-soft);
}

.mk-pick-name {
    min-width: 0;
    font-size: 0.86rem;
    font-weight: 550;
    line-height: 1.35;
}

.mk-pick-price {
    flex-shrink: 0;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--brand-text);
    font-variant-numeric: tabular-nums;
}

.mk-pick-empty {
    padding: 28px 12px;
    text-align: center;
    font-size: 0.86rem;
    color: var(--text-3);
}

/* HP: panel dari bawah layar */
@media (max-width: 767px) {
    .mk-pick-sheet {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 82vh;
        max-height: 82dvh;
        border-radius: 20px 20px 0 0;
        border-bottom: 0;
        animation: mk-pick-up var(--duration-slow) var(--ease-out);
    }

    .mk-pick-item {
        padding: 13px 10px;
    }
}

@keyframes mk-pick-up {
    from { transform: translateY(100%); }
    to { transform: none; }
}

html.mk-pick-lock,
html.mk-pick-lock body {
    overflow: hidden;
}

.mk-qk-more {
    align-self: flex-start;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-text);
}

.mk-qk-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 20px 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-2);
}

.mk-qk-price {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mk-qk-price small {
    font-size: 0.76rem;
    color: var(--text-3);
}

.mk-qk-price strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.mk-qk-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--brand);
    color: var(--brand-ink);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--duration-fast);
}

.mk-qk-cta:hover {
    background: var(--brand-hover);
}

.mk-qk-cta svg {
    width: 17px;
    height: 17px;
}

/* ══ FLASH SALE ═════════════════════════════════════════════════════════ */
.mk-flash {
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
}

.mk-flash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 12px 18px;
    background: var(--brand);
    color: #fff;
}

.mk-flash-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.mk-flash-title svg {
    width: 20px;
    height: 20px;
}

.mk-countdown {
    display: flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}

.mk-countdown-label {
    font-size: 0.8rem;
    margin-right: 6px;
    opacity: .9;
}

.mk-cd-box {
    min-width: 30px;
    padding: 3px 5px;
    border-radius: 6px;
    background: #fff;
    color: var(--brand);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.mk-cd-sep {
    font-weight: 700;
}

.mk-row-scroll {
    --row-cols: 5;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--row-cols) - 1) * 18px) / var(--row-cols));
    gap: 18px;
    padding: 16px 18px 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.mk-row-scroll > * {
    scroll-snap-align: start;
    min-width: 0;
}

/* ── Opsi tambahan kartu (hanya tampil bila diisi) ── */
.pc-flash-was {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    color: var(--text-3);
}

.pc-flash-was em {
    font-style: normal;
    font-weight: 700;
    color: var(--danger-text);
    background: var(--danger-soft);
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.pc-flash-bar {
    position: relative;
    height: 6px;
    margin-top: 8px;
    border-radius: var(--radius-full);
    background: var(--brand-soft-2);
    overflow: hidden;
}

.pc-flash-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: var(--brand);
    border-radius: var(--radius-full);
}

.pc-flash-text {
    display: block;
    margin-top: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-2);
}

/* Kartu Flash Sale bisa lebih pendek dari tetangganya di baris geser:
   deskripsi tidak ikut memanjang (kalau memanjang, baris ke-3 ikut terlihat). */
.product-card.is-flash .product-desc {
    flex: 0 0 auto;
}

.pc-sold {
    font-size: 0.72rem;
    color: var(--text-3);
}

.pc-rank {
    position: absolute;
    top: -7px;
    left: -7px;
    z-index: 2;
    min-width: 30px;
    height: 24px;
    padding: 0 7px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 800;
    color: #fff;
    background: var(--brand);
    box-shadow: var(--shadow-sm);
}

.pc-rank-2 { background: var(--brand-2); }
.pc-rank-3 { background: var(--neutral-text); }

.vc-was {
    margin-left: 4px;
    font-size: 0.72em;
    font-weight: 500;
    color: var(--text-3);
}

/* ══ TOP UP GAME (satu baris) ═══════════════════════════════════════════ */
.mk-games {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.mk-game {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-xs);
    transition: transform var(--duration-base) var(--ease-out), border-color var(--duration-base), box-shadow var(--duration-base);
}

.mk-game:hover {
    transform: translateY(-3px);
    border-color: var(--border-2);
    box-shadow: var(--shadow-md);
}

.mk-game-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    background: var(--brand-soft);
    overflow: hidden;
}

.mk-game-logo b {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--brand-text);
}

.mk-game-logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--surface);
}

.mk-game-logo svg {
    width: 36px;
    height: 36px;
    color: var(--brand-text);
}

.mk-game-name {
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.mk-game-price {
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-text);
    font-variant-numeric: tabular-nums;
}

.mk-game.is-soon {
    cursor: default;
    opacity: .75;
}

.mk-game.is-soon:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}

.mk-game.is-soon .mk-game-price {
    color: var(--text-3);
    font-weight: 500;
}

.mk-game-more {
    border-style: dashed;
    background: transparent;
    box-shadow: none;
}

.mk-game-more .mk-game-logo {
    background: var(--surface-2);
}

.mk-game-more .mk-game-price {
    color: var(--text-3);
    font-weight: 500;
}

/* Keadaan "segera tersedia" (layanan aktif, produk belum disinkron) */
.mk-qk-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 8px;
    text-align: center;
    color: var(--text-2);
}

.mk-qk-empty svg {
    width: 34px;
    height: 34px;
    color: var(--brand-text);
    opacity: .85;
}

.mk-qk-empty p {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--text);
}

.mk-qk-empty small {
    font-size: 0.78rem;
    color: var(--text-3);
    max-width: 38ch;
}

.mk-qk-cta:disabled {
    background: var(--surface-3);
    color: var(--text-3);
    cursor: not-allowed;
}

.mk-qk-cta:disabled:hover {
    background: var(--surface-3);
}

.mk-games-soon {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border: 1px dashed var(--border-2);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.mk-games-soon svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: var(--brand-text);
}

.mk-games-soon div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mk-games-soon strong {
    font-size: 0.95rem;
    color: var(--text);
}

.mk-games-soon span {
    font-size: 0.82rem;
    color: var(--text-3);
}

/* ══ TAB SEMUA PRODUK ═══════════════════════════════════════════════════ */
.mk-tabs {
    gap: 8px;
    margin-bottom: 16px;
}

.mk-tab {
    flex: 0 0 auto;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-2);
    background: var(--surface);
    color: var(--text-2);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast);
}

.mk-tab:hover {
    color: var(--text);
}

.mk-tab.active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-ink);
}

.mk-more {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.mk-state {
    grid-column: 1 / -1;
    padding: 40px 16px;
    text-align: center;
    color: var(--text-2);
    font-size: 0.9rem;
}

.mk-state .btn {
    margin-top: 14px;
}

/* ══ RESPONSIF ═══════════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
    .mk-games { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

    .mk-row-scroll { --row-cols: 4; gap: 16px; grid-auto-columns: calc((100% - 3 * 16px) / 4); }
}

@media (max-width: 1023px) {
    .mk-games { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    /* Banner kecil pindah ke bawah banner utama */
    .mk-hero.has-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .mk-banner-side {
        grid-template-rows: none;
        grid-template-columns: 1fr 1fr;
    }

    .mk-banner-side.is-one {
        grid-template-columns: 1fr;
    }

    .mk-side-item {
        aspect-ratio: 800 / 300;
    }

    .mk-quick {
        grid-template-columns: minmax(0, 1fr);
    }

    .mk-topup-banner {
        height: auto;
        min-height: 0;
        aspect-ratio: 1080 / 360;
    }

    .mk-topup-fallback {
        aspect-ratio: auto;
        min-height: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 20px 24px;
    }

    .mk-tf-mark {
        display: none;
    }

    .mk-row-scroll { --row-cols: 3; gap: 16px; grid-auto-columns: calc((100% - 2 * 16px) / 3); }
}

@media (max-width: 899px) {
    /* HP: satu baris yang digeser; 2 tile + potongan tile ke-3 sebagai tanda bisa digeser */
    .mk-games {
        display: grid;
        grid-auto-flow: column;
        grid-template-columns: none;
        grid-auto-columns: calc((100% - 12px) / 2.3);
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .mk-games::-webkit-scrollbar { display: none; }

    .mk-game { scroll-snap-align: start; padding: 10px; gap: 8px; }

    .mk-game-name { font-size: 0.82rem; min-height: 2.6em; }

    /* 2 kartu + potongan kartu ke-3 = tanda bisa digeser */
    .mk-row-scroll {
        gap: 12px;
        grid-auto-columns: calc((100% - 12px) / 2.18);
        padding: 14px 14px 16px;
    }

}

@media (max-width: 767px) {
    .mk-main {
        padding-top: calc(var(--header-height) + 12px);
    }

    /* HP: satu banner geser, rasio 9:4; banner kecil disembunyikan */
    .mk-banner {
        aspect-ratio: 1080 / 480;
        border-radius: var(--radius-lg);
    }

    .mk-banner-side {
        display: none !important;
    }

    .mk-banner-nav {
        display: none;
    }

    .mk-quick {
        margin-top: 12px;
        gap: 12px;
    }

    /* HP: tile 3 kolom (ikon di atas, nama di bawah) → 6 item = 2 baris,
       sama rapinya dengan desktop dan tinggi panel tetap. */
    .mk-qk-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .mk-qk-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        padding: 10px 6px;
    }

    .mk-qk-ic {
        width: 36px;
        height: 36px;
    }

    .mk-qk-txt {
        align-items: center;
        width: 100%;
    }

    .mk-qk-txt strong {
        font-size: 0.76rem;
        max-width: 100%;
    }

    .mk-qk-txt small {
        font-size: 0.68rem;
        max-width: 100%;
    }

    /* HP: isian ditumpuk */
    .mk-qk-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .mk-qk-body {
        padding: 14px 14px 12px;
        height: 292px;
    }

    .mk-qk-foot {
        margin: 0 14px 14px;
    }

    /* HP: 4 tab sama lebar tanpa geser — ikon di atas, label di bawah */
    .mk-qk-tabs {
        overflow: visible;
    }

    .mk-qk-tab {
        flex-direction: column;
        justify-content: flex-start;
        gap: 5px;
        padding: 10px 4px 9px;
        font-size: 0.72rem;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
    }

    .mk-qk-tab svg {
        width: 19px;
        height: 19px;
    }

    .mk-qk-tab span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .mk-qk-price strong {
        font-size: 1.15rem;
    }

    .mk-qk-cta {
        padding: 11px 14px;
        font-size: 0.82rem;
    }

    .mk-section {
        margin-top: 28px;
    }

    .mk-title {
        font-size: 1.1rem;
    }

    /* HP: kategori dibuat ringkas — dulu 76px/ikon 50px, terlalu besar */
    .mk-cat {
        width: 64px;
        gap: 5px;
        padding: 6px 2px;
    }

    .mk-cats-section {
        margin-top: 10px;
    }

    .mk-cats-row {
        padding: 2px 4px 2px 10px;
        gap: 4px;
        border-radius: var(--radius-md);
    }

    .mk-cats {
        gap: 2px;
    }

    /* HP: tulisan "Kategori" disembunyikan, ikon + nama saja */
    .mk-cats-label {
        display: none;
    }

    .mk-cats-row {
        padding-left: 6px;
    }

    .mk-cat-ic {
        width: 38px;
        height: 38px;
    }

    .mk-cat-emoji {
        font-size: 1.3rem;
    }

    .mk-cat-letter {
        font-size: 1rem;
    }

    /* Nama satu baris + elipsis: nama panjang ("Productivity") tidak
       lagi meluber ke ikon sebelahnya */
    .mk-cat-name {
        display: block;
        max-width: 100%;
        font-size: 0.66rem;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .mk-cat-skel {
        width: 38px;
        height: 38px;
        margin: 6px 11px 20px;
    }

    .mk-flash {
        border-radius: var(--radius-lg);
    }

    .mk-flash-head {
        padding: 10px 14px;
    }

    .mk-flash-title {
        font-size: 1.02rem;
    }

    .mk-countdown-label {
        display: none;
    }

}

@media (max-width: 600px) {
    #mk-games .mk-sub {
        display: none;
    }

    .mk-title {
        white-space: nowrap;
    }

    .mk-tf-text strong {
        font-size: 1rem;
    }

    .mk-tf-cta {
        display: none;
    }

    .pc-rank {
        top: -6px;
        left: -6px;
        height: 22px;
        min-width: 26px;
        font-size: 0.68rem;
    }
}
