/* ==========================================================================
   VSL – Estilos Otimizados (Mobile-First)
   ========================================================================== */

/* Reset e base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Evita ajuste de tamanho de fonte em giro de tela no mobile */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Source Sans 3', Arial, sans-serif;
    background: #000;
    color: #f5f5f5;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reduz movimento para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Variáveis */
:root {
    --cnn-red: #cc0000;
    --cnn-red-dark: #9f0000;
    --cnn-red-hover: #b30000;
    --bg-dark: #000;
    --card-bg: #141414;
    --border-color: #2a0a0a;
    --text-main: #f5f5f5;
    --text-muted: #aaa;
    --radius: 12px;
    --shadow: 0 12px 28px rgba(0, 0, 0, 0.8);
    --container-max: 1180px;
    --container-padding: 16px;

    /* Tipografia fluida (clamp) */
    --fs-h4: clamp(20px, 4vw, 28px);
    --fs-price: clamp(32px, 8vw, 44px);
    --fs-cta: clamp(16px, 3.5vw, 18px);
    --fs-supply: clamp(12px, 2.5vw, 14px);
}

/* Container principal */
.page-shell {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 20px 0 calc(60px + env(safe-area-inset-bottom)) 0;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* ===== Vídeo ===== */
.video-section {
    margin: 0 auto 24px;
    padding: 12px;
    max-width: 760px;
    width: 100%;
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

/* Garante que o web component do player não transborde */
.video-section > * {
    max-width: 100%;
    width: 100%;
}

/* Placeholder do player (responsivo, mantém proporção 16:9) */
.vturb-player-placeholder {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    z-index: 0;
    background-color: black;
    border-radius: 8px;
    overflow: hidden;
}

/* ===== Grid de produtos ===== */
.products-grid {
    display: grid;
    /* Mobile-first: 1 coluna por padrão */
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}

/* Tablet e desktop: 2 ou 3 colunas */
@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

/* ===== Card de produto ===== */
.product-card {
    background: var(--card-bg);
    border: 2px solid var(--cnn-red);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    border-color: var(--cnn-red-hover);
    transform: translateY(-2px);
}

/* Visual da imagem */
.product-card__visual {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 14px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.product-card__visual img {
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Corpo do card */
.product-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.product-card__body h4 {
    font-family: 'Roboto Condensed', Arial, sans-serif;
    font-size: var(--fs-h4);
    color: #fff;
    margin: 0;
}

.product-card__body .bb-supply {
    color: var(--text-muted);
    font-size: var(--fs-supply);
}

.product-card__body .bb-price-highlight {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
}

.product-card__body .bb-price {
    font-family: 'Roboto Condensed', Arial, sans-serif;
    font-size: var(--fs-price);
    color: var(--cnn-red);
    line-height: 1;
    font-weight: 700;
}

/* CTA */
.product-card__cta {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: var(--cnn-red);
    color: #fff;
    text-decoration: none;
    font-family: 'Roboto Condensed', Arial, sans-serif;
    font-size: var(--fs-cta);
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    text-align: center;
    /* Touch target mínimo */
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card__cta:hover,
.product-card__cta:focus-visible {
    background: var(--cnn-red-hover);
}

.product-card__cta:active {
    transform: scale(0.98);
}

/* ===== Ajustes finos mobile ===== */
@media (max-width: 480px) {
    .page-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .video-section {
        padding: 10px;
        margin-bottom: 20px;
    }

    .product-card {
        padding: 20px 14px;
    }

    .product-card__visual {
        min-height: 100px;
        padding: 12px 8px;
    }

    .product-card__visual img {
        max-width: 120px;
    }

    .product-card__body h4 {
        font-size: 22px;
    }

    .product-card__body .bb-price {
        font-size: 36px;
    }

    .product-card__cta {
        font-size: 16px;
        padding: 16px 16px;
        min-height: 48px;
    }
}

/* Suporte a telas muito pequenas (se abaixo de 360px) */
@media (max-width: 360px) {
    .products-grid {
        gap: 12px;
    }

    .product-card {
        padding: 18px 12px;
    }

    .product-card__body h4 {
        font-size: 20px;
    }

    .product-card__body .bb-price {
        font-size: 32px;
    }
}

/* Esconde cards até o vídeo terminar (estado inicial controlado pelo JS) */
.products-grid[style*="display: none"],
.products-grid.hidden {
    display: none !important;
}

/* Foco visível para acessibilidade */
.product-card__cta:focus-visible,
.product-card:focus-within {
    outline: 2px solid var(--cnn-red);
    outline-offset: 2px;
}