:root {
    /* PALETA OFICIAL BEAST BITES — Identidad de Marca */
    --bg-base: #2E4142;   /* Feldgrau oscuro: fondo principal */
    --bg-alt: #466365;    /* Feldgrau claro: fondos alternativos, tarjetas, barras */
    --accent: #F56960;    /* Bittersweet: CTAs, botones, badges de urgencia */
    --accent-hover: #C46D5E; /* Indian Red: hover y estados activos */
    --text-main: #F3C98B; /* Sunset: texto principal, logo, destacados */
    --text-muted: #DAA588; /* Buff: textos secundarios/muted */

    --font-heading: 'Anton', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding { padding: 80px 0; }
.bg-alt { background-color: var(--bg-alt); }
.text-center { text-align: center; }

/* Tipografías e Impacto */
h1, h2, h3, .logo, .btn-primary, .btn-whatsapp {
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.highlight { color: var(--accent); }

/* Top Bar Fija */
.top-bar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--accent);
    color: white;
    font-weight: 800;
    font-size: 13px;
    text-align: center;
    padding: 6px 0;
    z-index: 2000;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-container p {
    display: inline-block;
    animation: marquee 20s linear infinite;
    padding-left: 100%;
}

@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Navegación Sticky */
.navbar {
    position: fixed;
    top: 30px; /* Debajo de top-bar */
    width: 100%;
    background-color: rgba(46, 65, 66, 0.97);
    padding: 15px 0;
    z-index: 1000;
    border-bottom: 1px solid #222;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 28px;
    color: white;
    text-decoration: none;
    letter-spacing: 2px;
}
.logo span { color: var(--text-main); }

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 30px;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}
.menu-toggle .bar {
    width: 25px; height: 3px;
    background-color: white;
    margin: 3px 0; transition: 0.3s;
}

/* Botones y CTAs (Conversion Focus) */
.btn-primary, .btn-whatsapp, .btn-action {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 18px 30px;
    font-size: 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(245, 105, 96, 0.3);
}

.btn-primary:hover, .btn-action:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 105, 96, 0.5);
}

.btn-secundario {
    display: inline-block;
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--accent);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
}
.btn-secundario:hover { background-color: var(--accent); }

/* Formularios en línea */
.micro-form {
    background: rgba(28, 28, 28, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    display: inline-block;
    max-width: 100%;
}
.form-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.form-group input {
    flex-grow: 1;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--accent-hover);
    background: var(--bg-base);
    color: var(--text-main);
    font-size: 16px;
    min-width: 250px;
    font-family: var(--font-body);
}
.form-group input:focus { outline: 1px solid var(--accent); }
.form-group button { width: auto; flex-grow: 1; }

/* Hero Section — CLS FIX: reservamos espacio explícito antes de que el video cargue */
.hero-section {
    position: relative;
    min-height: 100svh; /* svh evita el salto de la barra mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 60px;
    /* Aislamiento de layout: el video no puede desplazar hermanos */
    contain: layout;
}

/* CLS FIX: video con dimensiones intrínsecas declaradas + will-change GPU */
.hero-video {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; z-index: -2;
    will-change: transform; /* fuerza capa GPU, sin stacking context shift */
}

.hero-section .overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(0deg, rgba(46,65,66,1) 0%, rgba(46,65,66,0.6) 50%, rgba(46,65,66,0.8) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center; z-index: 1; max-width: 800px; padding: 20px;
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 6rem);
    line-height: 1.1; margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.2rem; color: #ddd; margin-bottom: 30px; font-weight: 600;
}

/* Barra de Confianza */
.trust-bar {
    background-color: var(--bg-alt); border-top: 1px solid #333; border-bottom: 1px solid #333;
}
.trust-container {
    display: flex; justify-content: space-around; flex-wrap: wrap;
    padding: 20px 0; width: 90%; margin: 0 auto;
}
/* CONTRASTE: blanco sobre Feldgrau = ratio ~4.8:1 (pasa WCAG AA) */
.trust-item {
    font-size: 14px; font-weight: 700; color: #FFFFFF;
    display: flex; align-items: center; gap: 8px; margin: 10px;
}
.trust-item .icon { font-size: 18px; }

/* Productos */
.section-title { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 40px; }

.grid-productos {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px;
}

.card-producto {
    background: var(--bg-alt); border: 1px solid #2A2A2A; border-radius: 8px;
    overflow: hidden; display: flex; flex-direction: column; position: relative;
    transition: var(--transition);
}
.card-producto:hover { border-color: var(--accent); transform: translateY(-5px); }
.card-destacada { border: 2px solid var(--accent); box-shadow: 0 0 20px rgba(192, 57, 43, 0.2); }

.badge-fuego {
    position: absolute; top: 15px; right: 15px; background: var(--accent);
    color: white; font-weight: bold; padding: 5px 10px; border-radius: 4px; font-size: 12px;
}

/* CLS FIX: aspect-ratio declarado para que el navegador pre-reserve el espacio
   antes de que las imágenes WebP carguen (evita layout shift en productos) */
.card-img-wrapper {
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 200px;
    max-height: 260px;
    background: #111;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    overflow: hidden;
}
.card-img-wrapper img {
    max-height: 100%; max-width: 100%; object-fit: contain;
    /* Stabilize durante carga */
    width: auto; height: auto;
}

.card-info { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.card-info h3 { font-size: 24px; margin-bottom: 5px; }
.card-info .desc { color: var(--text-muted); font-size: 14px; margin-bottom: 15px; flex-grow: 1; }
.card-info .precio { font-size: 32px; font-family: var(--font-heading); color: white; margin-bottom: 20px; }

/* Prueba Social */
.grid-testimonios {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.testimonio-card {
    background: var(--bg-base); padding: 25px; border-radius: 8px; border: 1px solid #333;
}
.t-header { display: flex; align-items: center; margin-bottom: 15px; }
.avatar {
    width: 50px; height: 50px; background: #333; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: bold; margin-right: 15px;
}
.t-info h4 { font-family: var(--font-body); font-weight: 800; font-size: 16px; margin: 0; }
/* p.t-name: reemplaza h4 para mantener jerarquía de headings correcta */
.t-info .t-name { font-family: var(--font-body); font-weight: 800; font-size: 16px; margin: 0; color: var(--text-main); }
.t-info span { color: var(--text-muted); font-size: 12px; }
.stars { color: #F1C40F; letter-spacing: 2px; margin-bottom: 10px; }

/* Sección Urgencia */
.urgency-box {
    background: radial-gradient(circle, var(--accent-hover) 0%, var(--bg-base) 100%);
    border: 1px solid var(--accent); padding: 60px 30px; border-radius: 10px;
}
.urgency-sub { font-size: 1.2rem; margin-bottom: 30px; color: #ccc; }
.btn-large { font-size: 24px; padding: 20px 50px; }

/* Blog */
.grid-blog {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px;
}
.card-blog {
    background: var(--bg-base); border: 1px solid #333; border-radius: 8px; overflow: hidden;
}
.blog-img { height: 200px; background-size: cover; background-position: center; border-bottom: 2px solid var(--accent); }
.blog-info { padding: 25px; }
.blog-info h3 { font-family: var(--font-body); font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.blog-info p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

/* FAQ */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid #333; }
.faq-question {
    width: 100%; text-align: left; background: none; border: none; color: white;
    font-family: var(--font-heading); font-size: 20px; padding: 20px 0;
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.faq-answer {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease; color: var(--text-muted);
}
.faq-answer p { padding-bottom: 20px; }

/* Pop-up */
.popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}
.popup-overlay.hidden { display: none; }
.popup-box {
    background: var(--bg-alt); max-width: 800px; width: 90%; border-radius: 12px;
    display: flex; overflow: hidden; position: relative; border: 2px solid var(--accent);
}
.popup-close {
    position: absolute; top: 15px; right: 20px; background: none; border: none;
    color: white; font-size: 30px; cursor: pointer; z-index: 10;
}
.popup-img { width: 40%; background-size: cover; background-position: center; background-color: #050505;}
.popup-text { width: 60%; padding: 40px; text-align: center; }
.popup-text h2 { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.popup-text p { font-size: 18px; margin-bottom: 25px; }
.popup-text input {
    width: 100%; padding: 15px; border-radius: 6px; border: 1px solid var(--accent-hover);
    background: var(--bg-base); color: var(--text-main); margin-bottom: 15px; text-align: center; font-size: 16px;
}

/* Footer & Global WA CTA */
.footer { border-top: 1px solid #333; padding: 60px 0 20px 0; text-align: center; }
.footer .logo { font-size: 40px; display: block; margin-bottom: 10px; }
.footer-links p a { color: var(--accent); text-decoration: none; font-weight: bold; }
.social-icons { margin: 20px 0; }
.social-icons a { color: white; text-decoration: none; margin: 0 10px; }
.footer-bottom { margin-top: 40px; font-size: 12px; color: #666; }

.floating-whatsapp {
    position: fixed; bottom: 30px; right: 30px;
    background: #25D366; color: white; width: 60px; height: 60px;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4); z-index: 1000;
    transition: var(--transition);
}
.floating-whatsapp:hover { transform: scale(1.1); background: #128C7E; }

/* Animaciones / Fade-in */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none; flex-direction: column; width: 100%; position: absolute;
        top: 60px; left: 0; background: var(--bg-alt); padding: 20px;
    }
    .nav-links.active { display: flex; }
    .nav-links a { margin: 15px 0; }
    .menu-toggle { display: flex; }
    
    .hero-title { font-size: 3rem; }
    .form-group input { width: 100%; }
    
    .trust-container { flex-direction: column; align-items: center; }
    
    .popup-box { flex-direction: column; }
    .popup-img { width: 100%; height: 200px; }
    .popup-text { width: 100%; padding: 30px 20px; }
}
