/* Mitramini — mobile-first (360px). Warna 60-30-10: 60% netral terang, 30% hitam, 10% kuning emas. */
:root {
  --primary: #141414; --primary-dark: #2B2B2B; --primary-soft: #FAF0D2;
  --gold: #D4A62A; --gold-dark: #B88D1E; --gold-text: #8A6508;
  --wa: #128C4A; --wa-dark: #0E6E3A;
  --bg: #F5F5F4; --surface: #FAFAFA; --text: #1C1917; --muted: #6B6461; --border: #E2DEDB;
  --danger: #B91C1C; --danger-soft: #FEE2E2; --ok: #15803D; --ok-soft: #DCFCE7; --warn-soft: #FEF3C7;
  --radius: 12px; --side: 16px; --max: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--gold-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--side); }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header */
.top { background: var(--primary); color: var(--surface); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 10px; height: 52px; }
.logo { color: var(--surface); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--gold); }
.searchbar button:hover { background: var(--gold-dark); }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top nav a { color: var(--surface); padding: 6px 8px; border-radius: 8px; font-size: .9rem; }
.top nav a:hover { background: var(--primary-dark); text-decoration: none; }
.top .btn-post { background: var(--gold); color: var(--primary); font-weight: 700; }
.top .btn-post:hover { background: var(--gold-dark); }
.searchbar { background: var(--primary); padding: 0 0 12px; }
.searchbar form { display: flex; gap: 8px; }
.searchbar input { flex: 1; height: 40px; border: 0; border-radius: 999px; padding: 0 16px; font-size: 15px; background: var(--surface); }
.searchbar button { height: 40px; border: 0; border-radius: 999px; padding: 0 16px; background: var(--gold); color: var(--primary); font-weight: 600; }

main { padding: 16px 0 32px; min-height: 60vh; }
main { padding-top: 14px; }
.section { margin-bottom: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }

/* Kategori */
.cats-wrap { padding-top: 12px; }
.cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cats::-webkit-scrollbar { display: none; }
.cats .cat { flex: 0 0 84px; }
.cat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 4px; text-align: center; color: var(--text); font-size: .8rem; line-height: 1.25; }
.cat:hover { border-color: var(--gold); text-decoration: none; }
.cat.on { border-color: var(--gold); background: var(--primary-soft); font-weight: 700; }
.cat .ic { display: block; font-size: 1.5rem; margin-bottom: 4px; }

/* Kartu iklan */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); display: flex; flex-direction: column; position: relative; }
.card:hover { text-decoration: none; border-color: var(--gold); }
.card .thumb { aspect-ratio: 4 / 3; background: var(--border); object-fit: cover; width: 100%; }
.card .body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.card .price { font-weight: 800; color: var(--primary-dark); }
.card .title { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: .75rem; color: var(--muted); }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--gold-text); }
.card .badge { position: absolute; top: 8px; left: 8px; }
.badge.st-active { background: var(--ok-soft); color: var(--ok); }
.badge.st-pending, .badge.st-draft { background: var(--warn-soft); color: #92400E; }
.badge.st-rejected, .badge.st-hidden { background: var(--danger-soft); color: var(--danger); }
.badge.st-sold, .badge.st-expired { background: var(--border); color: var(--muted); }

/* Form & tombol */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 4px; }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
input[type=text], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--surface); color: var(--text);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: transparent; }
.field-error { color: var(--danger); font-size: .8rem; margin-top: 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer; background: var(--primary); color: var(--surface); }
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.danger { background: var(--danger); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn.wa { background: var(--wa); font-size: 1.05rem; }
.btn.wa:hover { background: var(--wa-dark); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline { display: inline; }

.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: .9rem; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.success { background: var(--ok-soft); color: var(--ok); }
.alert.info { background: var(--warn-soft); color: #78350F; }

/* Filter */
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters .full { grid-column: 1 / -1; }
details.filter-box > summary { cursor: pointer; font-weight: 700; list-style: none; }
details.filter-box > summary::-webkit-details-marker { display: none; }
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; }

/* Detail iklan */
.gal { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--primary); }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: zoom-in; user-select: none; -webkit-user-select: none; touch-action: pan-x pan-y; }
.gallery::-webkit-scrollbar { display: none; }
.gallery.dragging { scroll-snap-type: none; cursor: grabbing; }
.gallery img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; scroll-snap-align: start; pointer-events: none; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(20,20,20,.55); color: var(--surface); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.gal-nav:hover { background: rgba(20,20,20,.8); }
.gal-nav:focus-visible { outline: 2px solid var(--gold); }
.gal-nav.prev { left: 8px; } .gal-nav.next { right: 8px; }
.gal-nav[disabled] { opacity: .25; cursor: default; }
.gal-count, .gal-zoom-hint { position: absolute; bottom: 8px; font-size: .75rem; padding: 2px 10px; border-radius: 999px; background: rgba(20,20,20,.6); color: var(--surface); pointer-events: none; }
.gal-count { right: 8px; font-variant-numeric: tabular-nums; } .gal-zoom-hint { left: 8px; }
.gal-thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; }
.gal-thumbs button { flex: none; width: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.gal-thumbs button.on { border-color: var(--gold); }
.gal-thumbs img { width: 64px; height: 48px; object-fit: cover; }

/* Pop-up foto besar */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(10,10,10,.96); display: flex; flex-direction: column; color: var(--surface); }
.lb[hidden] { display: none; }
.lb-bar { display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left)); }
.lb-bar .lb-count { margin-right: auto; font-size: .9rem; font-variant-numeric: tabular-nums; }
.lb-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: var(--surface); font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255,255,255,.25); }
.lb-btn:focus-visible { outline: 2px solid var(--gold); }
.lb-stage { position: relative; flex: 1; overflow: hidden; touch-action: none; cursor: zoom-in; }
.lb-stage.zoomed { cursor: grab; } .lb-stage.panning { cursor: grabbing; }
.lb-stage img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; transform-origin: 50% 50%; user-select: none; -webkit-user-drag: none; will-change: transform; }
.lb-side { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 1.8rem; z-index: 2; }
.lb-side.prev { left: max(10px, env(safe-area-inset-left)); } .lb-side.next { right: max(10px, env(safe-area-inset-right)); }
.lb-hint { text-align: center; font-size: .78rem; color: #A8A29E; padding: 8px 12px max(10px, env(safe-area-inset-bottom)); }
body.lb-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .gallery { scroll-behavior: auto; } }
.detail-price { font-size: 1.5rem; font-weight: 800; color: var(--primary-dark); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .9rem; margin: 0; }
.specs dt { color: var(--muted); } .specs dd { margin: 0; font-weight: 600; }
.desc { white-space: pre-line; }
.seller { display: flex; gap: 12px; align-items: center; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-weight: 800; }
.tips { background: var(--warn-soft); border-radius: var(--radius); padding: 12px 14px; font-size: .88rem; }
.tips ul { margin: 6px 0 0; padding-left: 18px; }
.sticky-cta { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 10px var(--side); margin: 16px calc(-1 * var(--side)) 0; }

/* Tabel (admin, iklan saya) */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; gap: 12px; }
.item img { width: 84px; height: 63px; object-fit: cover; border-radius: 8px; flex: none; background: var(--border); }
.item .grow { flex: 1; min-width: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.tabs a { white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .85rem; }
.tabs a.on { background: var(--primary); border-color: var(--primary); color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; color: var(--text); }
.stat b { display: block; font-size: 1.5rem; }
.stat.alert-stat b { color: var(--danger); }
.photos-edit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos-edit figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.photos-edit img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.photos-edit figcaption { padding: 4px; display: flex; gap: 4px; justify-content: center; }
.prose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.prose h2 { margin-top: 1.2em; }

footer { background: var(--primary); color: #D6D3D1; padding: 24px 0; font-size: .85rem; }
footer a { color: #D6D3D1; }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .filters { grid-template-columns: repeat(4, 1fr); }
  .photos-edit { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .detail { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: start; }
  .sticky-cta { position: static; border: 0; padding: 0; margin: 16px 0 0; background: none; }
}
.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.mt { margin-top: 16px; }
label.check + .btn, .panel form > .btn { margin-top: 16px; }
.mt-s { margin-top: 8px; }
.w-num { width: 90px; }
.or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.btn.google { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.google:hover { background: var(--bg); }
.inline-details { display: inline-block; }
.inline-details > summary { list-style: none; cursor: pointer; }
.inline-details > summary::-webkit-details-marker { display: none; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.lb-btn[disabled] { opacity: .3; cursor: default; }

/* Baris filter (satu baris; di layar kecil bisa digeser) */
.filterbar { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 0 2px; }
.filterbar::-webkit-scrollbar { display: none; }
.filterbar select, .filterbar input { flex: 0 0 auto; width: auto; min-width: 132px; min-height: 38px; padding: 6px 12px; font-size: .86rem; border-radius: 999px; background: var(--surface); }
.filterbar input[type=number] { width: 140px; }
.filterbar select[disabled] { color: var(--muted); background: var(--bg); }
.filterbar .set { border-color: var(--gold); background: var(--primary-soft); font-weight: 600; }
.fb-reset { flex: none; white-space: nowrap; font-size: .85rem; font-weight: 600; padding: 6px 4px; }
@media (min-width: 900px) {
  .filterbar { overflow: visible; }
  .filterbar select, .filterbar input, .filterbar input[type=number] { flex: 1 1 0; min-width: 0; }
}

/* Info iklan & penjual */
.facts-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.fact-chip { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); }
.fact-chip.out { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-weight: 700; }
.avatar { position: relative; }
.dot-online { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.online { color: var(--ok); font-weight: 600; }
.seller-facts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; }
.share .actions { gap: 6px; }
.seller-page { display: grid; gap: 16px; }
.sold-wrap { position: relative; opacity: .6; }
.sold-badge { position: absolute; top: 8px; right: 8px; background: var(--primary); color: var(--surface); }
@media (min-width: 900px) { .seller-page { grid-template-columns: 300px 1fr; align-items: start; } .seller-page .grid { grid-template-columns: repeat(3, 1fr); } }

/* Sidebar filter (layar besar) / baris filter (HP) */
.fb-title, .fb-head { display: none; }
.fb-price { display: contents; }
.with-sidebar .filterbar { padding-top: 0; margin-bottom: 12px; }
@media (min-width: 900px) {
  .with-sidebar { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
  .side { position: sticky; top: 64px; }
  .filterbar.vertical { flex-direction: column; align-items: stretch; gap: 6px; overflow: visible; margin: 0; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
  .filterbar.vertical select, .filterbar.vertical input, .filterbar.vertical input[type=number] { flex: none; width: 100%; min-width: 0; border-radius: 10px; }
  .filterbar.vertical .fb-title { display: block; font-weight: 800; font-size: 1rem; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
  .filterbar.vertical .fb-head { display: block; margin-top: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .filterbar.vertical .fb-price { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .filterbar.vertical .fb-reset { margin-top: 8px; text-align: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
}
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(5, 1fr); } }

/* Iklan Disponsori */
.card.sponsored { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.featured { background: var(--primary-soft); border-radius: var(--radius); padding: 12px; }
.featured h2 { margin: 0; }
.feat-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 0 2px; scrollbar-width: thin; }
.feat-row .card { flex: 0 0 44%; scroll-snap-align: start; }
@media (min-width: 640px) { .feat-row .card { flex-basis: 30%; } }
@media (min-width: 1100px) { .feat-row .card { flex-basis: calc((100% - 40px) / 5); } }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tbl th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.ended { opacity: .6; }

/* Tingkatan sponsor */
.badge.tier-1 { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.badge.tier-2 { background: var(--primary-soft); color: var(--gold-text); }
.badge.tier-3 { background: var(--gold); color: var(--primary); }
.tier-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 12px; font-size: .82rem; color: var(--muted); }
.tier-cards { display: grid; gap: 12px; margin: 16px 0; }
.tier-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.tier-card h2 { margin: 6px 0 4px; } .tier-card p { margin: 0; }
.tier-card.tier-3 { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
@media (min-width: 640px) { .tier-cards { grid-template-columns: repeat(3, 1fr); } }

/* Harga jasa & label layanan */
.price .unit, .detail-price .unit { font-weight: 600; font-size: .8em; color: var(--muted); }
.price .from, .detail-price .from { font-weight: 600; font-size: .8em; }
.chip-home { align-self: flex-start; font-size: .7rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.fact-chip.home { background: var(--ok-soft); color: var(--ok); border-color: transparent; font-weight: 600; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 12px; }
.check-grid .check { margin: 4px 0; font-size: .9rem; }
@media (min-width: 640px) { .check-grid { grid-template-columns: repeat(3, 1fr); } }

/* Jasa: status, darurat, jadwal, daftar layanan, form pesan */
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-open, .chip-sos { font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.chip-open.on { background: var(--ok-soft); color: var(--ok); }
.chip-open.off { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.chip-sos { background: var(--danger-soft); color: var(--danger); }
.fact-chip.sos { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-weight: 700; }
.fact-chip.closed { font-weight: 600; }
.tbl.pricelist, .tbl.schedule { margin: 4px 0 12px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.tbl.schedule tr.today td { font-weight: 700; background: var(--primary-soft); }
.wa-form { margin-top: 12px; display: grid; gap: 2px; }
.wa-form label { margin-top: 8px; }
.wa-form textarea { min-height: 64px; }

/* Form jasa: daftar layanan, jadwal, desa */
.pl { display: grid; gap: 6px; margin-bottom: 6px; }
.pl-row { display: grid; grid-template-columns: 1fr 120px auto; gap: 6px; }
.sch { display: grid; gap: 4px; margin: 4px 0; }
.sch-row { display: grid; grid-template-columns: 110px 1fr auto 1fr; gap: 6px; align-items: center; }
.sch-row .check { margin: 0; }
.sch-row input[type=time] { min-height: 38px; padding: 4px 8px; }
details.vil { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 6px 0; }
details.vil > summary { cursor: pointer; font-weight: 600; }
.stat7 { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; }

.card .route { font-size: .75rem; font-weight: 600; color: var(--text); }
.tbl.routes { min-width: 420px; }
.rt-row { display: grid; grid-template-columns: 1fr 1fr 96px 96px 110px auto; gap: 6px; }
@media (max-width: 640px) { .rt-row { grid-template-columns: 1fr 1fr; } }

/* Navigasi kategori */
@media (min-width: 1150px) { .cats { display: grid; grid-template-columns: repeat(13, 1fr); overflow: visible; } .cats .cat { flex: none; } }
.cats-wrap .wrap { position: relative; }
.allcats-link { display: block; text-align: right; margin-top: 6px; font-weight: 600; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--gold-text); }
.subcats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 12px; align-items: center; }
.subcats::-webkit-scrollbar { display: none; }
.subcats .sc { flex: none; white-space: nowrap; font-size: .82rem; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.subcats .sc span { color: var(--muted); font-size: .75rem; margin-left: 2px; }
.subcats .sc.on { background: var(--primary); border-color: var(--primary); color: var(--gold); font-weight: 700; }
.subcats .sc.on span { color: var(--gold); }
.subcats .sc.empty { opacity: .6; }
.subcats .sc-group { flex: none; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-left: 6px; }
@media (min-width: 900px) { .subcats { flex-wrap: wrap; overflow: visible; } }
.empty-cta { text-align: center; padding: 28px 16px; }
.empty-cta p { margin: 6px 0 14px; }
.allcats { display: grid; gap: 12px; }
@media (min-width: 640px) { .allcats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .allcats { grid-template-columns: repeat(3, 1fr); } }
.allcat h2 { font-size: 1.05rem; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.allcat h2 a { color: var(--text); } .allcat ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .9rem; }
.allcat li.grp { margin-top: 8px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.free { color: var(--ok); font-weight: 800; }
.fb-free { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .86rem; font-weight: 600; margin: 0; cursor: pointer; white-space: nowrap; }
.fb-free.set { border-color: var(--gold); background: var(--primary-soft); }
.filterbar.vertical .fb-free { border-radius: 10px; justify-content: flex-start; }

/* Pemilih kategori (form pasang iklan) */
form.picker-on .cat-selects { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cat-results { display: grid; gap: 4px; margin-top: 6px; }
.cp-hit { text-align: left; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; }
.cp-hit:hover, .cp-sub:hover, .cp-root:hover { border-color: var(--gold); }
.catpick-roots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
@media (min-width: 640px) { .catpick-roots { grid-template-columns: repeat(6, 1fr); } }
.cp-root { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; font-size: .78rem; line-height: 1.2; text-align: center; }
.cp-root .ic { font-size: 1.3rem; }
.cp-root.on { border-color: var(--gold); background: var(--primary-soft); font-weight: 700; }
.catpick-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cp-sub { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; font: inherit; font-size: .85rem; }
.cp-group { flex-basis: 100%; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 6px; }
.catpick-chosen { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--gold); background: var(--primary-soft); border-radius: 10px; }

/* Beranda */
.feat-row.plain .card { box-shadow: none; }
.row-note { margin: -4px 0 4px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold-text); cursor: pointer; font: inherit; font-weight: 600; }
.linkbtn:hover { text-decoration: underline; }
/* Checkbox "Gratis" di baris/sidebar filter: jangan ikut lebar input */
.filterbar input[type=checkbox], .filterbar.vertical input[type=checkbox] { width: auto; min-width: 0; min-height: 0; flex: none; padding: 0; margin: 0; border-radius: 4px; }
.filterbar.vertical .fb-free { width: 100%; min-height: 38px; }

/* ===== Rapikan tampilan HP (≤ 640px) ===== */
@media (max-width: 640px) {
  .cats-wrap { padding-top: 10px; }
  .cats { gap: 6px; }
  .cats .cat { flex: 0 0 70px; padding: 7px 4px; font-size: .7rem; border-radius: 10px; }
  .cat .ic { font-size: 1.2rem; margin-bottom: 2px; }
  .allcats-link { margin-top: 2px; font-size: .78rem; }
  .filterbar { padding-top: 6px; gap: 6px; }
  .filterbar select { width: 138px; min-width: 0; text-overflow: ellipsis; }
  .filterbar input[type=number] { width: 104px; }
  .section-head h2 { font-size: 1.05rem; }
  main { padding-top: 10px; }
}
.panel .specs + h2, .panel .tbl + h2, .panel .table-wrap + h2, .panel dl + h2 { margin-top: 18px; }
.mobile-cta { display: none; }
@media (max-width: 899px) {
  .mobile-cta { display: flex; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 10px max(16px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
  .mobile-cta .mc-price { flex: 1; min-width: 0; font-weight: 800; color: var(--primary); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-cta .btn { flex: none; min-height: 42px; font-size: .95rem; }
  body:has(.mobile-cta) footer { padding-bottom: 84px; }
  .detail .sticky-cta { position: static; border: 0; padding: 0; margin: 12px 0 0; background: none; }
}
