/* =====================================================================
   VEHICLE PAGE (vehicle-detail.html)
   ===================================================================== */
.detail-page { padding-top: var(--nav-h); }
.detail-loading { padding: 48px var(--gutter); max-width: var(--wrap); margin: 0 auto; }
.detail-loading .skeleton { display: block; height: 60vh; }

/* ---------- Stage ---------- */
.stage { position: relative; overflow: hidden; padding: 28px 0 clamp(48px, 6vw, 80px); background: var(--paper); }
.stage-word {
    position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
    font-family: var(--display); font-weight: 800; font-size: clamp(7rem, 22vw, 24rem); line-height: 0.8;
    text-transform: uppercase; white-space: nowrap; color: transparent;
    -webkit-text-stroke: 1.5px rgba(12,13,15,0.07); pointer-events: none; user-select: none;
}
.crumbs { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin-bottom: 24px; font-size: 0.85rem; color: var(--steel); }
.crumbs a, .crumbs span { display: inline-flex; align-items: center; gap: 8px; }
.crumbs a { transition: color 0.2s; }
.crumbs a:hover { color: var(--red); }
.crumbs svg { width: 16px; height: 16px; }
.crumbs > * + *::before { content: '/'; margin: 0 12px; color: var(--paper-2); }
.crumbs span { color: var(--ink); font-weight: 600; }
.stage-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }

/* Gallery */
.gallery-main {
    position: relative; aspect-ratio: 4 / 3; overflow: hidden;
    background: radial-gradient(120% 90% at 50% 100%, #dcdcd7 0%, #ececE8 50%, #f6f6f4 100%);
}
.gallery-img {
    width: 100%; height: 100%; object-fit: contain; padding: 5% 6% 3%;
    mix-blend-mode: multiply; cursor: zoom-in;
    transition: opacity 0.3s, transform 0.6s var(--ease);
}
.gallery-main.is-photo .gallery-img { object-fit: cover; padding: 0; mix-blend-mode: normal; }
.gallery-img.is-swapping { opacity: 0; transform: translateX(calc(var(--dir, 1) * 24px)); }
.gallery-main { touch-action: pan-y; }
.gallery-video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.gallery-flag { top: 18px; }
.gallery-sticker { width: 96px; height: 96px; top: 18px; right: 18px; }
.gallery-sticker b { font-size: 1.6rem; }
.gallery-nav, .gallery-zoom {
    position: absolute; z-index: 3; width: 52px; height: 52px; display: grid; place-items: center;
    background: rgba(255,255,255,0.92); color: var(--ink);
    transition: background 0.25s, color 0.25s, opacity 0.3s, transform 0.3s var(--ease);
}
.gallery-nav svg, .gallery-zoom svg { width: 20px; height: 20px; }
.gallery-nav:hover, .gallery-zoom:hover { background: var(--red); color: #fff; }
.gallery-prev { left: 0; top: 50%; margin-top: -26px; }
.gallery-next { right: 0; top: 50%; margin-top: -26px; }
.gallery-zoom { right: 0; bottom: 0; }
.gallery-count { position: absolute; left: 16px; bottom: 14px; z-index: 2; font-family: var(--display); font-weight: 700; letter-spacing: 0.1em; font-size: 0.95rem; color: var(--steel); }
.gallery-main.is-photo .gallery-count { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
@media (hover: hover) {
    .gallery-nav { opacity: 0; }
    .gallery-prev { transform: translateX(-12px); }
    .gallery-next { transform: translateX(12px); }
    .gallery-main:hover .gallery-nav { opacity: 1; transform: none; }
}
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
    position: relative; flex: none; width: 104px; aspect-ratio: 4 / 3; overflow: hidden;
    background: #ececea; opacity: 0.6; transition: opacity 0.25s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.thumb::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--red); transform: scaleX(0); transition: transform 0.35s var(--ease); }
.thumb:hover, .thumb.is-active { opacity: 1; }
.thumb.is-active::after { transform: scaleX(1); }
.thumb b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: rgba(12,13,15,0.55); }
.thumb--video { background: var(--ink); }

/* Buy panel */
.buy { position: sticky; top: calc(64px + 24px); padding-top: 8px; }
.buy-make { font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.buy-model { font-size: clamp(3rem, 5.4vw, 5.4rem); font-weight: 800; line-height: 0.86; margin: 6px 0 12px; overflow-wrap: anywhere; }
.buy-meta { color: var(--steel); font-size: 0.95rem; }
.buy-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 26px 0 6px; padding-top: 22px; border-top: 2px solid var(--ink); }
.buy-price s { width: 100%; font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--steel); }
.buy-price-now { font-family: var(--display); font-weight: 800; font-size: clamp(2.8rem, 4.4vw, 3.8rem); line-height: 0.9; font-variant-numeric: tabular-nums; }
.buy-price-now.is-promo { color: var(--red); }
.buy-saving { padding: 4px 10px; background: var(--sticker); font-family: var(--display); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.95rem; transform: rotate(-2deg); }
.buy-stock { font-size: 0.88rem; font-weight: 600; margin-bottom: 22px; }
.buy-stock.in_stock { color: var(--go); }
.buy-stock.request { color: var(--amber); }
.buy-stock.arriving_soon { color: #2860b3; }
.buy-label { font-size: 0.82rem; color: var(--steel); margin-bottom: 10px; }
.buy-label span { color: var(--ink); font-weight: 600; margin-left: 6px; }
.swatches { margin-bottom: 24px; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 44px; height: 44px; border-radius: 50%; padding: 4px; border: 2px solid transparent; transition: border-color 0.25s, transform 0.25s var(--ease); }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18); }
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { border-color: var(--ink); }
.swatches.is-mixed .swatch.is-order::after { content: ''; position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; background: var(--amber); border: 2px solid var(--paper); transform: rotate(45deg); }
.buy-cta { display: grid; gap: 10px; }
.buy-cta-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.buy-cta-row .btn { padding: 0 12px; min-width: 0; }
.buy { min-width: 0; }
.buy-visit { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.85rem; }
.buy-visit b { display: block; font-weight: 600; }
.buy-visit span { color: var(--steel); }
.buy-visit span.is-open { color: var(--go); }
.buy-share { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); font-size: 0.82rem; font-weight: 600; transition: border-color 0.2s, color 0.2s; flex: none; }
.buy-share:hover { border-color: var(--ink); color: var(--red); }
.buy-share svg { width: 16px; height: 16px; }

/* ---------- Spec dashboard ---------- */
.dash { position: relative; overflow: hidden; padding-block: clamp(48px, 6vw, 80px); }
.dash .photo-bg::after { background: linear-gradient(90deg, rgba(12,13,15,0.94), rgba(12,13,15,0.82)); }
.dash-row { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; }
.dash-item { padding: 6px 24px 6px 0; border-left: 1px solid var(--line-dark); padding-left: 24px; }
.dash-item:first-child { border-left: 0; padding-left: 0; }
.dash-value { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 4.6vw, 4.4rem); line-height: 0.9; font-variant-numeric: tabular-nums; }
.dash-value small { font-size: 0.4em; font-weight: 700; color: var(--red); margin-left: 4px; letter-spacing: 0.04em; }
.dash-label { display: block; margin-top: 8px; font-size: 0.8rem; color: var(--fog); letter-spacing: 0.04em; }

/* ---------- About + spec list ---------- */
.info { background: var(--white); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
.info h2 { margin-bottom: 22px; }
.prose p { color: var(--steel); margin-bottom: 14px; max-width: 60ch; white-space: pre-line; }
.prose a { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.spec-list { border-top: 2px solid var(--ink); }
.spec-list div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); transition: background 0.25s, padding 0.3s var(--ease); }
.spec-list div:hover { background: linear-gradient(90deg, rgba(238,27,36,0.07), transparent 70%); padding-left: 8px; }
.spec-list dt { font-size: 0.85rem; color: var(--steel); }
.spec-list dd { font-weight: 600; font-size: 0.95rem; }

/* ---------- More like this ---------- */
.more { background: var(--paper); }

/* ---------- Not found ---------- */
.not-found { position: relative; overflow: hidden; min-height: 80vh; display: flex; align-items: center; color: #fff; }
.not-found-inner { position: relative; z-index: 3; }
.not-found .tag { margin-bottom: 18px; }
.not-found .lede { color: rgba(255,255,255,0.82); margin: 20px 0 30px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(8,8,9,0.96); opacity: 0; transition: opacity 0.3s; }
.lightbox.is-open { opacity: 1; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.lightbox-close, .lightbox-nav { position: absolute; width: 56px; height: 56px; display: grid; place-items: center; color: #fff; transition: background 0.2s; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--red); }
.lightbox-close svg, .lightbox-nav svg { width: 24px; height: 24px; }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 12px; top: 50%; margin-top: -28px; }
.lightbox-next { right: 12px; top: 50%; margin-top: -28px; }
.lightbox-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-family: var(--display); letter-spacing: 0.16em; color: var(--fog); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .stage-grid { grid-template-columns: minmax(0, 1fr); }
    .buy { position: static; }
    .stage-word { display: none; }
    .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .stage { padding-top: 16px; }
    .gallery { margin-inline: calc(var(--gutter) * -1); }
    .thumbs { padding-inline: var(--gutter); }
    .thumb { width: 84px; }
    .gallery-sticker { width: 78px; height: 78px; }
    .gallery-sticker b { font-size: 1.3rem; }
    .dash-row { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
    .dash-item:nth-child(odd) { border-left: 0; padding-left: 0; }
    .spec-list div { grid-template-columns: 120px 1fr; }
}
