/**
 * /buy/<slug>/ Phase C — Carwow-style PDP for a single EV/PHEV model.
 * Top half: model gallery + specs + new-car CTA
 * Bottom half: real used inventory carousel from buy-used-listings.json
 */

.ax-buy-pdp {
  --ink: #232A25;
  --red: #DC2626;
  --red-dark: #B91C1C;
  --red-soft: #FFE6E6;
  --paper: #fff;
  --paper-soft: #F2F2F2;
  --paper-warm: #FAFAF8;
  --line: rgba(35,42,37,0.08);
  --mute: rgba(35,42,37,0.55);
  --good: #DC2626;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
.ax-buy-pdp, .ax-buy-pdp * { box-sizing: border-box; }
.ax-buy-pdp a { text-decoration: none; color: inherit; }
.ax-buy-pdp p { line-height: 1.6; }

.ax-buy-pdp .crumb-band { padding: 14px 24px; }
.ax-buy-pdp .crumbs { max-width: 1320px; margin: 0 auto; font-size: 12px; color: var(--mute); }
.ax-buy-pdp .crumbs a { color: var(--mute); }
.ax-buy-pdp .crumbs span { margin: 0 6px; }

/* HERO */
.ax-buy-pdp .pdp-hero { padding: 0 24px 24px; }
.ax-buy-pdp .pdp-hero-inner { max-width: 1320px; margin: 0 auto; }
.ax-buy-pdp .pdp-headline { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.ax-buy-pdp .pdp-headline h1 { font-size: clamp(34px, 3vw + 8px, 52px); font-weight: 900; letter-spacing: -0.03em; line-height: 0.95; margin: 0; text-transform: uppercase; }
.ax-buy-pdp .pdp-kind { display: inline-block; background: var(--ink); color: #fff; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }
.ax-buy-pdp .pdp-kind.phev { background: var(--red); }

.ax-buy-pdp .pdp-hero-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; margin-top: 24px; align-items: start; }
.ax-buy-pdp .pdp-photo { aspect-ratio: 16/10; background: var(--paper-soft); border-radius: 18px; background-size: cover; background-position: center; background-repeat: no-repeat; }
.ax-buy-pdp .pdp-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.ax-buy-pdp .pdp-thumb { width: 80px; aspect-ratio: 16/10; background: var(--paper-soft); border-radius: 8px; background-size: cover; background-position: center; cursor: pointer; opacity: 0.6; }
.ax-buy-pdp .pdp-thumb.active, .ax-buy-pdp .pdp-thumb:hover { opacity: 1; outline: 2px solid var(--ink); }

.ax-buy-pdp .price-rail { background: var(--paper-soft); border-radius: 18px; padding: 22px; }
.ax-buy-pdp .price-rail .rrp-lbl { font-size: 12px; color: var(--mute); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 700; }
.ax-buy-pdp .price-rail .rrp { font-size: 24px; font-weight: 900; letter-spacing: -0.02em; margin: 4px 0 14px; }
.ax-buy-pdp .price-rail .row { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ax-buy-pdp .price-rail .row .lbl { color: var(--mute); }
.ax-buy-pdp .price-rail .row .val { font-weight: 800; font-size: 15px; }
.ax-buy-pdp .price-rail .ctas { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.ax-buy-pdp .price-rail .ctas button { padding: 13px 16px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; border: 0; font-family: inherit; }
.ax-buy-pdp .price-rail .ctas .primary { background: var(--red); color: #fff; }
.ax-buy-pdp .price-rail .ctas .ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--ink); }

/* GLANCE PILLS */
.ax-buy-pdp .glance { background: var(--paper-warm); padding: 16px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ax-buy-pdp .glance-inner { max-width: 1320px; margin: 0 auto; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ax-buy-pdp .gpill { flex-shrink: 0; padding: 8px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ax-buy-pdp .gpill b { color: var(--ink); }
.ax-buy-pdp .gpill span { color: var(--mute); }

/* TRIM TABLE */
.ax-buy-pdp .section { padding: 48px 24px; }
.ax-buy-pdp .section-inner { max-width: 1320px; margin: 0 auto; }
.ax-buy-pdp .section h2 { font-size: clamp(26px, 2vw + 6px, 36px); font-weight: 900; letter-spacing: -0.025em; line-height: 1; margin: 0 0 18px; text-transform: uppercase; }

.ax-buy-pdp .trims { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.ax-buy-pdp .trims th { background: var(--paper-soft); padding: 14px 18px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.ax-buy-pdp .trims td { padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ax-buy-pdp .trims tr:last-child td { border-bottom: 0; }
.ax-buy-pdp .trims .name { font-weight: 700; font-size: 15px; }
.ax-buy-pdp .trims .price { font-weight: 800; }

/* USED LISTING CAROUSEL */
.ax-buy-pdp .used { background: var(--paper-warm); padding: 48px 24px; border-top: 1px solid var(--line); }
.ax-buy-pdp .used-inner { max-width: 1320px; margin: 0 auto; }
.ax-buy-pdp .used h2 { font-size: clamp(26px, 2vw + 6px, 36px); font-weight: 900; letter-spacing: -0.025em; margin: 0 0 8px; text-transform: uppercase; }
.ax-buy-pdp .used .sub { font-size: 14px; color: var(--mute); margin: 0 0 24px; }
.ax-buy-pdp .used-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .ax-buy-pdp .used-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .ax-buy-pdp .used-grid { grid-template-columns: 1fr; } }

.ax-buy-pdp .ucard { background: var(--paper); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform 0.18s, box-shadow 0.18s; display: flex; flex-direction: column; }
.ax-buy-pdp .ucard:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.10); }
.ax-buy-pdp .ucard-photo { aspect-ratio: 16/9; background-size: cover; background-position: center; background-color: var(--paper-soft); }
.ax-buy-pdp .ucard-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.ax-buy-pdp .ucard-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ax-buy-pdp .ucard .yr-km { font-size: 12px; color: var(--mute); }
.ax-buy-pdp .ucard .price { font-size: 17px; font-weight: 900; letter-spacing: -0.01em; margin-top: 4px; }
.ax-buy-pdp .ucard .dealer { font-size: 11px; color: var(--mute); margin-top: 6px; }
.ax-buy-pdp .ucard form { margin-top: 12px; }
.ax-buy-pdp .ucard form button { width: 100%; background: var(--red); color: #fff; padding: 10px; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.ax-buy-pdp .ucard form button:hover { background: var(--red-dark); }

/* INLINE QUOTE FORM (modal-on-click) */
.ax-buy-pdp .quote-modal-bg { display: none; position: fixed; inset: 0; background: rgba(20,24,26,0.7); z-index: 100; align-items: center; justify-content: center; padding: 24px; }
.ax-buy-pdp .quote-modal-bg.open { display: flex; }
.ax-buy-pdp .quote-modal { background: var(--paper); border-radius: 18px; max-width: 480px; width: 100%; padding: 32px; max-height: 90vh; overflow-y: auto; }
.ax-buy-pdp .quote-modal h3 { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; margin: 0 0 6px; text-transform: uppercase; }
.ax-buy-pdp .quote-modal .ctx { font-size: 13px; color: var(--mute); margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ax-buy-pdp .quote-modal label { display: block; font-size: 12px; font-weight: 700; color: var(--mute); margin-top: 14px; margin-bottom: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.ax-buy-pdp .quote-modal input[type="text"], .ax-buy-pdp .quote-modal input[type="email"], .ax-buy-pdp .quote-modal input[type="tel"], .ax-buy-pdp .quote-modal select, .ax-buy-pdp .quote-modal textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--ink); background: var(--paper);
}
.ax-buy-pdp .quote-modal textarea { min-height: 70px; resize: vertical; }
.ax-buy-pdp .quote-modal .consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--mute); line-height: 1.4; }
.ax-buy-pdp .quote-modal .consent input { margin-top: 2px; accent-color: var(--red); }
.ax-buy-pdp .quote-modal button[type="submit"] { width: 100%; background: var(--red); color: #fff; padding: 14px; border: 0; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 18px; font-family: inherit; }
.ax-buy-pdp .quote-modal button[type="submit"]:hover { background: var(--red-dark); }
.ax-buy-pdp .quote-modal .close { float: right; cursor: pointer; color: var(--mute); font-size: 24px; line-height: 1; background: transparent; border: 0; padding: 0; }
.ax-buy-pdp .quote-modal .msg { margin-top: 12px; padding: 10px 14px; border-radius: 8px; font-size: 13px; display: none; }
.ax-buy-pdp .quote-modal .msg.ok  { display: block; background: var(--red-soft); color: var(--red-dark); }
.ax-buy-pdp .quote-modal .msg.err { display: block; background: rgba(35,42,37,0.08); color: var(--ink); }

@media (max-width: 1100px) {
  .ax-buy-pdp .pdp-hero-body { grid-template-columns: 1fr; }
}
