/* Vehicle detail page: one viewport-fitted media and information row. */
.vehicle-show-page > .vehicle-show-screen {
    display: block;
    width: 100%;
    height: calc(100dvh - 113.8px);
    min-height: 0;
    margin: 0;
    padding: clamp(14px, 2vh, 24px) clamp(20px, 4vw, 64px);
    overflow: hidden;
    color: var(--text, #14213d);
    background: #fff;
    box-sizing: border-box;
}

.vehicle-show-grid {
    display: grid;
    grid-template-columns: minmax(0, 55fr) minmax(360px, 45fr);
    align-items: stretch;
    gap: clamp(24px, 3vw, 44px);
    width: min(100%, 1500px);
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin-inline: auto;
    overflow: hidden;
}

.vehicle-show-media {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 76px;
    gap: 10px;
    max-width: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.vehicle-show-media .cab-viewer[data-cab-viewer] { display: contents; }
.vehicle-main-viewer {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line, #dce3e8);
    border-radius: 20px;
    background: #fff;
}
.vehicle-main-viewer .viewer-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    padding: clamp(10px, 1.6vw, 22px);
    overflow: hidden;
    border: 0;
    border-radius: inherit;
    aspect-ratio: auto;
    background: #fff;
    box-sizing: border-box;
    cursor: zoom-in;
}
.vehicle-main-viewer .viewer-stage img[data-viewer-image]:not([hidden]) {
    position: relative;
    inset: auto;
    display: block;
    grid-area: 1 / 1;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    margin: auto;
}
.vehicle-main-viewer .viewer-stage video[data-viewer-video]:not([hidden]),
.vehicle-main-viewer .viewer-stage iframe[data-viewer-frame]:not([hidden]) {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #080d12;
}
.vehicle-main-viewer .viewer-stage video[data-viewer-video]:not([hidden]) { object-fit: contain; }
.vehicle-main-viewer .viewer-stage iframe[data-viewer-frame]:not([hidden]) { object-fit: initial; }
.vehicle-main-viewer .viewer-stage [hidden] { display: none !important; }
.vehicle-main-viewer .viewer-caption {
    z-index: 4;
    right: 12px;
    bottom: 10px;
    left: 12px;
    padding: 6px 10px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.3;
    pointer-events: none;
}
.vehicle-main-viewer .viewer-youtube-fallback { z-index: 5; }
.vehicle-main-viewer .viewer-youtube-fallback[hidden] { display: none !important; }
.vehicle-main-viewer .ride-gallery-empty {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    color: var(--text-soft, #64748b);
    text-align: center;
}

.vehicle-thumbnail-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    height: 76px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}
.vehicle-show-media .viewer-thumbs {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 4px 2px;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}
.vehicle-show-media .viewer-thumbs button {
    position: relative;
    flex: 0 0 88px;
    width: 88px;
    height: 64px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #fff;
}
.vehicle-show-media .viewer-thumbs button.active { border-color: var(--rc-orange, #ff5a1f); }
.vehicle-show-media .viewer-thumbs button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #fff;
}
.vehicle-show-media .viewer-thumbs button:focus-visible,
.vehicle-main-viewer .viewer-stage:focus-visible { outline: 3px solid var(--rc-orange, #ff5a1f); outline-offset: 2px; }
.vehicle-show-media .viewer-thumbs button .viewer-play { pointer-events: none; }

.vehicle-show-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(5px, .8vh, 9px);
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.vehicle-detail-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.vehicle-type-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--rc-orange, #ff5a1f);
    background: color-mix(in srgb, var(--rc-orange, #ff5a1f) 11%, transparent);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.vehicle-detail-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 32px;
    padding: 4px 9px;
    border: 1px solid var(--line, #dce3e8);
    border-radius: 9px;
    color: var(--text, #14213d);
    background: #fff;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
}
.vehicle-detail-share svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vehicle-show-content h1 {
    max-width: 100%;
    margin: 8px 0 10px;
    color: var(--text, #14213d);
    font-size: clamp(2rem, 3.2vw, 4rem);
    line-height: 1;
    overflow-wrap: anywhere;
}
.vehicle-show-description {
    display: -webkit-box;
    width: 100%;
    max-width: 62ch;
    margin: 0 0 7px;
    overflow: hidden;
    color: var(--text-soft, #64748b);
    font-size: clamp(.86rem, 1vw, .98rem);
    line-height: 1.45;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.vehicle-detail-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 9px 13px;
    border: 1px solid var(--line, #dce3e8);
    border-radius: 11px;
    background: #fff;
}
.vehicle-detail-price span,.vehicle-specification span { color: var(--text-soft, #64748b); font-size: .75rem; }
.vehicle-detail-price strong { color: var(--rc-orange, #ff5a1f); font-size: clamp(1rem, 1.6vw, 1.28rem); text-align: right; overflow-wrap: anywhere; }
.vehicle-specification-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; width: 100%; min-width: 0; }
.vehicle-specification { display: grid; align-content: center; gap: 2px; min-width: 0; min-height: 46px; padding: 6px 9px; border: 1px solid var(--line, #dce3e8); border-radius: 9px; background: #fff; }
.vehicle-specification strong { color: var(--text, #14213d); font-size: .8rem; line-height: 1.2; overflow-wrap: anywhere; }
.vehicle-detail-amenities { display: grid; gap: 5px; width: 100%; min-width: 0; }
.vehicle-detail-amenities > strong { color: var(--text, #14213d); font-size: .8rem; }
.vehicle-detail-amenities > div { display: flex; flex-wrap: wrap; gap: 5px; }
.vehicle-detail-amenities > div > span { max-width: 100%; padding: 3px 7px; border-radius: 999px; color: var(--text, #14213d); background: var(--surface-soft, #f2f7f7); font-size: .68rem; line-height: 1.25; overflow-wrap: anywhere; }
.vehicle-show-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; min-width: 0; margin-top: 7px; }
.vehicle-show-actions > * { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 48px; padding: 7px 6px; border: 1px solid transparent; border-radius: 9px; color: #fff; font-size: clamp(.78rem, .85vw, .9rem); font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; }
.vehicle-show-actions .vehicle-action-btn--primary { background: var(--rc-orange, #ff5a1f); border-color: var(--rc-orange, #ff5a1f); }
.vehicle-show-actions .vehicle-action-btn--whatsapp { background: var(--color-accent, #D7A84A); border-color: var(--color-accent, #D7A84A); color: var(--color-primary, #101820); }
.vehicle-view-full-details { align-self: flex-start; min-height: 30px; margin-top: 1px; padding: 4px 0; border: 0; color: var(--rc-orange, #ff5a1f); background: transparent; font-size: .75rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.vehicle-show-actions > :not(.public-contact-btn):hover,.vehicle-detail-share:hover { filter: brightness(.95); }
.vehicle-show-actions > *:focus-visible,.vehicle-detail-share:focus-visible,.vehicle-view-full-details:focus-visible { outline: 3px solid var(--rc-orange, #ff5a1f); outline-offset: 3px; }

.vehicle-details-dialog { width: min(680px, calc(100vw - 32px)); max-width: none; max-height: min(82dvh, 720px); padding: 0; overflow: hidden; border: 1px solid var(--line, #dce3e8); border-radius: 18px; color: var(--text, #14213d); background: var(--surface, #fff); }
.vehicle-details-dialog::backdrop { background: rgb(8 13 18 / 68%); backdrop-filter: blur(3px); }
.vehicle-details-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line, #dce3e8); }
.vehicle-details-dialog__header h2 { margin: 0; font-size: clamp(1.1rem, 3vw, 1.45rem); line-height: 1.2; overflow-wrap: anywhere; }
.vehicle-details-dialog__header button { min-height: 40px; padding: 8px 13px; border: 0; border-radius: 9px; color: #fff; background: var(--rc-navy, #101820); font-weight: 700; cursor: pointer; }
.vehicle-details-dialog__body { max-height: calc(min(82dvh, 720px) - 76px); padding: 18px 22px 24px; overflow-y: auto; line-height: 1.65; overflow-wrap: anywhere; }
.vehicle-details-dialog__body h3 { margin: 0 0 8px; color: var(--text, #14213d); }
.vehicle-details-dialog__body h3:not(:first-child) { margin-top: 22px; }
.vehicle-details-dialog__body ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; padding-left: 20px; }

@media (min-width: 992px) and (max-width: 1199.98px) {
    .vehicle-show-grid { gap: 24px; }
    .vehicle-show-content { gap: 5px; }
    .vehicle-show-content h1 { font-size: clamp(2rem, 3.2vw, 2.45rem); }
    .vehicle-specification { min-height: 42px; padding: 5px 7px; }
    .vehicle-show-actions { gap: 7px; }
    .vehicle-show-actions > * { font-size: .72rem; }
}
@media (max-width: 991.98px) {
    .vehicle-show-page > .vehicle-show-screen { height: auto; min-height: auto; padding: 24px clamp(16px, 4vw, 36px) 36px; overflow: visible; }
    .vehicle-show-grid { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; gap: 22px; overflow: visible; }
    .vehicle-show-media { grid-template-rows: minmax(220px, auto) 76px; height: auto; }
    .vehicle-main-viewer { min-height: 220px; aspect-ratio: 16 / 10; }
    .vehicle-main-viewer .viewer-stage { position: absolute; inset: 0; width: 100%; height: 100%; }
    .vehicle-show-content { height: auto; min-height: 0; overflow: visible; gap: 10px; }
    .vehicle-show-content h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
    .vehicle-show-description { -webkit-line-clamp: unset; }
    .vehicle-show-actions { margin-top: 8px; }
}
@media (max-width: 600px) {
    .vehicle-show-page > .vehicle-show-screen { padding: 18px 14px 30px; }
    .vehicle-show-grid { gap: 18px; }
    .vehicle-main-viewer { min-height: 200px; border-radius: 15px; }
    .vehicle-main-viewer .viewer-stage { padding: 10px; }
    .vehicle-show-media { grid-template-rows: minmax(200px, auto) 68px; }
    .vehicle-thumbnail-strip { height: 68px; }
    .vehicle-show-media .viewer-thumbs button { flex-basis: 76px; width: 76px; height: 58px; }
    .vehicle-show-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vehicle-show-actions > * { width: 100%; min-height: 48px; font-size: .9rem; }
    .vehicle-details-dialog__header { padding: 14px 16px; }
    .vehicle-details-dialog__body { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .vehicle-show-page * { scroll-behavior: auto !important; }
}
