/* Katalog produk publik catalog.masuya.biz.id (WAP-1708), desain "ALT Preview 2" + Detail Produk.
   Berdiri sendiri: tidak memakai CSS ERP (layout main), supaya halaman publik ringan. */

:root {
    --kt-navy: #120c8c;
    --kt-navy-hover: #1c169f;
    --kt-indigo: #2e3192;
    --kt-ink: #111827;
    --kt-text: #374151;
    --kt-muted: #6b7280;
    --kt-line: #e5e7eb;
    --kt-tile: #f3f4f6;
    --kt-soft: #eef0ff;
    --kt-gold: #c9a227;
    --kt-bg: #ffffff;
    --kt-radius: 16px;
    --kt-shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 8px 24px -12px rgba(17, 24, 39, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--kt-bg);
    color: var(--kt-text);
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.kt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kt-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .kt-container { padding: 0 24px; } }

/* ---------- Tombol ---------- */
.kt-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 0; border-radius: 999px; background: var(--kt-navy); color: #fff;
    padding: 8px 18px; font-size: 13px; font-weight: 600; line-height: 1.3; cursor: pointer;
    transition: background-color .15s ease;
}
.kt-btn:hover { background: var(--kt-navy-hover); }
.kt-btn:focus-visible, .kt-link:focus-visible, .kt-chip:focus-visible, .kt-card a:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; }
.kt-btn--ghost { background: #fff; color: var(--kt-navy); box-shadow: inset 0 0 0 1px var(--kt-line); }
.kt-btn--ghost:hover { background: var(--kt-soft); }
.kt-btn svg { width: 16px; height: 16px; }
.kt-link { color: var(--kt-ink); font-weight: 600; font-size: 13px; }
.kt-link:hover { color: var(--kt-indigo); }

/* ---------- Header ---------- */
.kt-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid #f1f2f6; }
.kt-header__row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 12px 0; }
.kt-logo { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.kt-logo img { height: 40px; width: auto; }
.kt-logo span { font-size: 9px; font-weight: 600; color: var(--kt-indigo); white-space: nowrap; }
.kt-search { position: relative; max-width: 560px; width: 100%; }
.kt-search input {
    width: 100%; height: 40px; border: 1px solid #c7cad6; border-radius: 999px; padding: 0 16px 0 40px;
    background: #fff; font-size: 13px; outline: none;
}
.kt-search input:focus { border-color: var(--kt-indigo); box-shadow: 0 0 0 3px rgba(46, 49, 146, .15); }
.kt-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--kt-muted); }
.kt-city {
    display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--kt-line); border-radius: 999px;
    background: #fff; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--kt-ink); cursor: pointer; white-space: nowrap;
}
.kt-city:hover { background: var(--kt-soft); }
.kt-city svg { width: 16px; height: 16px; color: var(--kt-indigo); flex: 0 0 auto; }
.kt-city__nama { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
    .kt-header__row { grid-template-columns: auto 1fr; row-gap: 8px; }
    .kt-logo img { height: 30px; }
    .kt-logo span { display: none; }
    .kt-header__city { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
    .kt-city { padding: 4px 10px; font-size: 12px; }
}

/* ---------- Hero ---------- */
.kt-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: center; padding: 24px 0 8px; }
.kt-hero__judul { margin: 0 0 16px; color: var(--kt-ink); font-size: clamp(22px, 3.6vw, 40px); line-height: 1.12; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; }
.kt-hero__judul em { font-style: normal; color: var(--kt-indigo); }
.kt-hero__kota { margin: 10px 0 0; font-size: 12px; color: var(--kt-muted); }
.kt-hero__kota strong { color: var(--kt-ink); }
.kt-slider { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 2; background: linear-gradient(135deg, #1f1aa8, #2e3192 55%, #4b4fd1); box-shadow: var(--kt-shadow); }
.kt-slider__track { display: flex; height: 100%; transition: transform .5s ease; }
.kt-slider__slide { flex: 0 0 100%; height: 100%; }
.kt-slider__slide img { width: 100%; height: 100%; object-fit: cover; }
.kt-slider__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.kt-slider__dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, .6); cursor: pointer; }
.kt-slider__dots button[aria-current="true"] { width: 22px; background: #fff; }
.kt-slider__kosong { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; text-align: center; padding: 16px; }
.kt-slider__kosong img { height: 64px; width: auto; filter: brightness(0) invert(1); }
.kt-slider__kosong span { font-size: 14px; font-weight: 600; opacity: .9; }
@media (max-width: 420px) {
    .kt-hero { grid-template-columns: 1fr; gap: 16px; }
}
@media (min-width: 421px) and (max-width: 640px) {
    .kt-hero { gap: 12px; padding-top: 16px; }
    .kt-hero .kt-btn { padding: 6px 12px; font-size: 11px; }
}

/* ---------- Section ---------- */
.kt-section { padding: 28px 0 8px; }
.kt-section__head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 16px; }
.kt-section__head h2 { grid-column: 2; margin: 0; color: var(--kt-ink); font-size: 20px; font-weight: 700; }
.kt-section__head .kt-link { grid-column: 3; justify-self: end; }
.kt-section__head--kiri { grid-template-columns: 1fr auto; }
.kt-section__head--kiri h2 { grid-column: 1; }
.kt-section__head--kiri .kt-link { grid-column: 2; }
.kt-title-caps { text-transform: uppercase; font-weight: 800 !important; letter-spacing: .01em; }
.kt-title-caps em { font-style: normal; color: var(--kt-indigo); }

/* ---------- Kategori ---------- */
.kt-kategori { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.kt-kategori__item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.kt-kategori__tile { width: 100%; aspect-ratio: 1 / 1; border-radius: var(--kt-radius); background: var(--kt-tile); overflow: hidden; display: flex; align-items: center; justify-content: center; transition: transform .15s ease, box-shadow .15s ease; }
.kt-kategori__item:hover .kt-kategori__tile { transform: translateY(-2px); box-shadow: var(--kt-shadow); }
.kt-kategori__tile img { width: 100%; height: 100%; object-fit: cover; }
.kt-kategori__tile svg { width: 40%; height: 40%; color: #c3c6d4; }
.kt-kategori__nama { color: var(--kt-ink); font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-transform: capitalize; }
.kt-kategori[data-ringkas] .kt-kategori__item:nth-child(n + 6) { display: none; }
@media (max-width: 640px) {
    /* HP: satu baris geser horizontal, ubin tetap terbaca walau nama kategori panjang. */
    .kt-kategori, .kt-kategori[data-ringkas] { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
    .kt-kategori .kt-kategori__item, .kt-kategori[data-ringkas] .kt-kategori__item:nth-child(n + 6) { display: flex; flex: 0 0 26%; scroll-snap-align: start; }
    .kt-kategori__nama { font-size: 11px; }
    [data-kategori-toggle] { display: none; }
}

/* ---------- Banner promo ---------- */
.kt-promo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kt-promo__item { position: relative; display: block; border-radius: var(--kt-radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--kt-soft); }
.kt-promo__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
a.kt-promo__item:hover img { transform: scale(1.03); }
.kt-promo__item .kt-btn { position: absolute; left: 16px; bottom: 16px; }
@media (max-width: 640px) {
    .kt-promo { gap: 10px; }
    .kt-promo__item .kt-btn { left: 8px; bottom: 8px; padding: 4px 10px; font-size: 10px; }
}

/* ---------- Storage type ---------- */
.kt-storage { display: flex; align-items: flex-start; gap: 8px 24px; flex-wrap: wrap; }
.kt-storage__label { align-self: center; color: var(--kt-ink); font-size: 13px; font-weight: 700; min-width: 92px; }
.kt-storage__list { display: flex; flex: 1 1 auto; min-width: 0; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kt-storage__item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 112px; text-align: center; padding: 6px; border-radius: 12px; }
.kt-storage__item:hover { background: var(--kt-tile); }
.kt-storage__icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; background: var(--kt-navy); color: #fff; font-size: 12px; font-weight: 800; }
.kt-storage__icon svg { width: 22px; height: 22px; }
.kt-storage__item[aria-current="true"] { background: var(--kt-soft); }
.kt-storage__item[aria-current="true"] .kt-storage__icon { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--kt-gold); }
.kt-storage__nama { color: var(--kt-ink); font-size: 12px; font-weight: 700; }
.kt-storage__ket { color: var(--kt-muted); font-size: 10px; line-height: 1.3; }
@media (max-width: 640px) {
    .kt-storage__label { width: 100%; }
    .kt-storage__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .kt-storage__item { width: auto; }
    .kt-storage__icon { width: 36px; height: 36px; }
    .kt-storage__ket { font-size: 9px; }
}

/* ---------- Kartu produk ---------- */
.kt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .kt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.kt-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid #d6d9e3; border-radius: var(--kt-radius); background: #fff; transition: box-shadow .15s ease, border-color .15s ease; }
.kt-card:hover { border-color: #b8bdf0; box-shadow: var(--kt-shadow); }
.kt-card__foto { aspect-ratio: 1 / 1; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.kt-card__foto img { width: 100%; height: 100%; object-fit: contain; }
.kt-foto-kosong { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--kt-tile); color: #b5b9c6; font-size: 11px; border-radius: inherit; }
.kt-foto-kosong svg { width: 36%; height: 36%; }
.kt-card__brand { color: var(--kt-indigo); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; min-height: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kt-card__nama { margin: 0; color: var(--kt-ink); font-size: 13px; font-weight: 600; line-height: 1.35; min-height: 35px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kt-card__meta { display: flex; gap: 6px; flex-wrap: wrap; }
.kt-tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--kt-tile); color: var(--kt-text); font-size: 10px; font-weight: 600; }
.kt-card .kt-btn { width: 100%; margin-top: auto; }
@media (max-width: 640px) {
    .kt-card { padding: 8px; gap: 6px; }
    .kt-card__nama { font-size: 12px; min-height: 32px; }
    .kt-card .kt-btn { padding: 6px 8px; font-size: 12px; }
}
.kt-more { display: flex; justify-content: center; margin: 20px 0 8px; }
.kt-kosong { padding: 40px 16px; text-align: center; color: var(--kt-muted); border: 1px dashed var(--kt-line); border-radius: var(--kt-radius); }

/* ---------- Daftar produk: chip filter ---------- */
.kt-filter { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 4px 0 12px; }
.kt-filter__ikon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 999px; background: var(--kt-tile); color: var(--kt-ink); }
.kt-filter__ikon svg { width: 18px; height: 18px; }
.kt-chip { position: relative; flex: 0 0 auto; }
.kt-chip select {
    height: 36px; border: 1px solid var(--kt-line); border-radius: 999px; background: #fff; padding: 0 30px 0 14px;
    font-size: 13px; font-weight: 600; color: var(--kt-ink); -webkit-appearance: none; appearance: none; cursor: pointer; max-width: 220px;
}
.kt-chip select:focus { outline: none; border-color: var(--kt-indigo); box-shadow: 0 0 0 3px rgba(46, 49, 146, .15); }
.kt-chip[data-aktif] select { background: var(--kt-soft); border-color: #b8bdf0; color: var(--kt-navy); }
.kt-chip svg { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; pointer-events: none; color: var(--kt-muted); }
.kt-hasil { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
.kt-hasil h1 { margin: 0; color: var(--kt-ink); font-size: 18px; font-weight: 700; }
.kt-hasil span { color: var(--kt-muted); font-size: 12px; }
.kt-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px 0 8px; font-size: 13px; color: var(--kt-muted); }
.kt-pagination .kt-btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* ---------- Detail produk ---------- */
.kt-bar { background: var(--kt-navy); color: #fff; }
.kt-bar a { display: inline-flex; align-items: center; gap: 8px; padding: 18px 0; font-size: 15px; font-weight: 600; }
.kt-bar svg { width: 18px; height: 18px; }
.kt-detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; padding: 32px 0 48px; align-items: start; }
.kt-detail__foto { aspect-ratio: 1 / 1; border: 1px solid #cfd3df; border-radius: 20px; background: #fff; padding: 24px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.kt-detail__foto img { width: 100%; height: 100%; object-fit: contain; }
.kt-detail__brand { margin: 0; color: var(--kt-indigo); font-size: 18px; font-weight: 600; }
.kt-detail__nama { margin: 2px 0 12px; color: var(--kt-ink); font-size: clamp(22px, 3vw, 34px); line-height: 1.2; font-weight: 700; }
.kt-detail__desk { margin: 0 0 20px; color: var(--kt-text); font-size: 14px; white-space: pre-line; }
.kt-tabs { display: flex; gap: 4px; border-bottom: 3px solid #d9dbe3; overflow-x: auto; }
.kt-tab { border: 0; background: transparent; padding: 10px 18px; margin-bottom: -3px; border-bottom: 3px solid transparent; color: var(--kt-navy); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.kt-tab[aria-selected="true"] { background: var(--kt-soft); border-bottom-color: var(--kt-gold); }
.kt-panel { padding: 16px 20px; }
.kt-spek { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; margin: 0; }
.kt-spek dt { color: var(--kt-muted); font-size: 12px; }
.kt-spek dd { margin: 0; color: var(--kt-ink); font-size: 16px; }
.kt-spek dd small { color: var(--kt-muted); font-size: 12px; }
.kt-komposisi { width: 100%; border-collapse: collapse; font-size: 14px; }
.kt-komposisi th { text-align: left; color: var(--kt-muted); font-size: 12px; font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--kt-line); }
.kt-komposisi td { padding: 8px; border-bottom: 1px solid #f1f2f6; color: var(--kt-ink); vertical-align: top; }
.kt-komposisi .kt-angka { text-align: right; white-space: nowrap; }
.kt-detail__desk--rapat { margin: 0; }
@media (max-width: 768px) {
    .kt-detail { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
    .kt-detail__foto { max-width: 420px; width: 100%; margin: 0 auto; }
    .kt-panel { padding: 14px 4px; }
}
@media (max-width: 420px) { .kt-spek { grid-template-columns: 1fr; } }

/* ---------- Modal pilih kota ---------- */
.kt-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.kt-modal__backdrop { position: absolute; inset: 0; background: rgba(17, 12, 60, .55); backdrop-filter: blur(4px); }
.kt-modal__card { position: relative; width: 100%; max-width: 440px; max-height: min(640px, 90vh); display: flex; flex-direction: column; background: #fff; border-radius: 20px; box-shadow: 0 24px 48px -12px rgba(17, 24, 39, .4); overflow: hidden; }
.kt-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 8px; }
.kt-modal__head h2 { margin: 0; color: var(--kt-ink); font-size: 20px; font-weight: 700; }
.kt-modal__head p { margin: 2px 0 0; color: var(--kt-muted); font-size: 12px; }
.kt-modal__close { border: 0; background: var(--kt-tile); width: 32px; height: 32px; border-radius: 999px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.kt-modal__close svg { width: 16px; height: 16px; }
.kt-modal__cari { padding: 8px 20px 12px; }
.kt-modal__cari input { width: 100%; height: 40px; border: 1px solid #c7cad6; border-radius: 12px; padding: 0 14px; font-size: 14px; outline: none; }
.kt-modal__cari input:focus { border-color: var(--kt-indigo); box-shadow: 0 0 0 3px rgba(46, 49, 146, .15); }
.kt-kota-list { list-style: none; margin: 0; padding: 0 12px 16px; overflow-y: auto; }
.kt-kota-list a { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 12px; color: var(--kt-ink); font-weight: 500; }
.kt-kota-list a:hover, .kt-kota-list a:focus-visible { background: var(--kt-soft); outline: none; }
.kt-kota-list a[aria-current="true"] { background: var(--kt-soft); color: var(--kt-navy); font-weight: 700; }
.kt-kota-list svg { width: 18px; height: 18px; color: var(--kt-indigo); flex: 0 0 auto; }
.kt-kota-list .kt-cek { margin-left: auto; }
.kt-kota-kosong { padding: 12px 10px; color: var(--kt-muted); font-size: 13px; }

/* ---------- Halaman pesan & footer ---------- */
.kt-pesan { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 48px 16px; }
.kt-pesan img { height: 64px; width: auto; margin-bottom: 8px; }
.kt-pesan h1 { margin: 0; color: var(--kt-ink); font-size: 26px; font-weight: 700; }
.kt-pesan p { margin: 0; max-width: 460px; color: var(--kt-muted); }
.kt-footer { margin-top: 40px; background: var(--kt-navy); color: rgba(255, 255, 255, .85); font-size: 12px; }
.kt-footer .kt-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 18px; padding-bottom: 18px; }
