/* Configuración Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #fdfdfd;
    color: #333;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #2c3e50;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo span {
    color: #f39c12; 
}

.btn-login {
    background-color: #28a745;
    color: white !important;
    padding: 8px 18px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s ease;
    border: none;
}

.btn-login:hover {
    background-color: #218838;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('https://images.unsplash.com/photo-1581244276891-83393a899f2a?q=80&w=1200') no-repeat center center/cover;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Promociones Generales */
.info-section {
    padding: 50px 5%;
}

.container {
    max-width: 1200px; /* Aumentado un poco para que entren mejor las 4 cards */
    margin: 0 auto;
}

.container h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

.grid-promos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid #f39c12;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* =========================================
   SECCIÓN DE OFERTAS (MODIFICADA PARA 4 CARDS)
   ========================================= */

.ofertas-container {
    padding: 40px 5%;
    background-color: #f8f9fa;
}

.titulo-seccion {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem; /* Un poco más pequeño */
    color: #2c3e50;
    text-transform: uppercase;
    font-weight: 800;
}

.grid-ofertas {
    display: grid;
    /* Forzamos 4 columnas en pantallas grandes */
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; /* Reducimos el espacio entre cards */
    max-width: 1200px;
    margin: 0 auto;
}

.card-producto {
    background: #fff;
    border-radius: 10px; /* Bordes un poco menos redondeados */
    overflow: hidden;
    position: relative;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.badge-oferta {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e74c3c;
    color: white;
    padding: 3px 8px;
    font-weight: bold;
    font-size: 0.7rem; /* Badge más pequeño */
    border-radius: 4px;
    z-index: 10;
}

.img-container {
    height: 140px; /* Altura más baja para compactar */
    overflow: hidden;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.info-producto {
    padding: 15px; /* Reducido de 20px */
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-producto h3 {
    font-size: 1.05rem; /* Título más pequeño */
    margin-bottom: 8px;
    color: #333;
    min-height: 2.2rem; /* Asegura alineación si el texto rompe en 2 líneas */
}

.info-producto p {
    font-size: 0.8rem; /* Descripción más pequeña */
    color: #666;
    margin-bottom: 12px;
    line-height: 1.3;
}

.precio-box {
    margin-bottom: 10px;
}

.precio-anterior {
    text-decoration: line-through;
    color: #999;
    font-size: 0.8rem;
    margin-right: 5px;
}

.precio-actual {
    color: #28a745;
    font-size: 1.2rem; /* Precio un poco más pequeño */
    font-weight: bold;
}

/* Responsivo para las Ofertas */
@media (max-width: 1024px) {
    .grid-ofertas {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-ofertas {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid-ofertas {
        grid-template-columns: 1fr;
    }
}

/* ========================================= */

/* Ticker y otros elementos */
.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    background-color: #2c3e50;
    padding: 15px 0;
    border-bottom: 3px solid #f39c12;
    display: flex;
}

.ticker {
    display: flex;
    width: fit-content;
    animation: moverTicker 25s linear infinite;
}

.ticker-group {
    display: flex;
    flex-shrink: 0;
}

.ticker-item {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f39c12;
    padding: 0 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

@keyframes moverTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.contacto-breve {
    background: #f1f1f1;
    padding: 25px 0;
    border-top: 1px solid #ddd;
}

.contacto-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contacto-link {
    font-size: 1rem;
    color: #444;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.whatsapp:hover { color: #25d366; }
.instagram:hover { color: #e1306c; }

.footer {
    background: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 15px;
    font-size: 0.8rem;
}
/* --- AJUSTES RESPONSIVE --- */

/* Tablets (Menos de 992px) */
@media (max-width: 992px) {
    .grid-ofertas {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en vez de 4 */
    }
    .hero h1 {
        font-size: 2rem;
    }
}

/* Celulares (Menos de 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 5%;
    }
    
    .logo {
        font-size: 1.2rem;
    }

    .hero {
        height: auto;
        padding: 40px 20px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .grid-ofertas {
        grid-template-columns: 1fr; /* 1 sola columna: ocupa todo el ancho */
        gap: 15px;
    }

    .contacto-container {
        flex-direction: column; /* Datos de contacto uno abajo del otro */
        gap: 15px;
        text-align: center;
    }

    .ticker-item {
        font-size: 0.9rem;
        padding: 0 20px;
    }
}

/* Optimización para imágenes en pantallas chicas */
.img-container img {
    max-width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: contain;
}
