/* ==========================================================
   CHERY BANDUNG - detail.css (khusus halaman detail mobil)
   ========================================================== */
:root {
  --navy: #0b1e5b;
  --navy-dark: #07123a;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #1f9d57;
  --green-dark: #187a44;
  --text: #1b2340;
  --muted: #6b7694;
  --line: #e3e8f4;
  --bg: #f6f8fd;
  --radius: 14px;
  --header-h: 84px;
  --font: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (min-width: 768px) { :root { --header-h: 100px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: #fff; line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 768px)  { .container { padding-left: 32px; padding-right: 32px; } }
@media (min-width: 1280px) { .container { padding-left: 24px; padding-right: 24px; } }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 10px; border: 2px solid transparent;
  font: 700 0.85rem/1.2 var(--font); letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; text-align: center;
  transition: background .2s, transform .15s, box-shadow .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .nav-toggle:focus-visible, .nav-link:focus-visible { outline: 3px solid #93b4ff; outline-offset: 2px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-wa { background: var(--green); color: #fff; }
.btn-wa:hover { background: var(--green-dark); }
.btn-block { display: flex; width: 100%; }

/* ---------- Navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(11,30,91,.06);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.brand img { height: 68px; width: auto; }
@media (min-width: 768px) { .brand img { height: 84px; } }

.nav-toggle {
  width: 48px; height: 48px; padding: 0;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: #fff; border: 1.5px solid #c9d6f5; border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: var(--blue); transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav-panel {
  position: absolute; right: 16px; top: calc(100% + 8px);
  width: min(340px, calc(100vw - 32px));
  max-height: calc(100vh - var(--header-h) - 24px);
  max-height: calc(100dvh - var(--header-h) - 24px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(11,30,91,.22);
  animation: panelIn .18s ease-out;
}
.nav-panel[hidden] { display: none; }
@media (min-width: 768px) { .nav-panel { right: 32px; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.nav-link {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 14px 16px; margin-bottom: 4px;
  font: 600 1rem/1.2 var(--font); color: var(--blue);
  background: transparent; border: 0; border-radius: 10px; cursor: pointer; text-align: left;
}
.nav-link:hover, .nav-link.is-active { background: #dbe8ff; }
.nav-sub-toggle svg { transition: transform .2s; }
.nav-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-sub { margin: 0 0 6px 18px; padding-left: 8px; border-left: 2px solid var(--line); }
.nav-sub[hidden] { display: none; }
.nav-sub a { display: block; padding: 11px 14px; border-radius: 8px; color: var(--blue); font-weight: 500; }
.nav-sub a:hover { background: #eef3ff; }
.nav-panel .btn-block { margin-top: 8px; }

/* ---------- Footer & WhatsApp ---------- */
.site-footer { background: #040a22; color: #aab6dd; padding: 22px 0; text-align: center; font-size: .9rem; }
.footer-note { font-size: .78rem; opacity: .75; margin-top: 4px; }
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 900;
  background: var(--green); color: #fff; font-weight: 800; font-size: .95rem;
  padding: 14px 22px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.28);
  transition: transform .15s, background .2s;
}
.wa-float:hover { background: var(--green-dark); transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .color-slide { transition: none; }
}

/* ==========================================================
   HALAMAN DETAIL MOBIL
   ========================================================== */
.dt-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.dt-sec { padding: 40px 0; scroll-margin-top: calc(var(--header-h) + 8px); }
.dt-alt { background: var(--bg); }
.dt-center { text-align: center; }
.dt-sec h2 { color: var(--navy); font-size: 1.5rem; margin: 0 0 18px; }
.dt-small { color: #555; font-size: .88rem; line-height: 1.6; margin: 14px 0 0; }
.dt-small.dt-center { margin-bottom: 8px; }

/* hero */
.dt-hero { background: linear-gradient(#eef2fb, #fff); padding: 28px 0 32px; text-align: center; }
.dt-eyebrow { margin: 0; color: var(--blue); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.dt-hero h1 { margin: 4px 0 4px; color: var(--navy); font-size: 2.2rem; line-height: 1.1; }
.dt-tagline { margin: 0 0 8px; color: #555; font-size: 1rem; }
.dt-hero-img { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto 8px; }
.dt-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 12px; }
.dt-actions .btn { flex: 1 1 220px; max-width: 320px; }
.dt-actions-center { margin-top: 18px; }

/* harga */
.dt-price-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.dt-price-card { background: #fff; border: 1px solid #e2e8f5; border-radius: 14px; padding: 18px; }
.dt-price-card h3 { margin: 0 0 6px; color: var(--navy); font-size: 1.05rem; }
.dt-price { margin: 0 0 8px; font-size: 1.35rem; font-weight: 700; color: var(--blue); }
.dt-note { margin: 0; color: #555; font-size: .9rem; line-height: 1.55; }

/* paket sigma */
.dt-sigma { margin-top: 22px; background: #fff; border: 1px solid #d9cdef; border-left: 5px solid #8c6bbd; border-radius: 14px; padding: 20px; }
.dt-sigma h3 { color: var(--navy); font-size: 1.15rem; margin: 0 0 4px; }
.dt-sigma-price { color: var(--blue); font-weight: 700; font-size: 1.35rem; margin: 0 0 12px; }
.dt-sigma-list { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0 0 4px; }
.dt-sigma-list li { color: #333; font-size: .95rem; }
.dt-sigma-list li::before { content: "\2713"; color: var(--green); font-weight: 700; margin-right: 10px; }
.dt-sigma .btn { margin-top: 16px; width: 100%; }

/* keunggulan */
.dt-feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dt-feat-grid li { background: var(--bg); border: 1px solid #e2e8f5; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.dt-feat-grid strong { color: var(--navy); font-size: 1rem; line-height: 1.25; }
.dt-feat-grid span { color: #555; font-size: .82rem; line-height: 1.45; }

/* warna */
.color-viewer { position: relative; max-width: 760px; margin: 0 auto; }
.color-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; touch-action: pan-y; cursor: pointer; user-select: none; -webkit-user-select: none; outline-offset: 4px; }
.color-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.color-slide.is-active { opacity: 1; }
.color-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(11,30,91,.85); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.color-prev { left: 0; }
.color-next { right: 0; }
.color-name { text-align: center; margin: 6px 0 12px; color: #444; font-size: .95rem; }
.color-name strong { color: var(--navy); }
.color-swatches { display: flex; justify-content: center; gap: 14px; }
.color-swatch { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #cfd8ee; background: var(--c); cursor: pointer; padding: 0; box-shadow: inset 0 0 0 3px #fff; }
.color-swatch.is-active { border-color: var(--navy); box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--navy); }

/* spesifikasi */
.spec { background: #fff; border: 1px solid #e2e8f5; border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.spec summary { padding: 16px 18px; font-weight: 700; color: var(--navy); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.spec summary::-webkit-details-marker { display: none; }
.spec summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--blue); }
.spec[open] summary::after { content: "\2212"; }
.spec table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .85rem; }
.spec th, .spec td { padding: 10px 12px; border-top: 1px solid #eef1f8; text-align: left; vertical-align: top; line-height: 1.45; word-wrap: break-word; }
.spec thead th { background: var(--bg); color: var(--navy); }
.spec tbody th { font-weight: 400; color: #444; width: 42%; }
.spec .c { text-align: center; }
.spec .y { text-align: center; color: var(--green); font-weight: 700; }
.spec .n { text-align: center; color: #aab2c8; }
.spec-text { margin: 0; padding: 0 18px 8px; color: #555; font-size: .88rem; line-height: 1.6; }
.adas-list { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 0 18px 18px; font-size: .85rem; color: #444; }
.adas-list li::before { content: "\2713"; color: var(--green); font-weight: 700; margin-right: 8px; }

/* garansi */
.dt-warranty { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dt-warranty li { background: #fff; border: 1px solid #e2e8f5; border-radius: 14px; padding: 16px; text-align: center; }
.dt-warranty strong { display: block; color: var(--blue); font-size: 1.4rem; }
.dt-warranty span { color: #555; font-size: .82rem; line-height: 1.4; }
.dt-cta { background: #fff; }

@media (min-width: 640px) {
  .dt-feat-grid { grid-template-columns: repeat(4, 1fr); }
  .dt-warranty { grid-template-columns: repeat(4, 1fr); }
  .adas-list { grid-template-columns: 1fr 1fr; }
  .dt-sigma-list { grid-template-columns: 1fr 1fr; }
  .dt-sigma .btn { width: auto; }
}
@media (min-width: 768px) {
  .dt-sec { padding: 56px 0; }
  .dt-sec h2 { font-size: 1.9rem; }
  .dt-hero { padding: 44px 0 48px; }
  .dt-hero h1 { font-size: 3rem; }
  .dt-price-grid { grid-template-columns: repeat(3, 1fr); }
  .spec table { font-size: .92rem; }
  .color-arrow { width: 48px; height: 48px; }
}

/* ===== TAB PILIHAN (C5 Bensin / C5 CSH) ===== */
.tabs { display: flex; gap: 10px; margin: 0 0 16px; }
.tab-btn {
  flex: 1; padding: 13px 8px;
  border: 1.5px solid #c9d6f5; border-radius: 10px;
  background: #fff; color: var(--navy);
  font: 700 .92rem/1.2 var(--font); cursor: pointer;
}
.tab-btn.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-btn:focus-visible { outline: 3px solid #93b4ff; outline-offset: 2px; }
.color-swatch[hidden] { display: none; }
.color-swatches { flex-wrap: wrap; }
.spec-panel[hidden] { display: none; }
.dt-price-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .dt-price-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .dt-price-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) { .tab-btn { flex: 0 1 260px; } .tabs { justify-content: center; } }

/* ===== Penyesuaian jumlah kartu ===== */
.dt-price-2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .dt-price-2 { grid-template-columns: 1fr 1fr; max-width: 760px; } }
.dt-warranty-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .dt-warranty-3 { grid-template-columns: repeat(3, 1fr); } }

/* ===== Tabel 3 kolom (Comfort / Premium / Turbo) ===== */
.spec-3 table { font-size: .78rem; }
.spec-3 th, .spec-3 td { padding: 9px 6px; }
.spec-3 tbody th { width: 34%; padding-left: 12px; }
@media (min-width: 768px) {
  .spec-3 table { font-size: .9rem; }
  .spec-3 th, .spec-3 td { padding: 10px 12px; }
}

/* ===== Penyesuaian jumlah kartu (1 harga, 5 garansi) ===== */
.dt-price-1 { grid-template-columns: 1fr; max-width: 520px; }
.dt-warranty-5 { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .dt-warranty-5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .dt-warranty-5 { grid-template-columns: repeat(5, 1fr); } }

/* ===== Pengaman menu HP ===== */
.nav-panel[hidden], .nav-sub[hidden] { display: none !important; }
.nav-toggle { position: relative; z-index: 60; cursor: pointer; }

/* ===== Garansi 4 kotak ===== */
.dt-warranty-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .dt-warranty-4 { grid-template-columns: repeat(4, 1fr); } }

/* ===== Navbar lebih ramping ===== */
:root { --header-h: 50px; }
@media (min-width: 768px) { :root { --header-h: 60px; } }
.brand img { height: 75px; width: auto; }
@media (min-width: 768px) { .brand img { height: 75px; } }
