/* Car page (car/index.html). Builds on site.css + home.css. */
.car-wrap {
  max-width: 1200px; margin: 0 auto; padding: 16px 24px 32px;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start;
}
.car-wrap > .msg { grid-column: 1 / -1; padding: 80px 16px; }
.car-main, .car-side { display: grid; gap: 16px; min-width: 0; }
.crumbs { font-size: 13px; color: #5b6573; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--navy); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.box { background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: 0 2px 10px rgba(16,30,54,.07); }
.box > h2 { margin: 0 0 12px; font-size: 18px; color: var(--navy); }
.box h3 { margin: 14px 0 6px; font-size: 15px; color: #16202c; }
.muted { color: #6b7480; }
.small { font-size: 13px; }

/* gallery */
.gallery { display: grid; gap: 8px; }
.g-main { position: relative; aspect-ratio: 4 / 3; background: #dfe3e9; border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.g-main.empty { cursor: default; }
.g-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-count { position: absolute; bottom: 10px; inset-inline-end: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; padding: 2px 10px; border-radius: 12px; direction: ltr; }
.g-prev, .g-next {
  position: absolute; top: calc(50% - 22px); width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); color: var(--navy); font-size: 30px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding-bottom: 4px; box-shadow: 0 3px 12px rgba(0,0,0,.25);
}
.g-prev { inset-inline-start: 12px; }
.g-next { inset-inline-end: 12px; }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.g-thumbs button { flex: 0 0 88px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: #dfe3e9; opacity: .7; }
.g-thumbs button[aria-current="true"] { border-color: var(--orange); opacity: 1; }
.g-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* video */
.video { display: flex; align-items: center; gap: 12px; background: #fff4e5; color: var(--navy); border-radius: 14px; padding: 12px 16px; text-decoration: none; }
.video svg { color: var(--orange); flex: none; }
.video small { display: block; color: #6b7480; }

/* specs */
.specs { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-radius: 10px; overflow: hidden; }
.specs dt, .specs dd { margin: 0; padding: 10px 14px; }
.specs dt { color: #5b6573; }
.specs dd { font-weight: 700; text-align: end; }
.specs dt:nth-of-type(odd), .specs dd:nth-of-type(odd) { background: #f1f4f8; }

/* body check */
.panels, .docs, .feats, .qa { list-style: none; margin: 0; padding: 0; }
.panels li { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.panels li > span:nth-child(2) { flex: 1; }
.panels .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.panels .st-painted .dot { background: #B7791F; } .panels .st-painted b { color: #B7791F; }
.panels .st-replaced .dot { background: #DD6B20; } .panels .st-replaced b { color: #DD6B20; }
.panels .st-hit .dot { background: #C53030; } .panels .st-hit b { color: #C53030; }
.panels .ok { color: var(--navy); }

/* documents */
.docs li { padding: 6px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.docs a { color: var(--orange); font-weight: 700; }
.tag-expired { background: #fde2e1; color: #a61b1b; font-size: 12px; padding: 1px 8px; border-radius: 10px; }

/* features */
.feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 16px; }
.feats li { display: flex; align-items: center; gap: 6px; }
.feats svg { color: var(--navy); flex: none; }

.desc { margin: 0; white-space: pre-line; line-height: 1.8; }

/* questions */
.qa li { padding: 10px 0; border-top: 1px solid #edf0f4; }
.qa li:first-child { border-top: 0; padding-top: 0; }
.qa .q { margin: 0; font-weight: 600; }
.qa .a { margin: 4px 0 0; color: #33404f; }

/* side card */
.sticky { position: sticky; top: 16px; }
.car-side h1 { margin: 0; font-size: 22px; line-height: 1.4; color: #16202c; }
.price-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.price-row .price { color: var(--orange); font-size: 28px; font-weight: 800; }
.price-row .sold-price { text-decoration: line-through; color: #8a93a0; }
.chip { background: #eef3f9; color: var(--navy); border-radius: 14px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.when { margin: 6px 0 0; font-size: 13px; }
.sold { background: #fdecec; border: 1px solid #c62828; color: #8e1c1c; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.sold b { color: #c62828; font-size: 16px; }
.insight { margin-top: 14px; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.insight b { display: block; font-size: 15px; }
.insight.v-good { background: #E6F4EA; color: #1E7B34; }
.insight.v-fair { background: #E8F0FE; color: #1A56C4; }
.insight.v-high { background: #FFF4E5; color: #B35C00; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.badges span { display: inline-flex; align-items: center; gap: 4px; background: #eef6f0; color: #1e6b34; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 14px; }
.contact { display: grid; gap: 10px; margin-top: 16px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; border-radius: 10px; padding: 12px; cursor: pointer; border: 0;
}
.btn.primary { background: var(--orange); color: #fff; }
.btn.primary:hover { background: #ff7a0d; }
.btn.wa { background: #1fa855; color: #fff; }
.btn.wa:hover { background: #18934a; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid #c9d0db; margin-top: 10px; font-size: 15px; padding: 9px; }
.btn.ghost:hover { border-color: var(--navy); }
.contact + .small { margin: 8px 0 0; text-align: center; }

/* seller */
.seller { display: flex; align-items: center; gap: 12px; }
.seller img, .seller .initial { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.seller .initial { display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 22px; font-weight: 700; }
.seller b { display: flex; align-items: center; gap: 4px; font-size: 16px; }
.seller b svg { color: #1a73e8; }

/* monthly estimate */
.calc summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-weight: 700; color: var(--navy); }
.calc summary::-webkit-details-marker { display: none; }
.calc .monthly { color: var(--orange); white-space: nowrap; }
.calc[open] summary { margin-bottom: 12px; }
.calc input[type=range] { width: 100%; accent-color: var(--orange); margin: 6px 0 10px; }
.calc .lbl { display: block; margin: 8px 0 6px; }
.calc .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.calc .chips button { font: inherit; font-size: 13px; border: 1.5px solid #c9d0db; background: #fff; border-radius: 14px; padding: 3px 12px; cursor: pointer; }
.calc .chips button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.calc input[type=number] { display: block; margin-top: 4px; width: 120px; font: inherit; padding: 6px 10px; border: 1.5px solid #c9d0db; border-radius: 8px; }
.calc .muted { margin: 10px 0 0; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; }
.lightbox button { position: absolute; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 30px; cursor: pointer; display: grid; place-items: center; padding-bottom: 4px; }
.lightbox button:hover { background: rgba(255,255,255,.3); }
.lb-close { top: 16px; inset-inline-end: 16px; }
.lb-prev { top: calc(50% - 24px); inset-inline-start: 16px; }
.lb-next { top: calc(50% - 24px); inset-inline-end: 16px; }
.lb-count { position: absolute; bottom: 18px; color: #fff; direction: ltr; }

.car-similar { padding-top: 8px; }

@media (max-width: 960px) {
  .car-wrap { grid-template-columns: 1fr; padding: 12px 16px 24px; }
  .sticky { position: static; }
  /* Phone order: photos, then price + contact, then the details. */
  .car-main, .car-side { display: contents; }
  .car-wrap { gap: 14px; }
  .crumbs { order: -3; }
  .gallery { order: -2; }
  .car-side > * { order: -1; }
}
@media (max-width: 640px) {
  .specs { grid-template-columns: 1fr auto; }
  .box { padding: 14px; }
  .g-main { border-radius: 10px; }
}
