/* =========================================================
   HYPE — NUTRITION
   ========================================================= */

body {
    padding-top: 53px;
}

/* ===== HERO ===== */
.pw-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: #0a0a0a;
    background-size: cover;
    background-position: center;
}

.pw-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 700px;
    margin-left: 15%;
    padding: 5rem 0;
    color: #ffffff;
}

.pw-mfp-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1.5rem;
    display: block;
}

.pw-hero__title {
    font-family: 'QarantaBold', Arial, sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-transform: uppercase;
    font-style: italic;
    color: #ffffff;
    line-height: 1.0;
    margin-bottom: 1.5rem;
}

.pw-x {
    color: #4cff00;
}

.pw-hero__content p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.pw-products-section {
    position: relative;
    padding: 5rem 0;
}

/* =========================================================
   HERO / CABECERA
   ========================================================= */

.pw-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: #0a0a0a;
    background-size: cover;
    background-position: center;
}

.pw-hero .container {
    position: relative;
    z-index: 2;
}


/* =========================================================
   TÍTULO DE SECCIÓN
   ========================================================= */

.section-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 50px;
}

.section-title {
    font-family: 'QarantaBold', Arial, sans-serif;
    color: #ffffff;
    font-style: italic;
    text-transform: uppercase;
    margin: 0;
}

.stw-line {
    flex: 1;
    max-width: 250px;
    height: 2px;
    background: #04dbff;
}


/* =========================================================
   GRID GENERAL DE PRODUCTOS
   ========================================================= */

.pw-products__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    column-gap: 28px;
    row-gap: 80px;

    width: 100%;
    max-width: 1500px;

    margin: 0 auto;
}


/* =========================================================
   CARD BASE
   ========================================================= */

.pw-product-card {
    position: relative;

    width: 100%;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #0a0a0a;
    border-radius: 24px;

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.pw-product-card:hover {
    transform: translateY(-6px);
}


/* =========================================================
   TIPO 1 — CARDS ANCHAS
   Proteínas / Creatina / Glutamina / etc.
   ========================================================= */

.pw-product-card--wide {
    width: 100%;
}


/* Foto */

.pw-product-card--wide .pw-card__photo {
    width: 100%;
    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: #111111;

    border-radius: 24px 24px 0 0;
}


/* Imagen */

.pw-product-card--wide .pw-card__image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform .4s ease;
}

.pw-product-card--wide:hover .pw-card__image {
    transform: scale(1.04);
}


/* =========================================================
   NUTRITION — CARDS BOTELLAS / LATAS
   Misma proporción visual que las cards de Energy
   ========================================================= */

.pw-product-card--tall {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* La card no crece verticalmente demasiado */
.pw-product-card--tall .pw-card__photo {
    width: 100%;
    aspect-ratio: 270 / 390;
    overflow: hidden;
}

/* Mantener la imagen dentro de la proporción de la card */
.pw-product-card--tall .pw-card__image,
.pw-product-card--tall .pw-card__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
   VIDEO — CARDS ALTAS
   ========================================================= */

.pw-product-card--tall .pw-card__video {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 0;

    z-index: 3;

    transition: opacity .3s ease;
}

.pw-product-card--tall:hover .pw-card__video {
    opacity: 1;
}

.pw-product-card--tall .pw-card__image {
    z-index: 2;
}


/* =========================================================
   LOGO
   ========================================================= */

.pw-card__logo {
    width: 100%;
    height: 65px;
    min-height: 65px;

    padding: 5px 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #0a0a0a;
    overflow: hidden;
}

.pw-card__logo img {
    display: block;

    /* IMPORTANTE:
       controlamos el tamaño por ALTURA,
       no por anchura */
    height: 38px;
    width: auto;

    max-width: 90%;

    object-fit: contain;
}


/* =========================================================
   INFORMACIÓN
   ========================================================= */

.pw-card__info {
    width: 100%;

    min-height: 65px;
    height: 65px;

    padding: 8px 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    background-color: #111111;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.pw-card__info p {
    margin: 0;

    max-width: 420px;

    color: #ffffff;

    font-size: .75rem;
    line-height: 1.25;
}


/* =========================================================
   BOTÓN DISCOVER
   ========================================================= */

.pw-card__btn {
    width: 100%;

    padding: 6px 20px 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #0a0a0a;
}

.pw-card__btn a {
    position: relative;

    display: block;

    width: 180px;

    line-height: 0;
}

.pw-card__btn img {
    display: block;

    width: 100%;
    height: auto;

    transition: opacity .25s ease;
}

.pw-card__btn .btn-normal {
    opacity: 1;
}

.pw-card__btn .btn-hover {
    position: absolute;
    inset: 0;

    opacity: 0;
}

.pw-card__btn a:hover .btn-normal {
    opacity: 0;
}

.pw-card__btn a:hover .btn-hover {
    opacity: 1;
}


/* =========================================================
   BOTONES ENERGY / WELLNESS
   ========================================================= */

.pw-categories {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 1.5rem;

    margin-top: 70px;
}

.pw-cat-btn {
    width: 320px;
    min-width: 320px;

    padding: .45rem 2rem;

    border-radius: 15px;

    font-family: 'QarantaBold', Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 800;

    letter-spacing: .14em;
    text-transform: uppercase;
    text-align: center;

    text-decoration: none;

    color: #0a0a0a !important;

    transition:
        transform .25s ease,
        opacity .25s ease;
}

.pw-cat-btn:hover {
    transform: translateY(-3px);
    opacity: .9;
    color: #ffffff !important;
}

.pw-cat-btn--energy {
    background-color: #4cff00;
}

.pw-cat-btn--wellness {
    background-color: #ff2d78;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1270px) {

    .pw-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 50px 24px;
    }

}


@media (max-width: 700px) {

    .pw-products__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .pw-product-card--wide .pw-card__photo {
        aspect-ratio: 16 / 10;
    }

    .pw-product-card--tall .pw-card__photo {
        aspect-ratio: 270 / 425;
    }

    .pw-categories {
        flex-direction: column;
    }

    .pw-cat-btn {
        width: 320px;
        min-width: 320px;
    }

}

/* =========================================================
NUTRITION — TAMAÑOS FINALES DE LAS CARDS
========================================================= */

/* Espacio entre bloques 3x2 */
.pw-products__grid+.pw-products__grid {
    margin-top: 80px;
}


/* =========================================================
CARDS DE BOTELLAS / LATAS
========================================================= */

.pw-product-card--tall {
    width: 100%;
    max-width: 270px;
    margin: 0 auto;
}

/* Foto proporcional */
.pw-product-card--tall .pw-card__photo {
    width: 100%;
    aspect-ratio: 270 / 400;
}


/* =========================================================
CARDS DE PROTEÍNAS
========================================================= */

.pw-product-card--wide {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.pw-product-card--wide .pw-card__photo {
    aspect-ratio: 16 / 8.5;
}


/* =========================================================
DESKTOP
========================================================= */

@media (min-width: 1101px) {

    .pw-products__grid {
        align-items: start;
    }

    .pw-product-card--tall {
        max-width: 270px;
    }

    .pw-product-card--wide {
        max-width: 430px;
    }

}


/* =========================================================
TABLET
========================================================= */

@media (max-width: 1270px) {

    .pw-product-card--tall {
        max-width: 270px;
    }

    .pw-product-card--wide {
        max-width: 430px;
    }

    .pw-products__grid+.pw-products__grid {
        margin-top: 60px;
    }

}


/* =========================================================
MÓVIL
========================================================= */

@media (max-width: 700px) {

    .pw-product-card--wide {
        max-width: 100%;
    }

    /* Cards verticales (Pre-Workout Drinks, Shots, L-Carnitine...): mismo tamaño que
       las de Energy / Wellness en móvil, centradas. Antes ocupaban todo el ancho. */
    .pw-product-card--tall {
        width: 100%;
        max-width: 280px;
    }

    .pw-products__grid+.pw-products__grid {
        margin-top: 45px;
    }

}

.pw-card__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .3s ease;

}

.pw-card__video {
    opacity: 0;
    z-index: 3;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}



.pw-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.pw-product-card:hover .pw-card__photo img {
    transform: scale(1.04);
}

.pw-card__photo {
    position: relative;
    overflow: hidden;
}

.pw-products__grid--4col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1270px) {
    .pw-products__grid--4col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .pw-products__grid--4col {
        grid-template-columns: 1fr;
    }
}

.pw-products__grid--4col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1270px) {
    .pw-products__grid--4col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .pw-products__grid--4col {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   BOTÓN DISCOVER FLOTANTE — versión reforzada (pisa reglas antiguas)
   ========================================================= */

.pw-product-card,
.pw-product-card--wide,
.pw-product-card--tall {
    overflow: visible !important;
    border-radius: 24px !important;
}

.pw-card__photo,
.pw-product-card--wide .pw-card__photo,
.pw-product-card--tall .pw-card__photo {
    border-radius: 24px 24px 0 0 !important;
    overflow: hidden !important;
}

.pw-card__info {
    border-radius: 0 0 24px 24px !important;
    padding-bottom: 34px !important;
    /* hueco para que el botón no tape el texto */
}

.pw-card__btn {
    position: absolute !important;
    left: 50% !important;
    bottom: 0 !important;
    transform: translate(-50%, 50%) !important;
    background: none !important;
    padding: 0 !important;
    width: auto !important;
    z-index: 5 !important;
}

/* Más aire en el texto de info */
.pw-card__info {
    min-height: auto !important;
    height: auto !important;
}

.pw-card__info {
    min-height: 110px !important;
}

/* Sin transición: el hover del botón cambia al instante, sin transparencia intermedia */
.pw-card__btn img {
    transition: none !important;
}

.pw-card__info p {
    margin-top: -12px !important;
}

.pw-products-section {
    position: relative;
    overflow: hidden;
}

.pw-products-section__bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* =========================================================
   NUTRITION — Buscador y filtro por categoría
========================================================= */

.pw-filter-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 0 auto 50px;
    max-width: 1100px;

    /* Sombra general */
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.pw-filter-search {
    width: 100%;
    max-width: 420px;
    padding: 12px 20px;
    border: 2px solid #04DBFF;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;

    /* Drop shadow */
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.45);

    transition:
        box-shadow .25s ease,
        border-color .25s ease;
}

.pw-filter-search::placeholder {
    color: #fdfafa;
    opacity: 1;
}

.pw-filter-search:focus {
    box-shadow:
        0 0 0 2px #04DBFF,
        0 8px 24px rgba(0, 0, 0, 0.55);
}

.pw-filter-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.pw-filter-pill {
    padding: 8px 18px;
    border: 1.5px solid #04DBFF;
    border-radius: 15px;
    background: transparent;
    color: #ffffff;
    font-family: 'QarantaBold', Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;

    /* Drop shadow */
    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.45);

    transition:
        background-color .2s ease,
        color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.pw-filter-pill:hover {
    background: #04DBFF;
    color: #0a0a0a;
    box-shadow:
        0 7px 18px rgba(0, 0, 0, 0.55);

    transform: translateY(-2px);
}

.pw-filter-pill.is-active {
    background: #04DBFF;
    color: #0a0a0a;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.5);
}

.pw-filter-empty {
    text-align: center;
    color: #ffffff;
    font-size: 1rem;
    margin: 40px 0;

    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* La tarjeta filtrada se oculta por completo */
.pw-product-card.is-filtered-out {
    display: none !important;
}

/* Si un bloque entero queda sin resultados */
.pw-products__grid.is-empty {
    display: none !important;
}
/* Más aire entre los botones Energy/Nutrition/Wellness y el footer */
.pw-categories {
    margin-bottom: 300px;
    gap: 3rem;
}

/* =========================================================
   NUTRITION — Grid → Flexbox para centrar filas incompletas
   ========================================================= */

.pw-products__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 28px;
    row-gap: 80px;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

/* 3 por fila — SOLO para cards sin modificador --wide/--tall,
   que ya tienen su propio tamaño fijo */
.pw-products__grid > .pw-product-card:not(.pw-product-card--wide):not(.pw-product-card--tall) {
    flex: 0 1 calc((100% - 2 * 28px) / 3);
    max-width: calc((100% - 2 * 28px) / 3);
}

@media (max-width: 1270px) {

    .pw-products__grid > .pw-product-card:not(.pw-product-card--wide):not(.pw-product-card--tall) {
        flex-basis: calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
        column-gap: 24px;
    }

}

@media (max-width: 700px) {

    .pw-products__grid > .pw-product-card:not(.pw-product-card--wide):not(.pw-product-card--tall) {
        flex-basis: 100%;
        max-width: 340px;      /* antes 100%: ocupaban casi todo el ancho de la pantalla */
    }

}
@media (max-width: 1270px) {

    .pw-product-card.in-view .pw-card__video {
        opacity: 1;
    }

    .pw-product-card.in-view .pw-card__image {
        opacity: 0;
    }

}

/* =========================================================
   FIX 1 — Cards --tall / --wide juntas (L-Carnitine, etc.)
   El "margin: 0 auto" de estas cards, dentro de un contenedor
   flex, absorbe todo el espacio libre y las separa mucho entre
   sí (pisa el justify-content: center). Se anula el margen
   lateral; el centrado y el hueco (28px) los gestiona el flex.
   El tamaño de las cards NO cambia (max-width intacto).
   ========================================================= */

.pw-products__grid > .pw-product-card--tall,
.pw-products__grid > .pw-product-card--wide,
.pw-products__all > .pw-product-card--tall,
.pw-products__all > .pw-product-card--wide {
    margin-left: 0;
    margin-right: 0;
}


/* =========================================================
   FIX 2 — Vista "All": todas las cards seguidas
   Los 5 bloques del HTML son solo agrupación del código. Dentro
   de .pw-products__all se "disuelven" (display: contents) y sus
   cards fluyen en UNA sola rejilla flex continua, así ya no
   quedan cards sueltas al final de cada bloque (p. ej. la
   última de Isolate o la última de BCAA).
   No cambia el tamaño ni la estructura de cada card.
   ========================================================= */

.pw-products__all {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    column-gap: 28px;
    row-gap: 80px;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.pw-products__all > .pw-products__grid {
    display: contents;
}

/* Las cards siguen siendo hijas directas de .pw-products__grid en el DOM,
   así que mantienen sus reglas de tamaño (1/3, 1/2, 100%, --tall, etc.) */

@media (max-width: 1270px) {

    .pw-products__all {
        column-gap: 24px;
        row-gap: 50px;
    }

}

@media (max-width: 700px) {

    .pw-products__all {
        row-gap: 40px;
    }

}

/* =========================================================
   TEXTOS, FILTROS, BOTONES INFERIORES Y PADDING LATERAL
   TABLET Y MÓVIL — mismo tratamiento que en Energy.
   Va al final del archivo a propósito: así gana a las reglas
   de arriba (p. ej. el margin-bottom: 300px de .pw-categories
   y el min-width: 320px de .pw-cat-btn).
   Medidas en px/vw para que no dependan del font-size del html.
========================================================= */

/* Tablet y móvil grande (≤ 1270px) */
@media (max-width: 1270px) {

    /* Aire a los lados: las cards ya no tocan el borde de la pantalla */
    .pw-products-section {
        padding-left: 32px;
        padding-right: 32px;
    }

    /* Los botones pasan a la línea siguiente si no caben, en vez de salirse de la pantalla */
    .pw-categories {
        flex-wrap: wrap;
        gap: 16px 24px;
        margin-top: 60px;
        margin-bottom: 160px;
    }

    .pw-cat-btn {
        flex: 1 1 240px;
        width: auto;
        max-width: 320px;
        min-width: 0;
    }
}

/* Móvil (≤ 700px) */
@media (max-width: 700px) {

    .pw-products-section {
        padding-left: 24px;
        padding-right: 24px;
    }

    /* Título: escala con la pantalla para que nunca se salga */
    .pw-products-section .section-title {
        font-size: clamp(22px, 7vw, 32px) !important;
        line-height: 1.1;
        white-space: nowrap;
    }

    .section-title-wrap {
        gap: 12px;
        margin-bottom: 16px;
    }

    .stw-line {
        min-width: 16px;
        max-width: 60px;
    }

    /* Subtítulo: legible y con aire hasta el buscador / las cards */
    .section-subtitle {
        font-size: 15px;
        line-height: 1.65;
        margin: 0 auto 40px;
        padding: 0 4px;
    }

    /* Buscador y filtros por categoría */
    .pw-filter-bar {
        margin-bottom: 40px;
        gap: 16px;
    }

    .pw-filter-search {
        font-size: 16px;           /* evita el zoom automático de iOS al enfocar */
        padding: 12px 18px;
    }

    .pw-filter-cats {
        gap: 8px;
    }

    .pw-filter-pill {
        padding: 9px 16px;
        font-size: 13px;
    }

    /* Botones Energy / Wellness: apilados, anchos y fáciles de pulsar */
    .pw-categories {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        margin-top: 64px;       /* deja sitio al botón Discover flotante de la última card */
        margin-bottom: 90px;    /* antes 300px: demasiado en móvil */
    }

    .pw-cat-btn {
        flex: none;
        width: 100%;
        max-width: 320px;
        min-width: 0;
        padding: 13px 20px;
        font-size: 18px;
        letter-spacing: .1em;
    }
}

/* Móviles muy pequeños (≤ 380px) */
@media (max-width: 380px) {

    .pw-products-section {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* En pantallas táctiles no dejar el hover "pegado" tras pulsar */
@media (hover: none) {
    .pw-cat-btn:hover {
        transform: none;
        opacity: 1;
        color: #0a0a0a !important;
    }
}