/* ============================================================
   Showroom Kendaraan — storefront (dark premium automotive)
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0A0C11;
  --bg2: #10141C;
  --card: #161B24;
  --card2: #1C222C;
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .16);
  --ink: #EEF2F8;
  --mut: #98A3B3;
  --red: #E11D2E;
  --red2: #FF4757;
  --grad: linear-gradient(135deg, #FF3B4E 0%, #C1121F 100%);
  --metal: linear-gradient(120deg, #E9EDF3 0%, #AAB4C2 45%, #F3F6FA 100%);
  --radius: 16px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .6);
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 560px at 86% -14%, rgba(225, 29, 46, .22), transparent 62%),
    radial-gradient(820px 520px at -12% 18%, rgba(70, 84, 110, .35), transparent 58%),
    radial-gradient(700px 520px at 50% 116%, rgba(193, 18, 31, .16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: rgba(10, 12, 17, .82);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1200px; margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: var(--grad);
  box-shadow: 0 8px 20px rgba(225, 29, 46, .38);
  display: grid; place-items: center; color: #fff; font-size: 21px;
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11px; color: var(--mut); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.cart-btn {
  position: relative; border: 1px solid rgba(255, 255, 255, .12);
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .05); color: var(--ink);
  font-weight: 700; font-size: 14px;
  padding: 10px 16px; border-radius: 999px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.cart-btn:hover { background: rgba(255, 255, 255, .1); border-color: var(--line2); transform: translateY(-1px); }
.cart-btn svg { width: 18px; height: 18px; }
.cart-badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 999px; background: var(--grad); color: #fff;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  border: 2px solid #0A0C11;
  transform: scale(0); transition: transform .18s ease;
}
.cart-badge.show { transform: scale(1); }

/* ---------- hero ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 26px 18px 80px; }
.hero {
  position: relative; overflow: hidden;
  border-radius: 24px; padding: 38px 28px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 92% 0%, rgba(225, 29, 46, .28), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: "🏁"; position: absolute; right: 6px; bottom: -30px;
  font-size: 150px; opacity: .07; transform: rotate(-8deg); pointer-events: none;
}
.hero-in { position: relative; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #FFB3BA; border: 1px solid rgba(255, 71, 87, .32);
  background: rgba(225, 29, 46, .14); padding: 6px 13px; border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(24px, 4.4vw, 40px); font-weight: 900; letter-spacing: -.025em;
  line-height: 1.12; margin-bottom: 10px;
  background: var(--metal); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #E9EDF3;
}
.hero p { color: var(--mut); max-width: 560px; font-size: 15px; }
.hero .steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero .step {
  font-size: 12.5px; font-weight: 700; color: #E7EBF1;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px;
}

/* ---------- filters ---------- */
.filters { margin-bottom: 20px; display: flex; flex-direction: column; gap: 12px; }
.filter-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.filter-label {
  flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mut); width: 46px;
}
.cat-filter {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cat-filter::-webkit-scrollbar { display: none; }
.chip {
  flex: none; white-space: nowrap;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); color: #C6CEDA;
  font-weight: 700; font-size: 13px; padding: 8px 16px; border-radius: 999px;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease, border-color .15s ease;
}
.chip:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.chip:active { transform: scale(.97); }
.chip.on {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(225, 29, 46, .38);
}
.chip.jenis.on { background: var(--metal); color: #14171D; box-shadow: 0 6px 18px rgba(255, 255, 255, .12); }
.filter-empty { text-align: center; color: var(--mut); padding: 50px 10px; font-size: 14px; }
.filter-empty .big { font-size: 38px; display: block; margin-bottom: 8px; }

/* ---------- grid ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.section-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.section-head .count { color: var(--mut); font-size: 13px; font-weight: 600; }
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.pcard {
  background: linear-gradient(170deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .32);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line2); }
.pimg { position: relative; aspect-ratio: 4 / 3; background: #0E1219; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pcard:hover .pimg img { transform: scale(1.04); }
.pimg .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 46px; opacity: .55; }
.badge-jenis {
  position: absolute; top: 12px; left: 12px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(10, 12, 17, .78); border: 1px solid var(--line2); color: #E7EBF1;
  backdrop-filter: blur(6px);
}
.badge-kondisi {
  position: absolute; top: 12px; right: 12px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; color: #fff;
  background: var(--grad); box-shadow: 0 4px 12px rgba(225, 29, 46, .4);
}
.badge-kondisi.baru { background: var(--metal); color: #14171D; box-shadow: none; }
.pbody { display: flex; flex-direction: column; gap: 12px; padding: 16px; flex: 1; }
.pbody h3 { font-size: 15.5px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; }
.specs span {
  font-size: 11px; font-weight: 700; color: #AFBAC9;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 8px; white-space: nowrap;
}
.pdesc { font-size: 12.5px; color: var(--mut); line-height: 1.55; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; }
.price { font-size: 18px; font-weight: 900; color: #fff; white-space: nowrap; letter-spacing: -.02em; }
.stock { font-size: 11.5px; color: var(--mut); font-weight: 700; white-space: nowrap; }
.add {
  border: none; width: 100%;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 13.5px;
  padding: 11px 12px; border-radius: 12px;
  box-shadow: 0 8px 18px rgba(225, 29, 46, .3);
  transition: filter .15s ease, transform .1s ease;
}
.add:hover { filter: brightness(1.08); }
.add:active { transform: scale(.98); }
.add:disabled { background: #262C36; color: #6C7686; box-shadow: none; cursor: not-allowed; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  background: rgba(10, 12, 17, .7);
  text-align: center; padding: 20px; color: var(--mut); font-size: 12.5px;
}
footer a { font-weight: 700; color: #FF8A94; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- cart drawer ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 6, 9, .62);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(440px, 100vw);
  background: #10141C;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform .26s cubic-bezier(.32, .72, .28, 1);
}
.drawer.show { transform: none; }
@media (max-width: 640px) { .drawer { width: 100vw; } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 17px; font-weight: 800; }
.icon-btn {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--ink);
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.empty-cart { text-align: center; color: var(--mut); padding: 48px 0; font-size: 14px; }
.empty-cart .big { font-size: 46px; display: block; margin-bottom: 8px; }
.cart-item { display: flex; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.cart-item img, .cart-item .thumb-ph {
  width: 68px; height: 68px; border-radius: 12px; object-fit: cover; flex: none;
  background: #1A2029;
}
.cart-item .thumb-ph { display: grid; place-items: center; font-size: 26px; }
.ci-main { flex: 1; min-width: 0; }
.ci-name { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.ci-price { font-size: 12.5px; color: #FF8A94; font-weight: 700; margin-top: 3px; }
.ci-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.qty { display: inline-flex; align-items: center; gap: 2px; background: rgba(255, 255, 255, .06); border-radius: 10px; padding: 3px; }
.qty button {
  width: 26px; height: 26px; border: none; border-radius: 8px;
  background: rgba(255, 255, 255, .1); color: var(--ink); font-weight: 800; font-size: 15px;
}
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty span { min-width: 26px; text-align: center; font-weight: 800; font-size: 13px; }
.ci-sub { font-size: 13px; font-weight: 800; color: #fff; }
.ci-rm { border: none; background: none; color: #6C7686; font-size: 17px; line-height: 1; padding: 4px; }
.ci-rm:hover { color: #FF4757; }

.drawer-foot { border-top: 1px solid var(--line); padding: 15px 18px; background: #0C1017; }
.sum-line { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 15px; margin-bottom: 12px; color: var(--mut); }
.sum-line .v { color: #fff; font-size: 20px; }
.btn-wa {
  width: 100%; border: none; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(135deg, #25D366, #128C7E); color: #fff;
  font-weight: 800; font-size: 15px; padding: 14px 16px; border-radius: 14px;
  box-shadow: 0 10px 24px rgba(18, 140, 126, .32);
  transition: filter .15s ease;
}
.btn-wa:hover { filter: brightness(1.06); }
.btn-wa svg { width: 20px; height: 20px; }

/* ---------- checkout modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 110;
  display: none; align-items: center; justify-content: center; padding: 18px;
  background: rgba(4, 6, 9, .7); backdrop-filter: blur(5px);
}
.modal.show { display: flex; }
.modal-card {
  background: #12161F; border: 1px solid var(--line2); border-radius: 20px;
  width: min(500px, 100%); max-height: 92vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); padding: 24px;
}
.modal-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.modal-card .sub { color: var(--mut); font-size: 13px; margin-bottom: 16px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: #CBD3DE; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line2); background: #0C1017;
  border-radius: 12px; padding: 11px 13px; font-size: 14.5px; color: var(--ink);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #5D6779; }
.field input:focus, .field textarea:focus { border-color: var(--red2); box-shadow: 0 0 0 3px rgba(255, 71, 87, .16); }
.field textarea { resize: vertical; min-height: 68px; }
.ck-summary {
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; max-height: 160px; overflow-y: auto;
}
.ck-summary .row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; color: var(--mut); }
.ck-summary .row b { font-weight: 800; color: #fff; }
.ck-err { display: none; background: rgba(220, 38, 38, .14); border: 1px solid rgba(248, 113, 113, .4); color: #FCA5A5; font-size: 13px; font-weight: 600; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; white-space: pre-line; }
.ck-err.show { display: block; }
.ck-actions { display: flex; gap: 10px; }
.btn-ghost {
  flex: 1; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); color: #CBD3DE;
  font-weight: 700; font-size: 14px; padding: 13px; border-radius: 14px;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-wa { flex: 2.4; padding: 13px 14px; }
.btn-wa:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 200;
  transform: translate(-50%, 20px);
  background: #1E242E; color: #fff; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line2);
  padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* floating buttons */
.fab {
  position: fixed; right: 16px; bottom: 92px; z-index: 60;
  border: none; width: 56px; height: 56px; border-radius: 18px;
  background: var(--grad); color: #fff;
  display: none; place-items: center;
  box-shadow: 0 14px 30px rgba(225, 29, 46, .45);
}
.fab.show { display: grid; }
.fab svg { width: 24px; height: 24px; }
.fab .cart-badge { top: -4px; right: -4px; border-color: #0A0C11; }

.cs-wa {
  position: fixed; right: 16px; bottom: 16px; z-index: 45;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 28px rgba(18, 140, 126, .42);
  transition: transform .16s ease, box-shadow .16s ease;
}
.cs-wa:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(18, 140, 126, .5); }
.cs-wa:active { transform: scale(.96); }
.cs-wa svg { width: 30px; height: 30px; }
@media (max-width: 899px) {
  .cs-wa { width: 54px; height: 54px; }
  .cs-wa svg { width: 28px; height: 28px; }
  .fab { bottom: 90px; }
}
@media (min-width: 900px) { .fab { display: none !important; } }
