/* ==========================================================================
   V2 Components — INEOS Grenadier MX
   All classes prefixed with `v2-` to coexist with legacy styles.
   ========================================================================== */

/* ── Container ────────────────────────────────────────────────────────────── */
.v2-container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--v2-space-md);
}

.v2-container--wide {
    max-width: 1440px;
}

/* ── Typography ───────────────────────────────────────────────────────────── */
.v2-display-xl {
    font-family: var(--v2-font-display);
    font-size: var(--v2-size-display-xl);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.v2-display-lg {
    font-family: var(--v2-font-display);
    font-size: var(--v2-size-display-lg);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.v2-display-md {
    font-family: var(--v2-font-display);
    font-size: var(--v2-size-display-md);
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
}

.v2-heading {
    font-family: var(--v2-font-display);
    font-size: var(--v2-size-heading);
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.v2-eyebrow {
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-eyebrow);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--v2-text-muted);
}

.v2-body {
    font-family: var(--v2-font-body);
    font-size: var(--v2-size-body);
    line-height: 1.7;
    color: var(--v2-text-secondary);
}

.v2-body-lg {
    font-family: var(--v2-font-body);
    font-size: var(--v2-size-body-lg);
    line-height: 1.7;
    color: var(--v2-text-secondary);
}

.v2-label {
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-label);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--v2-space-sm);
    padding: 0.875rem 2rem;
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-label);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--v2-radius-sm);
    cursor: pointer;
    transition: transform var(--v2-duration) var(--v2-ease),
                opacity var(--v2-duration) var(--v2-ease),
                box-shadow var(--v2-duration) var(--v2-ease);
    white-space: nowrap;
}

.v2-btn:hover {
    transform: translateY(-1px);
}

.v2-btn:active {
    transform: translateY(0);
}

.v2-btn--primary {
    background: var(--v2-cta-primary);
    color: var(--v2-text-primary);
    border-color: var(--v2-cta-primary);
}

.v2-btn--primary:hover {
    color: var(--v2-text-primary);
    box-shadow: 0 4px 12px rgba(255, 70, 57, 0.25);
}

.v2-btn--secondary {
    background: var(--v2-bg-near-black);
    color: var(--v2-text-inverse);
    border-color: var(--v2-bg-near-black);
}

.v2-btn--secondary:hover {
    color: var(--v2-text-inverse);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.v2-btn--outline {
    background: transparent;
    color: var(--v2-text-inverse);
    border-color: rgba(255, 255, 255, 0.5);
}

.v2-btn--outline:hover {
    color: #fff;
    border-color: #fff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.08);
}

.v2-btn--outline-dark {
    background: transparent;
    color: var(--v2-text-primary);
    border-color: var(--v2-border);
}

.v2-btn--outline-dark:hover {
    color: var(--v2-text-primary);
    border-color: var(--v2-text-primary);
}

.v2-btn--link {
    background: none;
    color: var(--v2-text-primary);
    border: none;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.v2-btn--link:hover {
    color: inherit;
    opacity: 0.7;
    transform: none;
}

.v2-btn--link:active {
    transform: none;
}

@media (max-width: 575.98px) {
    .v2-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.v2-hero {
    position: relative;
    width: 100%;
    height: calc(100dvh - var(--v2-header-height, 100px));
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    color: var(--v2-text-inverse);
}

.v2-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.v2-hero__media img,
.v2-hero__media picture {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.25) 45%,
        transparent 100%
    );
    pointer-events: none;
}

.v2-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding: var(--v2-space-2xl) var(--v2-space-md) var(--v2-space-3xl);
}

.v2-hero__eyebrow {
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-eyebrow);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--v2-space-sm);
}

.v2-hero__title {
    font-family: var(--v2-font-display);
    font-size: var(--v2-size-display-xl);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 var(--v2-space-md);
    max-width: 700px;
}

.v2-hero__subtitle {
    font-family: var(--v2-font-body);
    font-size: var(--v2-size-body-lg);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--v2-space-lg);
    max-width: 500px;
}

.v2-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--v2-space-md);
}

@media (max-width: 767.98px) {
    .v2-hero {
        height: 85svh;
        min-height: 520px;
    }
    .v2-hero__overlay {
        display: none;
    }
    .v2-hero__content {
        padding-bottom: var(--v2-space-xl);
    }
    .v2-hero__title {
        font-size: clamp(2.25rem, 8vw, 3.5rem);
    }
    .v2-hero__actions {
        flex-direction: column;
    }
    .v2-hero__actions .v2-btn {
        width: 100%;
        text-align: center;
    }
}

/* ── Section ──────────────────────────────────────────────────────────────── */
.v2-section {
    padding-block: var(--v2-space-section);
}

.v2-section--stone {
    background-color: var(--v2-bg-stone-light);
}

.v2-section--dark {
    background-color: var(--v2-bg-near-black);
    color: var(--v2-text-inverse);
}

.v2-section--offwhite {
    background-color: var(--v2-bg-offwhite);
}

/* ── Feature Row ──────────────────────────────────────────────────────────── */
.v2-feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
}

.v2-feature-row__media {
    overflow: hidden;
}

.v2-feature-row__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-feature-row__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--v2-space-2xl) var(--v2-space-2xl);
}

.v2-feature-row__body .v2-eyebrow {
    margin-bottom: var(--v2-space-sm);
}

.v2-feature-row__body .v2-display-md {
    color: var(--v2-text-primary);
    margin-bottom: var(--v2-space-md);
}

.v2-feature-row__body .v2-body {
    margin-bottom: var(--v2-space-lg);
}

.v2-feature-row--reverse .v2-feature-row__media {
    order: 2;
}

.v2-feature-row--reverse .v2-feature-row__body {
    order: 1;
}

@media (max-width: 767.98px) {
    .v2-section:has(> .v2-feature-row) {
        padding-top: 0;
        padding-bottom: var(--v2-space-xl);
    }
    .v2-feature-row {
        grid-template-columns: 1fr;
    }
    .v2-feature-row__media {
        max-height: 350px;
    }
    .v2-feature-row__body {
        padding: var(--v2-space-xl) var(--v2-space-md);
    }
    .v2-feature-row--reverse .v2-feature-row__media {
        order: 0;
    }
    .v2-feature-row--reverse .v2-feature-row__body {
        order: 0;
    }
}

/* ── Pills ────────────────────────────────────────────────────────────────── */
.v2-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--v2-space-sm);
}

.v2-pill {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-small);
    font-weight: 500;
    letter-spacing: 0.03em;
    background: var(--v2-bg-stone);
    color: var(--v2-text-primary);
    border-radius: var(--v2-radius-pill);
}

/* ── Image Compare (img-comparison-slider wrapper) ────────────────────────── */
.v2-compare {
    max-width: 960px;
    margin-inline: auto;
    border-radius: var(--v2-radius-md);
    overflow: hidden;
}

.v2-compare--mobile {
    display: none;
}

.v2-compare img-comparison-slider {
    display: block;
    width: 100%;
}

.v2-compare img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 767.98px) {
    .v2-compare--desktop {
        display: none;
    }
    .v2-compare--mobile {
        display: block;
        max-width: 400px;
    }
}

.v2-compare img-comparison-slider {
    --divider-color: var(--v2-cta-primary);
    --divider-width: 2px;
    --default-handle-opacity: 0;
}

.v2-compare__handle {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.v2-compare__handle svg {
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.v2-compare__labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--v2-space-lg);
    text-align: left;
}

.v2-compare__label-group {
    display: flex;
    flex-direction: column;
    gap: var(--v2-space-xs);
}

.v2-compare__label-group:last-child {
    text-align: right;
}

.v2-compare__label-name {
    font-family: var(--v2-font-display);
    font-size: var(--v2-size-heading);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--v2-text-primary);
}

.v2-compare__label-desc {
    font-family: var(--v2-font-body);
    font-size: var(--v2-size-label);
    color: var(--v2-text-muted);
}

/* ── Spec List ────────────────────────────────────────────────────────────── */
.v2-spec-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.v2-spec-list__item {
    display: flex;
    align-items: baseline;
    gap: var(--v2-space-sm);
    padding: var(--v2-space-sm) 0;
    border-bottom: 1px solid var(--v2-border);
    font-family: var(--v2-font-body);
    font-size: var(--v2-size-body);
    color: var(--v2-text-primary);
}

.v2-spec-list__item::before {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    background: var(--v2-cta-primary);
    border-radius: 50%;
    margin-top: 0.5em;
}

/* ── CTA Band ─────────────────────────────────────────────────────────────── */
.v2-cta-band {
    background: var(--v2-bg-near-black);
    color: var(--v2-text-inverse);
    padding-block: var(--v2-space-section);
    text-align: center;
}

.v2-cta-band--hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.v2-cta-band__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.v2-cta-band__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.75);
}

/* ── Utilities ────────────────────────────────────────────────────────────── */
.v2-img-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-text-inverse {
    color: var(--v2-text-inverse);
}

.v2-text-center {
    text-align: center;
}

.v2-mx-auto {
    margin-inline: auto;
}

.v2-max-w-prose {
    max-width: 680px;
}

.v2-gap-sm { gap: var(--v2-space-sm); }
.v2-gap-md { gap: var(--v2-space-md); }
.v2-gap-lg { gap: var(--v2-space-lg); }

.v2-mt-sm { margin-top: var(--v2-space-sm); }
.v2-mt-md { margin-top: var(--v2-space-md); }
.v2-mt-lg { margin-top: var(--v2-space-lg); }
.v2-mt-xl { margin-top: var(--v2-space-xl); }
.v2-mb-md { margin-bottom: var(--v2-space-md); }
.v2-mb-lg { margin-bottom: var(--v2-space-lg); }

/* ── Accordion v2 overrides (for spec modal) ──────────────────────────────── */
.v2-accordion .accordion-button {
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-body);
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--v2-text-primary);
    background: transparent;
    padding: var(--v2-space-md) 0;
    border: none;
    box-shadow: none;
}

.v2-accordion .accordion-button:not(.collapsed) {
    color: var(--v2-text-primary);
    background: transparent;
    box-shadow: inset 0 -1px 0 var(--v2-border);
}

.v2-accordion .accordion-button::after {
    filter: none;
}

.v2-accordion .accordion-item {
    border: none;
    border-bottom: 1px solid var(--v2-border);
    background: transparent;
}

.v2-accordion .accordion-body {
    padding: var(--v2-space-md) 0;
}

/* ── Statement (full-width bold headline like global "OSCURECIDO. NO SUAVIZADO.") ── */
.v2-statement {
    padding-block: var(--v2-space-2xl);
}

.v2-statement__heading {
    font-family: var(--v2-font-display);
    font-size: clamp(2rem, 5vw + 0.5rem, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--v2-text-primary);
    max-width: 900px;
}

.v2-statement--dark .v2-statement__heading {
    color: var(--v2-text-inverse);
}

/* ── Detail Grid (2-col photo+caption grid for package features) ──────────── */
.v2-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--v2-space-lg);
}

.v2-detail-grid__item {
    overflow: hidden;
}

.v2-detail-grid__img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--v2-radius-sm);
}

.v2-detail-grid__caption {
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-label);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--v2-text-primary);
    margin-top: var(--v2-space-sm);
}

@media (max-width: 575.98px) {
    .v2-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Tabs (for Exterior / Interior / Paquete sections) ────────────────────── */
.v2-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--v2-border);
    margin-bottom: var(--v2-space-xl);
}

.v2-tabs__tab {
    padding: var(--v2-space-md) var(--v2-space-lg);
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-label);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--v2-text-muted);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: color var(--v2-duration) var(--v2-ease),
                border-color var(--v2-duration) var(--v2-ease);
    margin-bottom: -1px;
}

.v2-tabs__tab:hover {
    color: var(--v2-text-primary);
}

.v2-tabs__tab.active {
    color: var(--v2-cta-primary);
    border-bottom-color: var(--v2-cta-primary);
}

.v2-tabs__panel {
    display: none;
}

.v2-tabs__panel.active {
    display: block;
}

@media (max-width: 575.98px) {
    .v2-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .v2-tabs__tab {
        padding-inline: var(--v2-space-md);
        white-space: nowrap;
    }
}

/* ── Vehicle Showcase (side profile on white bg like global hero) ──────────── */
.v2-showcase {
    background: var(--v2-bg-offwhite);
    padding-block: var(--v2-space-xl);
    overflow: hidden;
}

.v2-showcase__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--v2-space-lg);
    align-items: center;
}

.v2-showcase__img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.v2-showcase__label {
    font-family: var(--v2-font-display);
    font-size: var(--v2-size-display-md);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--v2-text-primary);
    text-align: center;
    margin-top: var(--v2-space-sm);
}

@media (max-width: 767.98px) {
    .v2-showcase__grid {
        grid-template-columns: 1fr;
        gap: var(--v2-space-xl);
    }
}

/* ── Gallery Masonry ──────────────────────────────────────────────────────── */
.v2-gallery {
    background: var(--v2-bg-near-black);
    padding-block: var(--v2-space-2xl);
    overflow: hidden;
}

.v2-gallery__header {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--v2-space-md);
    margin-bottom: var(--v2-space-xl);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.v2-gallery__title {
    font-family: var(--v2-font-display);
    font-size: var(--v2-size-heading);
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.05em;
}

.v2-gallery__count {
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-label);
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.v2-gallery__masonry {
    max-width: 1440px;
    margin-inline: auto;
    padding-inline: var(--v2-space-sm);
    columns: 3;
    column-gap: 6px;
}

.v2-gallery__item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 6px;
    overflow: hidden;
    cursor: pointer;
}

.v2-gallery__item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(0.85);
}

.v2-gallery__item:hover img {
    transform: scale(1.03);
    filter: brightness(1);
}

.v2-gallery__item__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--v2-space-lg) var(--v2-space-md) var(--v2-space-md);
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-small);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.v2-gallery__item:hover .v2-gallery__item__caption {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991.98px) {
    .v2-gallery__masonry {
        columns: 2;
    }
}

@media (max-width: 575.98px) {
    .v2-gallery__masonry {
        columns: 2;
        column-gap: 4px;
    }
    .v2-gallery__item {
        margin-bottom: 4px;
    }
    .v2-gallery__header {
        flex-direction: column;
        gap: var(--v2-space-xs);
    }
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.v2-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--v2-ease), visibility 0.3s;
}

.v2-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.v2-lightbox__close {
    position: absolute;
    top: var(--v2-space-md);
    right: var(--v2-space-md);
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v2-lightbox__close svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
    stroke-width: 2;
    transition: opacity 0.2s;
}

.v2-lightbox__close:hover svg {
    opacity: 0.7;
}

.v2-lightbox__img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--v2-radius-sm);
}

.v2-lightbox__caption {
    font-family: var(--v2-font-label);
    font-size: var(--v2-size-label);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--v2-space-md);
    text-align: center;
}

.v2-lightbox__prev,
.v2-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v2-lightbox__prev {
    left: var(--v2-space-md);
}

.v2-lightbox__next {
    right: var(--v2-space-md);
}

.v2-lightbox__prev svg,
.v2-lightbox__next svg {
    width: 32px;
    height: 32px;
    stroke: var(--v2-cta-primary);
    stroke-width: 2.5;
    fill: none;
    transition: opacity 0.2s;
}

.v2-lightbox__prev:hover svg,
.v2-lightbox__next:hover svg {
    opacity: 0.7;
}

@media (max-width: 575.98px) {
    .v2-lightbox__prev,
    .v2-lightbox__next {
        top: auto;
        bottom: var(--v2-space-lg);
        transform: none;
    }
    .v2-lightbox__prev {
        left: var(--v2-space-xl);
    }
    .v2-lightbox__next {
        right: var(--v2-space-xl);
    }
    .v2-lightbox__img {
        max-height: 65vh;
    }
    .v2-lightbox__caption {
        margin-bottom: calc(48px + var(--v2-space-xl));
    }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .v2-btn,
    .v2-hero,
    .v2-feature-row__media img,
    .v2-gallery__item img,
    .v2-lightbox {
        transition: none;
    }
}
