/* =====================================================================
   Roadster — vehicle details (vehicle.php). Builds on rs-site.css.
   ===================================================================== */

.rv-top { display: grid; gap: 0; border-bottom: 1px solid var(--rs-line); }
@media (min-width: 1024px) { .rv-top { grid-template-columns: minmax(0, 1fr) 420px; min-height: calc(100vh - var(--rs-hdr-h)); } }
@media (min-width: 1440px) { .rv-top { grid-template-columns: minmax(0, 1fr) 480px; } }

/* Gallery */
.rv-gallery { position: relative; display: flex; flex-direction: column; background: #000; min-width: 0; }
.rv-stage { position: relative; flex: 1; aspect-ratio: 16 / 10; overflow: hidden; outline: none; }
@media (min-width: 1024px) { .rv-stage { aspect-ratio: auto; min-height: 480px; } }
.rv-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transform: scale(1.025); transition: opacity .7s var(--rs-ease), transform 1.2s var(--rs-ease); }
.rv-slide.is-on { opacity: 1; transform: none; z-index: 1; }
.rv-slide .rs-pic, .rv-slide > img { width: 100%; height: 100%; object-fit: cover; }
/* Very tall or very wide photos sit whole on a neutral ground instead of being cropped */
.rv-slide .rv-pic.is-whole img { object-fit: contain; }
.rv-arrow { position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; opacity: 0; transition: opacity .2s ease, background-color .2s ease; }
.rv-arrow svg { width: 20px; height: 20px; }
.rv-arrow.is-prev { left: 16px; } .rv-arrow.is-next { right: 16px; }
.rv-stage:hover .rv-arrow, .rv-arrow:focus-visible { opacity: 1; }
.rv-arrow:hover { background: rgba(255,255,255,.18); }
@media (hover: none) { .rv-arrow { opacity: 1; width: 40px; height: 40px; margin-top: -20px; } }
.rv-count { position: absolute; left: 16px; bottom: 14px; z-index: 2; margin: 0; padding: 4px 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; border-radius: 2px; }

.rv-thumbbar { display: flex; flex-direction: column; gap: 12px; padding: 14px var(--rs-gutter) 18px; background: #000; border-top: 1px solid var(--rs-line); }
.rv-groups { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.rv-groups::-webkit-scrollbar { display: none; }
.rv-groups button { flex-shrink: 0; height: 32px; padding: 0 12px; border: 0; border-radius: 2px; background: transparent; font: 600 11.5px var(--rs-text); letter-spacing: .08em; text-transform: uppercase; color: var(--rs-ink-2); cursor: pointer; }
.rv-groups button[aria-selected="true"] { background: rgba(255,255,255,.12); color: #fff; }
.rv-thumbs { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 2px; }
.rv-thumbs::-webkit-scrollbar { display: none; }
.rv-thumb { flex: 0 0 auto; width: 96px; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--rs-bg-2); cursor: pointer; position: relative; opacity: .55; transition: opacity .2s ease; scroll-snap-align: start; }
.rv-thumb::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #fff; transform: scaleX(0); transition: transform .3s var(--rs-ease); }
.rv-thumb:hover, .rv-thumb.is-on { opacity: 1; }
.rv-thumb.is-on::after { transform: scaleX(1); }
.rv-thumb .rs-pic, .rv-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) { .rv-thumb { width: 112px; } }

/* Summary */
.rv-summary { padding: 40px var(--rs-gutter) 48px; display: flex; flex-direction: column; align-items: flex-start; }
@media (min-width: 1024px) { .rv-summary { padding: 56px 48px; border-left: 1px solid var(--rs-line); position: sticky; top: var(--rs-hdr-h); align-self: start; } }
.rv-name { margin: 20px 0 0; font-family: var(--rs-display); font-stretch: 125%; font-weight: 700; text-transform: uppercase; line-height: .95; font-size: clamp(36px, 3.4vw, 52px); overflow-wrap: anywhere; }
.rv-name small { display: block; margin-bottom: 8px; font-family: var(--rs-text); font-stretch: 100%; font-size: 13px; font-weight: 600; letter-spacing: .2em; color: var(--rs-ink-2); }
.rv-tag { margin: 16px 0 0; color: var(--rs-ink-2); }
.rv-prices { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0 0; padding: 20px 0; border-top: 1px solid var(--rs-line); border-bottom: 1px solid var(--rs-line); }
.rv-prices dt { font-size: 12px; color: var(--rs-ink-2); }
.rv-prices dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; }
.rv-actions { width: 100%; display: grid; gap: 10px; margin-top: 28px; scroll-margin-top: calc(var(--rs-hdr-h) + 24px); }
.rv-actions .rs-btn { height: 52px; }
.rv-actions .rs-small { margin: 4px 0 0; }
.rv-assure { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; font-size: 13.5px; color: var(--rs-ink-2); }
.rv-assure li { display: flex; gap: 10px; }
.rv-assure li::before { content: ''; flex-shrink: 0; width: 4px; height: 4px; margin-top: 9px; border-radius: 50%; background: var(--rs-ink-2); }

/* Specs */
.rv-head { margin-bottom: 56px; }
.rv-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--rs-line); }
@media (min-width: 1024px) { .rv-specs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rv-specs > div { position: relative; padding: 28px 20px 28px 0; border-bottom: 1px solid var(--rs-line); }
.rv-specs dt { font-size: 13px; color: var(--rs-ink-2); }
.rv-specs dd { margin: 10px 0 0; font-family: var(--rs-display); font-stretch: 118%; font-weight: 600; font-size: clamp(28px, 3.2vw, 44px); line-height: 1; font-variant-numeric: tabular-nums; }
.rv-specs dd small { margin-left: 4px; font-family: var(--rs-text); font-stretch: 100%; font-size: 14px; font-weight: 500; color: var(--rs-ink-2); }

/* Detail */
.rv-detail-grid { display: grid; gap: 48px; }
@media (min-width: 1024px) { .rv-detail-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 80px; } }
.rv-detail-side { display: grid; gap: 16px; align-content: start; }
.rv-block { padding: 28px; background: var(--rs-surface); }
.rv-block .rs-small { margin: 0 0 16px; line-height: 1.65; }
.rv-opt + .rv-opt { margin-top: 20px; }
.rv-opt-h { margin: 0 0 10px; font-weight: 600; }
.rv-opt ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rv-opt li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.rv-opt li i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--rs-line); }
.rv-opt li b { margin-left: auto; font-weight: 500; color: var(--rs-ink-2); }
