/* ======== CONFIGURACIÓN GENERAL ======== */
:root {
    --primary-color: #D10024;
    --secondary-color: #1A2533;
    --light-gray: #F4F6F8;
    --white-color: #FFFFFF;
    --text-color: #333;
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text-color); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--font-title); color: var(--secondary-color); margin-bottom: 20px; }
section { padding: 80px 0; }

/* ======== BOTONES ======== */
.btn { display: inline-block; padding: 12px 25px; border-radius: 5px; text-decoration: none; font-weight: bold; transition: all 0.3s ease; }
.btn-primary { background-color: var(--primary-color); color: var(--white-color); }
.btn-primary:hover { background-color: #a1001c; transform: translateY(-2px); }
.btn-whatsapp { background-color: #25D366; color: var(--white-color); }
.btn-whatsapp:hover { background-color: #128C7E; transform: translateY(-2px); }

/* ======== HEADER (ACTUALIZADO PARA MÓVIL) ======== */
.main-header { background-color: var(--white-color); box-shadow: 0 2px 5px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 1000; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.main-header .logo img { height: 50px; }
.main-nav ul { list-style: none; display: flex; align-items: center; }
.main-nav ul li { margin: 0 15px; }
.main-nav a { text-decoration: none; color: var(--secondary-color); font-weight: bold; font-family: var(--font-title); position: relative; padding: 10px 0; }
.main-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--primary-color); transition: width 0.3s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--primary-color); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.header-contact-mobile { display: none; } /* Oculto en desktop */

/* ======== BOTÓN HAMBURGUESA (NUEVO) ======== */
.nav-toggle {
    display: none; /* Oculto en desktop */
    position: relative;
    width: 30px;
    height: 30px;
    background: transparent;
    border: 0;
    cursor: pointer;
    z-index: 1001;
}
.hamburger {
    display: block;
    position: relative;
    width: 100%;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: transform 250ms ease-in-out;
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: transform 250ms ease-in-out, opacity 250ms ease;
}
.hamburger::before { transform: translateY(-8px); }
.hamburger::after { transform: translateY(8px); }
/* Animación a 'X' */
.nav-toggle.active .hamburger { transform: rotate(45deg); }
.nav-toggle.active .hamburger::before { opacity: 0; }
.nav-toggle.active .hamburger::after { transform: rotate(-90deg) translate(-8px); }


/* ======== HERO SECTION (NUEVO CARRUSEL) ======== */
.hero-slider {
    position: relative;
    height: 90vh;
    overflow: hidden;
    background-color: #333;
    z-index: 1; /* Asegura que esté detrás del header */
}
.hero-slides {
    display: flex;
    width: 500%; /* 100% * 5 imágenes (4 reales + 1 duplicada) */
    height: 100%;
    animation: slide 25s infinite ease-in-out;
}
.hero-slide {
    width: 20%; /* 100% / 5 imágenes */
    height: 100%;
    background-size: cover;
    background-position: center;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: white;
    text-align: center;
    width: 90%;
}
.hero-content h1 {
    font-size: 3.5rem;
    color: var(--white-color);
    margin-bottom: 20px;
}
.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
/* Animación del carrusel */
@keyframes slide {
    0%  { transform: translateX(0%); }
    16% { transform: translateX(0%); }
    20% { transform: translateX(-20%); }
    36% { transform: translateX(-20%); }
    40% { transform: translateX(-40%); }
    56% { transform: translateX(-40%); }
    60% { transform: translateX(-60%); }
    76% { transform: translateX(-60%); }
    80% { transform: translateX(-80%); }
    96% { transform: translateX(-80%); }
    100% { transform: translateX(0%); }
}

/* ======== SECCIÓN DE PRODUCTOS ======== */
.featured-products { background-color: var(--light-gray); }
.section-subtitle { text-align: center; font-size: 2.5rem; margin-bottom: 40px; position: relative; }
.section-subtitle:not(:first-of-type) { margin-top: 80px; }
.section-subtitle::after { content: ''; display: block; width: 60px; height: 3px; background: var(--primary-color); margin: 10px auto 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.product-card { background: var(--white-color); box-shadow: 0 4px 15px rgba(0,0,0,0.08); border-radius: 10px; overflow: hidden; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.product-card a { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.product-card:hover { transform: translateY(-10px); box-shadow: 0 8px 25px rgba(209, 0, 36, 0.15); }
.product-image-wrapper { background-color: #f9f9f9; padding: 10px; flex-grow: 1; display: flex; align-items: center; justify-content: center; }
.product-card img { width: 100%; max-height: 300px; height: auto; object-fit: contain; }
.product-card h3 { padding: 15px; font-size: 1.3rem; margin-top: auto; }
.product-card .category-tag { font-size: 0.8rem; font-weight: bold; color: #777; text-transform: uppercase; padding-bottom: 15px; }

/* ======== SOBRE NOSOTROS ======== */
.about-us .container { display: flex; align-items: center; gap: 50px; }
.about-content, .about-image { flex: 1; }
.about-image img { width: 100%; border-radius: 10px; }
.about-content h2 { text-align: left; font-size: 2.5rem; }
.about-content p { margin-bottom: 15px; }
.mission-vision { display: flex; gap: 30px; margin: 30px 0; }
.mission, .vision { flex: 1; background-color: var(--white-color); padding: 25px; border-radius: 8px; border-left: 5px solid var(--primary-color); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.mission-vision h3 { font-size: 1.5rem; margin-bottom: 10px; display: flex; align-items: center; }
.mission-vision h3 i { margin-right: 15px; color: var(--primary-color); }

/* ======== MARCAS (LOGOS MÁS GRANDES Y UNIFORMES) ======== */
.brands { background-color: var(--light-gray); padding: 60px 0; }
.brands h2 { font-size: 2.5rem; text-align: center; margin-bottom: 50px; position: relative; }
.brands h2::after { content: ''; display: block; width: 60px; height: 3px; background: var(--primary-color); margin: 10px auto 0; }
.brands-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; }
.brand-logo-container { background-color: white; border-radius: 10px; padding: 20px; display: flex; justify-content: center; align-items: center; height: 120px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.3s ease; }
.brand-logo-container:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.brand-logo-container img { max-height: 100%; max-width: 100%; width: auto; filter: grayscale(100%); opacity: 0.7; transition: all 0.3s ease; }
.brand-logo-container:hover img { filter: grayscale(0%); opacity: 1; }

/* ======== FOOTER ======== */
.main-footer { background-color: var(--secondary-color); color: var(--white-color); padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-column h4 { font-family: var(--font-title); margin-bottom: 20px; font-size: 1.2rem; position: relative; padding-bottom: 10px; }
.footer-column h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 2px; background-color: var(--primary-color); }
.footer-column p, .footer-column a { color: #ccc; text-decoration: none; font-size: 0.95rem; }
.footer-column a:hover { color: var(--white-color); }
.footer-column i { margin-right: 10px; width: 20px; text-align: center; color: var(--primary-color); }
.social-icons { margin-top: 20px; display: flex; gap: 15px; }
.social-icon { font-size: 1.5rem; transition: color 0.3s ease, transform 0.3s ease; }
.social-icon:hover { color: var(--primary-color); transform: translateY(-3px); }
.footer-links { list-style: none; padding-left: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a:hover { text-decoration: underline; }
.contact-details p { margin-bottom: 10px; }
.whatsapp-title { margin-top: 15px; color: var(--white-color) !important; }
.footer-column iframe { border-radius: 8px; margin-top: 10px; }
.footer-bottom { text-align: center; border-top: 1px solid #444; padding-top: 20px; font-size: 0.9rem; color: #ccc; }

/* ======== ESTILOS PARA SUBPÁGINAS ======== */
.submenu-page { padding-top: 80px; }
.breadcrumb { text-align: center; margin-bottom: 40px; }
.back-link { font-family: var(--font-title); text-decoration: none; color: var(--primary-color); font-weight: bold; padding: 10px 20px; border: 2px solid var(--primary-color); border-radius: 5px; transition: all 0.3s ease; }
.back-link:hover { background-color: var(--primary-color); color: var(--white-color); }
.submenu-content { max-width: 800px; margin: 0 auto; }
.sub-section-title { text-align: center; margin-top: 50px; font-size: 2rem; }

/* ========================================================= */
/* === CAMBIO CLAVE: INDICADOR DE SWIPE MEDIANTE ANIMACIÓN === */
/* ========================================================= */

/* 1. Definición de la animación de "amague" (flicker/teaser) */
@keyframes swipe-hint {
    0% { transform: translateX(0%); } /* Posición inicial */
    30% { transform: translateX(-5%); } /* Movimiento rápido hacia la izquierda (revela el borde de la siguiente imagen) */
    100% { transform: translateX(0%); } /* Vuelve a la posición inicial */
}

.carousel-container { 
    position: relative; 
    width: 100%; 
    max-width: 100%; 
    overflow: hidden; /* Clave para ocultar el contenido extra */
    margin: auto; 
    border-radius: 10px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.carousel-slides { 
    display: flex;
    /* 2. Aplicación de la animación a las diapositivas */
    /* *** MODIFICADO EL RETRASO A 3 SEGUNDOS PARA ASEGURAR LA CARGA *** */
    animation: swipe-hint 1.5s ease-out 3s 1; 
}
.carousel-slide { flex: 0 0 100%; max-width: 100%; }
.carousel-slide img { width: 100%; height: auto; display: block; }
.static-content { margin-top: 40px; text-align: center; }
.video-container { margin-bottom: 40px; position: relative; }
.video-container video { width: 100%; height: auto; border-radius: 10px; }
.sound-toggle-button { font-family: var(--font-body); background-color: rgba(0,0,0,0.6); color: white; border: none; padding: 10px 15px; border-radius: 5px; cursor: pointer; font-size: 1rem; transition: background-color 0.3s ease; margin-top: 15px; }
.sound-toggle-button:hover { background-color: var(--primary-color); }
.sound-toggle-button i { margin-right: 8px; }
.static-content img { width: 100%; max-width: 100%; height: auto; margin-bottom: 20px; border-radius: 8px;}

/* ======== RESPONSIVE DESIGN (ACTUALIZADO) ======== */
@media (max-width: 992px) {
    .about-us .container { flex-direction: column-reverse; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* --- HEADER MÓVIL --- */
    .nav-toggle { display: block; }
    .header-contact-desktop { display: none; }
    .main-nav {
        display: none;
        position: absolute;
        top: 80px; /* Altura del header */
        left: 0;
        right: 0;
        background: var(--white-color);
        box-shadow: 0 10px 10px -5px rgba(0,0,0,0.1);
    }
    .main-nav.active { display: block; }
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }
    .main-nav ul li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }
    .main-nav ul li a {
        padding: 15px 0;
        display: block;
        width: 100%;
    }
    .main-nav a::after { display: none; } /* Ocultar línea animada en móvil */
    .header-contact-mobile { display: block; }
    .header-contact-mobile .btn { width: 80%; margin: 10px auto 0; }

    /* --- HERO MÓVIL --- */
    .hero-slider { height: 70vh; }
    .hero-content h1 { font-size: 2.5rem; }
    
    /* --- OTROS --- */
    .section-subtitle, .about-content h2, .brands h2, .sub-section-title { font-size: 2rem; }
    .about-us .container { flex-direction: column-reverse; }
    .about-content h2 { text-align: center; }
    .mission-vision { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-column { text-align: center; }
    .footer-column h4::after { margin: 10px auto 0; }
    .social-icons { justify-content: center; }
    .contact-details p { text-align: center; }
    .submenu-page { padding-top: 40px; }
    .brands-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .brand-logo-container { height: 100px; }
}