/* ==========================================================================
   Jitcar — VDP template layer (/car/{slug})
   Gallery, title, spec tiles, the record, window-sticker payment block,
   sticky rail, dealer card, mobile paybar, similar-vehicles module.
   Anatomy per design/reference/ v3 boards (D3 desktop, frame 04 mobile).
   ========================================================================== */

.vdp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 20px;
  padding: 18px 28px 38px;
  align-items: start;
  max-width: 1260px;
  margin: 0 auto;
}
.vdp-main { min-width: 0; }

/* --- Sold state (SEO.md §3): honest label, no shame ---------------------- */
.soldbar {
  background: var(--fill-quiet);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius-field);
  padding: 10px 14px;
  font-weight: var(--w-bold);
  font-size: var(--fs-sm);
  margin-bottom: 12px;
}

/* --- Gallery -------------------------------------------------------------- */
.gstage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 352px;
  padding-bottom: 30px;
  background: var(--stage);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.gstage::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--lane);
  opacity: .85;
}
.gstage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}
.circ {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--overlay-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 0;
  cursor: pointer;
  z-index: 2;
}
.circ .ico { width: 17px; height: 17px; }
.circ.l { left: 12px; }
.circ.r { right: 12px; }
.gfav { top: 14px; right: 14px; transform: none; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.thumb {
  position: relative;
  height: 56px;
  background: var(--stage);
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { border-color: var(--lane); }
.thumb i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-style: normal;
  font-size: var(--fs-2xs);
  font-weight: var(--w-bold);
  color: #fff;
  background: rgba(35, 38, 43, .55);
}

/* --- Title + spec tiles --------------------------------------------------- */
.vtitle { margin: 16px 2px 0; }
.vtitle h2 {
  font-size: var(--fs-xl);
  font-weight: var(--w-black);
  letter-spacing: -.012em;
}

.specrow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 13px;
}
.spec {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-field);
  padding: 10px 4px;
  text-align: center;
}
.spec .ico {
  width: 17px;
  height: 17px;
  margin: 0 auto 4px;
  color: var(--steel);
}
.spec b {
  display: block;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: var(--w-bold);
}
.spec span { font-size: var(--fs-2xs); color: var(--steel); }

/* --- The record ----------------------------------------------------------- */
.mrows {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  margin-top: 13px;
  overflow: hidden;
}
.mrow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  padding: 10px 14px;
  border-bottom: 1px dashed var(--hairline-2);
  color: var(--steel);
}
.mrow:last-child { border-bottom: 0; }
.mrow b {
  color: var(--asphalt);
  font-weight: var(--w-bold);
  text-align: right;
}
.mrow b.good { color: var(--guide); } /* verified truth only */

.star {
  width: 12px;
  height: 12px;
  fill: var(--asphalt);
  stroke: none;
  display: inline-block;
  vertical-align: -1px;
}

/* --- Sticky rail: the thumb zone of the big screen (§7) ------------------- */
.rail {
  position: sticky;
  top: 14px;
}

/* The window-sticker payment block */
.sticker {
  background: #fff;
  border: 2px solid var(--asphalt);
  border-radius: var(--radius-field);
  overflow: hidden;
}
.sticker-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--asphalt);
  color: #fff;
  padding: 7px 13px;
}
.sticker-top b {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.sticker-top span {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--lane);
}
.sticker-pay {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 14px 4px;
  flex-wrap: wrap;
}
.sticker-pay b {
  font-family: var(--mono);
  font-size: var(--fs-3xl);
  font-weight: var(--w-bold);
  letter-spacing: -.02em;
  /* estimate state: asphalt. The budget flip adds .fit → guide green
     (verified only). */
}
.sticker-pay b.fit { color: var(--guide); }
.sticker-terms {
  display: flex;
  gap: 12px;
  padding: 2px 14px 12px;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--steel);
  flex-wrap: wrap;
}
.sticker-math {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px dashed var(--hairline-2);
  padding: 9px 14px;
  font-size: var(--fs-xs);
}
.sticker-math u {
  font-weight: var(--w-bold);
  text-decoration: none;
  border-bottom: 2px solid var(--lane);
  cursor: pointer;
}

.trust {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  justify-content: center;
  font-size: var(--fs-xs);
  color: var(--steel);
  margin-top: 10px;
  text-align: center;
}
.trust .ico {
  width: 14px;
  height: 14px;
  color: var(--guide);
  margin-top: 1px;
}

.dealercard {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  margin-top: 14px;
  padding: 13px 15px;
}
.dealercard > b {
  font-size: var(--fs-sm);
  font-weight: var(--w-extrabold);
  display: block;
}
.dealercard .vmeta { margin-top: 4px; }
.hist {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--guide-bg);
  border: 1px solid var(--guide-border);
  border-radius: var(--radius-field);
  padding: 9px 11px;
  margin-top: 10px;
  font-size: var(--fs-xs);
}
.hist .ico {
  color: var(--guide);
  width: 15px;
  height: 15px;
  flex: none;
}
.hist b { color: var(--guide); }

/* --- Similar vehicles ------------------------------------------------------ */
.similar { margin-top: 22px; }
.similar h3 { margin-bottom: 10px; }
.similar .srp-grid { grid-template-columns: repeat(3, 1fr); }

/* --- Mobile paybar — the thumb zone (frame 04) ----------------------------- */
.paybar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  align-items: center;
  gap: 12px;
  background: var(--asphalt);
  color: #fff;
  padding: 12px 16px;
}
.paybar b {
  display: block;
  font-family: var(--mono);
  font-size: var(--fs-lg);
  font-weight: var(--w-bold);
  line-height: 1.05;
  color: var(--lane);
}
.paybar span {
  font-size: var(--fs-2xs);
  color: var(--steel-2);
}
.paybar .grow { flex: 1; }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 1000px) {
  .vdp { grid-template-columns: 1fr; padding: 12px 14px 96px; }
  .rail { position: static; }
  .gstage { height: 240px; padding-bottom: 22px; }
  .thumbs { grid-template-columns: repeat(6, 1fr); }
  .specrow { grid-template-columns: repeat(2, 1fr); }
  .similar .srp-grid { grid-template-columns: 1fr; }
  .paybar { display: flex; }
}
