/* ======================================================
   Vitrina del modelo (ficha de producto)
   Ver inc/product-showcase.php y template-parts/product-showcase.php
   ====================================================== */

.single-product {
    overflow-x: clip; /* la intro sale del .container a todo lo ancho */
}

.vitrina {
    --vitrina-gris: #e4e6ec;
    --vitrina-radio: 12px;
    --vitrina-gap: 20px;
    clear: both;
    padding: 40px 0 56px;
}

/* ---------- 1. Intro negra animada (como motos.suzuki.com.mx) ----------
   La sección mide 180vh/250vh; el panel negro se queda fijo (sticky) mientras
   assets/js/product-showcase.js mueve dos variables con el scroll:
   --capa   0→1  la foto de la moto aparece dentro de las letras
   --escala 1→.32 el nombre se encoge
   --fit         escala para que el nombre ocupe ~86% del ancho de la pantalla
   Al final el panel sube con el scroll y aparece "Sabes que quieres una…" debajo. */
.vitrina-reveal {
    --capa: 0;
    --escala: 1;
    --fit: 1;
    position: relative;
    z-index: 1;
    height: 180vh;
    margin-inline: calc(50% - 50vw);
    pointer-events: none;
}
.vitrina-reveal__panel {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    background: #000;
}
.vitrina-reveal__escala {
    flex: none;
    transform: scale(var(--escala));
}
.vitrina-reveal__texto {
    position: relative;
    width: max-content;
    margin: 0;
    font-family: 'Circular', sans-serif;
    font-weight: 800;
    font-size: min(180px, 17vw);
    line-height: .82;
    letter-spacing: -.025em;
    text-align: center;
    text-transform: uppercase;
    transform: scale(var(--fit));
}
.vitrina-reveal__capa {
    display: block;
    background-color: #b6b6b6;
    background-image: var(--vitrina-fondo, none);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.vitrina-reveal__capa--moto {
    position: absolute;
    inset: 0;
    background-color: transparent;
    background-image: var(--vitrina-moto, none);
    opacity: var(--capa);
}
@media (min-width: 992px) {
    .vitrina-reveal {
        height: 250vh;
    }
}
@media (prefers-reduced-motion: reduce) {
    .vitrina-reveal {
        height: auto;
    }
    .vitrina-reveal__panel {
        position: relative;
        height: 70vh;
    }
}

/* ---------- 2. Sabes que quieres una … ---------- */
.vitrina-cuerpo {
    padding-top: clamp(56px, 7vw, 96px);
}
.vitrina-encabezado {
    margin: 0 0 clamp(32px, 5vw, 64px);
    font-family: 'Circular', sans-serif;
    font-weight: 600;
    font-size: clamp(1.75rem, 3.6vw, 3rem);
    line-height: 1.15;
    text-align: center;
    color: #111;
}
.vitrina-encabezado span {
    color: var(--blue);
}

.vitrina-grid {
    display: grid;
    gap: var(--vitrina-gap);
    grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    grid-template-rows: clamp(150px, 13.5vw, 210px) clamp(380px, 38vw, 580px) clamp(150px, 13.5vw, 210px);
    grid-template-areas:
        "f1 f2 f3 em"
        "f4 c  c  f5"
        "f6 d1 d2 f7";
}
.vitrina-f1 { grid-area: f1; }
.vitrina-f2 { grid-area: f2; }
.vitrina-f3 { grid-area: f3; }
.vitrina-f4 { grid-area: f4; }
.vitrina-f5 { grid-area: f5; }
.vitrina-f6 { grid-area: f6; }
.vitrina-f7 { grid-area: f7; }
.vitrina-emblema { grid-area: em; }
.vitrina-centro { grid-area: c; }
.vitrina-dato--1 { grid-area: d1; }
.vitrina-dato--2 { grid-area: d2; }

/* Mosaicos con foto */
.vitrina-tile {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--vitrina-radio);
    background: #0b0b0b;
}
.vitrina .vitrina-tile__img { /* gana a ".woocommerce img { height: auto }" */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.vitrina .vitrina-tile:hover .vitrina-tile__img {
    transform: scale(1.05);
}
.vitrina-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 45%);
    pointer-events: none;
}
.vitrina-tile__titulo {
    position: absolute;
    z-index: 1;
    top: 16px;
    left: 20px;
    right: 20px;
    font-weight: 500;
    font-size: clamp(1rem, 1.5vw, 1.375rem);
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}

/* Emblema */
.vitrina-emblema {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 28px;
    border-radius: var(--vitrina-radio);
    background: var(--vitrina-gris);
}
.vitrina .vitrina-emblema img {
    width: 100%;
    max-width: 460px;
    height: auto;
}

/* Moto al centro */
.vitrina-centro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    text-align: center;
}
.vitrina-centro__nombre {
    margin: 0;
    font-weight: 800;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1;
    letter-spacing: -.01em;
    text-transform: uppercase;
    color: rgba(159, 166, 178, .5);
}
.vitrina .vitrina-centro__img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 72%;
    margin-top: -.25em;
    object-fit: contain;
}
.vitrina-centro__btn {
    margin-top: 20px;
    min-width: 280px;
    min-height: 48px;
}

/* Potencia / Motor */
.vitrina-dato {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2vw, 28px);
    padding: 16px;
    border-radius: var(--vitrina-radio);
    background: var(--vitrina-gris);
}
.vitrina-dato__icono {
    flex: none;
    width: clamp(40px, 4vw, 56px);
    height: clamp(40px, 4vw, 56px);
    color: var(--blue);
}
.vitrina-dato__label {
    margin: 0;
    font-weight: 600;
    font-size: clamp(1.25rem, 2.3vw, 2.25rem);
    line-height: 1.1;
    color: var(--blue);
}
.vitrina-dato__valor {
    margin: 4px 0 0;
    font-weight: 500;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    line-height: 1.1;
    text-align: center;
    color: #333;
}
.vitrina-dato__valor small {
    font-size: .6em;
}

.vitrina-legal {
    margin: 32px 0 0;
    font-size: .75rem;
    color: #6c757d;
}

/* ---------- Tablet y móvil: 2 columnas, la moto primero ---------- */
@media (max-width: 991.98px) {
    .vitrina-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
        grid-auto-rows: auto;
        grid-template-areas:
            "c  c"
            "f1 f2"
            "f3 em"
            "f4 f5"
            "d1 d2"
            "f6 f7";
    }
    .vitrina-tile,
    .vitrina-emblema {
        height: clamp(150px, 30vw, 240px);
    }
    .vitrina-f4,
    .vitrina-f5 {
        height: clamp(240px, 52vw, 400px);
    }
    .vitrina-dato {
        height: clamp(110px, 22vw, 170px);
    }
    .vitrina .vitrina-centro__img {
        max-height: none;
        width: min(100%, 520px);
    }
}

@media (max-width: 575.98px) {
    .vitrina {
        --vitrina-gap: 12px;
        --vitrina-radio: 10px;
    }
    .vitrina-tile__titulo {
        top: 10px;
        left: 12px;
        right: 12px;
        font-size: .9rem;
    }
    .vitrina-emblema {
        padding: 12px;
    }
    .vitrina-dato {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    .vitrina-centro__btn {
        width: 100%;
        min-width: 0;
    }
}

/* ======================================================
   Portada (en lugar de la galería de imágenes)
   ====================================================== */
.vitrina-hero {
    position: relative;
    float: left;
    width: 48%;
    margin-bottom: 2em;
    padding: clamp(28px, 3vw, 44px) clamp(12px, 2vw, 28px) clamp(20px, 2.4vw, 32px);
    overflow: hidden;
    border-radius: 12px;
    background: #b6b6b6 center / cover no-repeat;
    color: #fff;
}
.vitrina-hero__anio {
    position: absolute;
    top: clamp(12px, 1.6vw, 20px);
    right: clamp(16px, 2vw, 28px);
    font-weight: 800;
    font-size: clamp(1.25rem, 2.2vw, 2rem);
    line-height: 1;
    color: #fff;
}
.vitrina-hero__foto {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 6 / 5; /* fija el alto aunque cambie la foto al elegir color */
}
.vitrina-hero .vitrina-hero__img { /* gana a ".woocommerce img { height: auto }" */
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .18));
}
.vitrina-hero__datos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: clamp(12px, 2vw, 24px) 0 0;
    padding: 0;
    list-style: none;
}
.vitrina-hero__datos li {
    padding: 0 6px;
    text-align: center;
}
.vitrina-hero__datos li + li {
    border-left: 1px solid rgba(255, 255, 255, .5);
}
.vitrina-hero__valor {
    margin: 0;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 3rem);
    line-height: 1;
    white-space: nowrap;
    color: #fff;
}
.vitrina-hero__valor small {
    margin-left: .3em;
    font-size: .38em;
    text-transform: lowercase;
    color: #f5f5f7;
}
.vitrina-hero__label {
    margin: 10px 0 0;
    font-weight: 600;
    font-size: clamp(.62rem, 1vw, .95rem);
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--vitrina-hero-etiquetas, #444);
}

@media (max-width: 768px) {
    .vitrina-hero {
        float: none;
        width: 100%;
    }
}
