:root{--red:#d32f2f;--red-d:#b71c1c;--red-l:#fdecec;--ink:#1f2937;--muted:#6b7280;--line:#e5e7eb;--bg:#f5f6f8;--card:#fff;--k:#d32f2f;--t:#f59e0b;--d:#2563eb;--head:64px}
*{box-sizing:border-box}
html,body{margin:0}
body{min-height:100dvh}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
button{font:inherit;cursor:pointer}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-weight:600;font-size:14px;text-decoration:none;white-space:nowrap}
.btn:hover{border-color:#cbd5e1}
.btn svg{width:18px;height:18px;fill:currentColor}
.btn.primary{background:var(--red);border-color:var(--red);color:#fff}
.btn.primary:hover{background:var(--red-d)}
.btn.sm{padding:7px 10px;font-size:13px;border-radius:9px}
.btn.wa{color:#15803d;border-color:#bbf7d0;background:#f0fdf4}
.muted{color:var(--muted);font-size:13px}

.top{position:sticky;top:0;z-index:2000;height:var(--head);display:flex;align-items:center;gap:14px;padding:0 18px;background:#fff;border-bottom:1px solid var(--line)}
.brand{flex:0 0 388px}
.logo{display:inline-block}
.logo img{height:30px;display:block}
.search{position:relative;flex:1;max-width:760px;display:flex;align-items:center}
.top-right{margin-left:auto;display:flex;align-items:center;gap:8px}
.stat{font-size:13px;color:var(--muted);white-space:nowrap;margin-right:4px}
.stat b{color:var(--ink)}
.search .ico{position:absolute;left:12px;width:18px;height:18px;fill:var(--muted);pointer-events:none}
.search input{width:100%;height:42px;padding:0 38px 0 38px;border:1px solid var(--line);border-radius:12px;background:var(--bg);font-size:15px;outline:none}
.search input:focus{border-color:var(--red);background:#fff;box-shadow:0 0 0 3px rgba(211,47,47,.12)}
.search input::-webkit-search-cancel-button{display:none}
.clear{position:absolute;right:6px;width:30px;height:30px;border:0;border-radius:8px;background:transparent;font-size:20px;color:var(--muted)}
.suggest{position:absolute;top:48px;left:0;right:0;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 16px 40px rgba(0,0,0,.14);overflow:hidden;max-height:60vh;overflow-y:auto}
.suggest .grp{padding:8px 12px 4px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.suggest button{display:flex;justify-content:space-between;gap:10px;width:100%;padding:9px 12px;border:0;background:#fff;text-align:left;font-size:14px}
.suggest button:hover,.suggest button.on{background:var(--red-l)}
.suggest small{color:var(--muted)}
.locate span{display:inline}

.layout{display:grid;grid-template-columns:420px minmax(0,1fr);height:calc(100dvh - var(--head))}
.panel{display:flex;flex-direction:column;min-height:0;background:#fff;border-right:1px solid var(--line)}
.filters{padding:12px 14px 8px;border-bottom:1px solid var(--line)}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;font-size:13px;font-weight:600;color:#374151}
.chip.on{background:var(--red);border-color:var(--red);color:#fff}
.chip.on .dot{box-shadow:0 0 0 2px #fff}
.cm-wrap{position:relative;display:inline-flex;align-items:center;gap:4px}
.help{width:22px;height:22px;border-radius:50%;border:0;background:#111827;color:#fff;font-size:12px;font-weight:800;line-height:22px;padding:0}
.tip{position:absolute;left:0;top:calc(100% + 8px);z-index:1200;width:260px;padding:10px 12px;border-radius:10px;background:#111827;color:#fff;font-size:12.5px;line-height:1.45;box-shadow:0 12px 30px rgba(0,0,0,.25);opacity:0;visibility:hidden;transform:translateY(-4px);transition:.15s}
.tip::before{content:"";position:absolute;top:-6px;left:150px;border:6px solid transparent;border-top:0;border-bottom-color:#111827}
.cm-wrap:hover .tip,.help:focus+.tip,.cm-wrap.tip-open .tip{opacity:1;visibility:visible;transform:none}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%}
.dot.k{background:var(--k)}.dot.t{background:var(--t)}.dot.d{background:var(--d)}
.products{margin-top:10px}
.products summary{display:flex;justify-content:space-between;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:13px;font-weight:700;color:var(--red-d)}
.products summary::-webkit-details-marker{display:none}
.products summary::after{content:"▾";color:var(--muted)}
.products[open] summary::after{content:"▴"}
.products summary b{font-weight:600;color:var(--ink);margin-left:auto;font-size:12px}
.product-strip{display:flex;gap:8px;overflow-x:auto;padding:10px 0 4px;scroll-snap-type:x proximity}
.product{flex:0 0 104px;scroll-snap-align:start;border:1px solid var(--line);border-radius:12px;background:#fff;padding:6px;text-align:center;font-size:11.5px;font-weight:600;line-height:1.25}
.product img{width:100%;height:64px;object-fit:contain;display:block;margin-bottom:4px}
.product.on{border-color:var(--red);box-shadow:0 0 0 2px rgba(211,47,47,.2)}

.result-head{padding:10px 14px;border-bottom:1px solid var(--line);background:#fcfcfd}
.meta{font-size:13px;color:var(--muted)}
.meta b{color:var(--ink)}
.active-filters{display:flex;gap:6px;flex-wrap:wrap}
.active-filters:not(:empty){margin-top:6px}
.tag{display:inline-flex;align-items:center;gap:4px;padding:3px 4px 3px 9px;border-radius:999px;background:var(--red-l);color:var(--red-d);font-size:12px;font-weight:600}
.tag button{border:0;background:transparent;color:inherit;font-size:15px;line-height:1;padding:0 4px}

.list{flex:1;overflow-y:auto;padding:10px 12px 20px}
.card{padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;margin-bottom:10px;cursor:pointer;transition:border-color .15s,box-shadow .15s}
.card:hover,.card.on{border-color:#f3b4b4;box-shadow:0 6px 18px rgba(0,0,0,.06)}
.card h3{margin:0;font-size:15.5px;line-height:1.3;display:flex;gap:8px;align-items:flex-start;justify-content:space-between}
.card .dist{flex:0 0 auto;font-size:12.5px;font-weight:700;color:var(--red-d);background:var(--red-l);padding:2px 8px;border-radius:999px}
.badges{display:flex;gap:5px;flex-wrap:wrap;margin:6px 0}
.badge{font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:999px;border:1px solid var(--line);color:#374151;background:#fff}
.badge.k{color:var(--k);border-color:#f8caca}.badge.t{color:#b45309;border-color:#fde3b0}.badge.d{color:var(--d);border-color:#c7d7fb}
.badge.cm{background:#111827;border-color:#111827;color:#fff}
.badge.prod{background:#ecfdf5;border-color:#bbf7d0;color:#166534}
.badge.prod-old{background:#f9fafb;border-color:#e5e7eb;color:#6b7280}
.addr{font-size:13px;color:#4b5563;line-height:1.45;margin:0}
.actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.empty{padding:22px 10px;text-align:center}
.empty h4{margin:0 0 6px;font-size:16px}
.cta{padding:16px;border-radius:14px;background:linear-gradient(135deg,#fff5f5,#fff);border:1px solid #f8d0d0;margin-bottom:12px}
.cta h4{margin:0 0 4px;font-size:16px}
.cta p{margin:0 0 10px;color:#4b5563;font-size:13.5px}
.city-grid{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.more{display:block;width:100%;margin-top:4px}

/* isolation: z-index Leaflet (pane 400, kontrol 1000) tidak bisa menimpa header saat di-scroll */
.map-wrap{position:relative;min-height:0;isolation:isolate}
.stock-note{display:inline-flex;align-items:center;gap:5px;color:#92400e;font-size:12px}
.stock-note svg{width:14px;height:14px;fill:currentColor;flex:0 0 auto}
#map{position:absolute;inset:0;background:#e5e7eb}
.legend{position:absolute;left:12px;bottom:22px;z-index:500;display:flex;gap:10px;padding:7px 11px;background:rgba(255,255,255,.95);border:1px solid var(--line);border-radius:10px;font-size:12px;font-weight:600}
.legend span{display:inline-flex;align-items:center;gap:5px}
.floating{display:none}

.pin{width:26px;height:26px;margin:-26px 0 0 -13px}
.pin svg{width:26px;height:26px;filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.35))}
.me{width:18px;height:18px;margin:-9px 0 0 -9px;border-radius:50%;background:#2563eb;border:3px solid #fff;box-shadow:0 0 0 6px rgba(37,99,235,.25)}
.marker-cluster{background:rgba(211,47,47,.18);border-radius:50%;background-clip:padding-box}
.marker-cluster div{width:30px;height:30px;margin-left:5px;margin-top:5px;border-radius:50%;text-align:center;line-height:30px;background:var(--red);color:#fff;font-weight:700;font-size:12px;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.marker-cluster-medium{background:rgba(183,28,28,.2)}
.marker-cluster-medium div{background:#c62828}
.marker-cluster-large{background:rgba(127,29,29,.22)}
.marker-cluster-large div{background:#991b1b}
.leaflet-popup-content{margin:12px 14px;font-family:inherit}
.pop h4{margin:0 0 4px;font-size:14.5px}
.pop p{margin:0 0 8px;font-size:12.5px;color:#4b5563}
.pop .actions{margin-top:6px}
.pop .btn{padding:6px 9px;font-size:12.5px}
.pop .btn.primary{color:#fff}

.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:3000;background:#111827;color:#fff;padding:10px 16px;border-radius:10px;font-size:14px;box-shadow:0 10px 30px rgba(0,0,0,.25)}

@media (max-width:1250px){.stat{display:none}}
@media (max-width:1100px){#btnAll span{display:none}}
@media (max-width:900px){
  :root{--head:auto}
  .top{flex-wrap:wrap;height:auto;padding:10px 12px;gap:8px}
  .brand{flex:0 0 auto}
  .logo img{height:24px}
  .search{order:3;flex:1 0 100%;max-width:none}
  .top-right .btn{padding:7px 11px}
  .tip{left:auto;right:-8px}
  .tip::before{left:auto;right:12px}
  .layout{display:flex;flex-direction:column;height:auto}
  .map-wrap{order:-1;height:46vh;min-height:260px}
  .panel{border-right:0}
  .list{overflow:visible;padding-bottom:80px}
  .legend{bottom:26px;left:10px;font-size:11px;gap:8px;padding:6px 9px}
  .floating{display:inline-flex;position:absolute;right:10px;bottom:26px;z-index:500;box-shadow:0 6px 16px rgba(0,0,0,.18)}
  .product{flex-basis:92px}
}
@media (max-width:420px){.locate span{display:none}}

/* Softer road map; only tiles are filtered, pins and controls keep brand colors. */
.clean-basemap{filter:saturate(.30) brightness(1.045) contrast(.94)}

.map-provider-note{position:absolute;z-index:1100;top:12px;left:60px;right:12px;background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:10px;font-size:13px;color:#92400e}
