/* VARIABLES GLOBALES Y RESET BÁSICO */
:root {
    --primary-red: #ff0000;
    --secondary-gray: #f7f7f7;
    --dark-text: #333;
    --light-text: #fff;
    --max-width: 1200px;
}

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

body {
    font-family: Arial, sans-serif;
    color: var(--dark-text);
    background-color: #fff;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ---------------------------------------------------- */
/* CABECERA (HEADER) Y NAVEGACIÓN */
/* ---------------------------------------------------- */

.header-top {
    background-color: var(--primary-red);
    color: var(--light-text);
    padding: 10px 0;
    font-size: 0.8em;
}
.header-top .container {
    display: flex;
    justify-content: space-between;
}

.header-main {
    display: flex;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-red);
    flex-shrink: 0;
}

.search-bar {
    display: flex;
    flex-grow: 1;
    margin: 0 40px;
    max-width: 500px;
}
.search-bar input {
    padding: 10px;
    border: 1px solid #ccc;
    flex-grow: 1;
}
.search-bar button {
    background-color: var(--primary-red);
    color: var(--light-text);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
}

.contact-info i {
    font-size: 1.5em;
    color: var(--primary-red);
}

.menu-toggle {
    display: none; /* Oculto en escritorio */
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--dark-text);
}

.navbar {
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
}
.navbar ul {
    list-style: none;
    display: flex;
    padding: 0;
}
.navbar a {
    text-decoration: none;
    color: var(--dark-text);
    padding: 10px 20px;
    display: block;
    font-weight: bold;
}
.navbar a:hover {
    background-color: #ddd;
}

/* ---------------------------------------------------- */
/* GRID 1: HERO Y TIENDAS */
/* ---------------------------------------------------- */

.hero-section {
    display: grid;
    /* Escritorio: Banner (2 partes) | Tiendas (1 parte) */
    grid-template-columns: 2fr 1fr; 
    gap: 20px;
    margin-top: 20px;
}

.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.stores-grid {
    background-color: var(--secondary-gray);
    padding: 15px;
    text-align: center;
    /* Grid 3 columnas x 2 filas para los ítems de tienda */
    display: grid; 
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.stores-grid h2 {
    grid-column: 1 / span 3; /* El título ocupa las 3 columnas */
    margin-bottom: 10px;
    font-size: 1.1em;
}
.store-item {
    background-color: var(--light-text);
    padding: 10px 5px;
    border: 1px solid #eee;
    font-size: 0.8em;
}

/* ---------------------------------------------------- */
/* BOTONES CTA */
/* ---------------------------------------------------- */

.cta-buttons {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 20px auto;
}
.btn {
    flex-grow: 1;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    cursor: pointer;
    color: var(--light-text);
}
.btn-offer {
    background-color: #f55; /* Rojo más suave */
}
.btn-event {
    background-color: #2ab6a7; /* Teal */
}

/* ---------------------------------------------------- */
/* CARRUSELES (FLEXBOX PARA SCROLL HORIZONTAL) */
/* ---------------------------------------------------- */

.section-title h1 {
    color: var(--primary-red);
    font-size: 2em;
    margin-top: 40px;
}

.carousel-container {
    position: relative;
    overflow: hidden; /* Oculta los botones si el contenido es container */
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    overflow-x: scroll; /* Permite el scroll horizontal */
    scroll-behavior: smooth;
    gap: 20px;
    padding: 10px 5%; /* Añade padding para ver los items parcialmente */
    -ms-overflow-style: none; /* Ocultar barra de scroll en IE y Edge */
    scrollbar-width: none; /* Ocultar barra de scroll en Firefox */
}
.carousel-track::-webkit-scrollbar {
    display: none; /* Ocultar barra de scroll en Chrome y Safari */
}

.card {
    min-width: 280px; /* Ancho fijo para las tarjetas */
    height: 350px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.card-novedad { border: 1px solid #ccc; }

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    z-index: 10;
}
.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }

/* ---------------------------------------------------- */
/* SECCIÓN CINE */
/* ---------------------------------------------------- */

.cine-section {
    background-color: #222;
    color: var(--light-text);
    padding: 30px 0;
    margin: 40px 0;
}
.cine-section h2 {
    font-size: 2em;
    margin-bottom: 20px;
}
.cine-track {
    padding: 0 5%;
}
.card-cine {
    background-color: #000;
    color: var(--light-text);
    min-width: 250px;
}

/* ---------------------------------------------------- */
/* GRID 2: BANNERS DE DESCUENTOS */
/* ---------------------------------------------------- */

.discounts-section h2 {
    color: var(--primary-red);
    margin-top: 20px;
}
.banner-grid {
    display: grid;
    /* Escritorio: 3 columnas de igual tamaño */
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px;
    margin: 30px 0;
}

.banner-item {
    background-color: var(--primary-red);
    color: white;
    padding: 40px 20px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

/* ---------------------------------------------------- */
/* PIE DE PÁGINA (FOOTER) */
/* ---------------------------------------------------- */

.footer {
    background-color: #333;
    color: #ccc;
    margin-top: 40px;
}

.footer-columns {
    display: grid;
    /* Escritorio: Logo (1.5) | Horarios (1.5) | Formulario (1) */
    grid-template-columns: 1.5fr 1.5fr 1fr; 
    gap: 40px;
    padding: 40px 0;
}
.footer-col h3 {
    color: var(--light-text);
    margin-bottom: 15px;
}

.footer-bottom {
    background-color: #222;
    padding: 10px 0;
    font-size: 0.8em;
    text-align: center;
}

/* Formulario Footer */
#subscription-form input, #subscription-form button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
}
#subscription-form input {
    background-color: #444;
    color: var(--light-text);
}
#subscription-form button {
    background-color: orange;
    color: var(--dark-text);
    font-weight: bold;
    cursor: pointer;
}

footer a {
    color: white;
}
footer a:hover {
    color: orange;
}

/* ---------------------------------------------------- */
/* MEDIA QUERIES (RESPONSIVE) */
/* ---------------------------------------------------- */

@media (max-width: 900px) {
    /* 1. HERO Y TIENDAS: Pasan a ser una sola columna */
    .hero-section {
        grid-template-columns: 1fr; 
    }
    /* El grid de tiendas pasa a 2x3 */
    .stores-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
    .stores-grid h2 {
        grid-column: 1 / span 2;
    }
}

@media (max-width: 768px) {
    /* NAVEGACIÓN (Menú Hamburguesa) */
    .search-bar, .contact-info {
        display: none; /* Ocultar en móvil */
    }
    .header-main {
        justify-content: space-between;
    }
    .menu-toggle {
        display: block; /* Mostrar el botón hamburguesa */
    }
    .navbar ul {
        flex-direction: column;
        display: none; /* Ocultar el menú por defecto */
        width: 100%;
    }
    .navbar.active ul {
        display: flex; /* Mostrar el menú cuando está activo (con JS) */
    }
    .navbar li {
        border-top: 1px solid #ddd;
    }
    
    /* BANNERS DE DESCUENTOS: Pasan a ser una sola columna vertical */
    .banner-grid {
        grid-template-columns: 1fr;
    }

    /* PIE DE PÁGINA: Las columnas se apilan verticalmente */
    .footer-columns {
        grid-template-columns: 1fr;
    }
}