/* ==== GENERAL ==== */
* {margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif;}
body {background-color: #f4f4f9; color: #333; line-height: 1.6;}

/* ==== HEADER / MENÚ ==== */
header {
    background-color: #000000; /* negro para resaltar el logo */
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.container-header {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header h1.logo {
    color: #ffcc00; /* amarillo para que resalte */
    font-size: 28px;
}

/* MENÚ CON ICONOS */
nav a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}
nav a:hover {color: #ff9900;}

/* HAMBURGER MENÚ (móvil) */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
}

/* ==== BANNER FADE ==== */
.banner-container {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    margin-top: 10px;
}
.banner-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

/* ==== INTRO ==== */
.intro {
    text-align: center;
    padding: 40px 15px;
    background-color: #ffffff;
    border-radius: 12px;
    margin: 20px auto;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.intro h1 {color: #003366; margin-bottom: 15px; font-size: 30px;}
.intro p {font-size: 17px; color: #555; max-width: 800px; margin: auto;}

/* ==== PROMOCIONES ==== */
.promos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 20px;
    width: 90%;
    margin: 30px auto;
}
.promo-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.promo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.promo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.promo-item h3 {
    padding: 12px;
    color: #003366;
    font-size: 18px;
}
.promo-item p {
    padding: 0 12px 12px 12px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    text-align: center;
}

/* ==== BOTONES ==== */
button {
    background: linear-gradient(90deg, #ffcc00, #ff9900);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}
button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* ==== FOOTER ==== */
footer {
    background-color: #000000;
    color: white;
    padding: 20px 0;
    margin-top: 40px;
}
.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.footer-container .redes a {
    color: #ffcc00;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.footer-container .redes a:hover {color: #ffffff; text-decoration: underline;}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
    header h1.logo {
        font-size: 24px;
        width: auto;
        text-align: left;
        margin-bottom: 0;
    }
    .container-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #000;
        margin-top: 10px;
    }
    nav.active {display: flex;}
    nav a {text-align: center; margin: 10px 0; padding: 10px; border-top: 1px solid #222;}
    .menu-toggle {display: block; font-size: 24px; color: #fff; cursor: pointer;}
    header.menu-abierto h1.logo {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    header.menu-abierto .container-header {
        flex-direction: column;
        align-items: center;
    }
    .banner-container {height: 250px;}
    .promo-item img {height: 150px;}
    .intro h1 {font-size: 24px;}
}

/* ==== PRODUCTOS DINÁMICOS (NUEVO, OPTIMIZADO) ==== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    width: 90%;
    margin: 30px auto;
}

.product-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: transform 0.2s;
}

.product-card:hover {
    transform: scale(1.03);
}

/* ░░ IMÁGENES MÁS PEQUEÑAS Y COMPLETAS ░░ */
.product-card img {
    width: 100%;
    height: 120px;
    object-fit: contain;   /* ← evita recortes */
    background: #f4f4f4;
    border-radius: 8px;
}

/* TÍTULO */
.product-card h3 {
    font-size: 14px;
    margin: 8px 0 4px;
    font-weight: 600;
}

/* DESCRIPCIÓN */
.product-card .descripcion {
    font-size: 12px;
    color: #555;
    height: 28px;
    overflow: hidden;
}

/* PRECIO */
.product-card .precio {
    font-size: 15px;
    font-weight: bold;
    margin: 5px 0;
    color: #ff9900;
}

/* BOTÓN */
.product-card button {
    background: linear-gradient(90deg, #ffcc00, #ff9900);
    border: none;
    padding: 8px 12px;
    width: 100%;
    color: black;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.product-card button:hover {
    transform: scale(1.05);
}

/* =========================
   PUBLICIDAD
========================= */
.publicidad {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

.publicidad h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #333;
}

.publicidad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.publicidad-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.publicidad-card:hover {
    transform: translateY(-6px);
}

.publicidad-card img,
.publicidad-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.publicidad-card.video {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .publicidad-card.video {
        grid-column: span 1;
    }
}

.publicidad-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.publicidad-card h3 {
    font-size: 22px;
    margin-bottom: 5px;
}

.publicidad-card p {
    font-size: 16px;
    opacity: 0.9;
}

.buscador-productos {
    max-width: 400px;
    margin: 20px auto 0;
}

.buscador-productos input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 30px;
    border: 1px solid #ccc;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.buscador-productos input:focus {
    border-color: #25d366;
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.3);
}


/* ==== FOOTER RESPONSIVE FIX ==== */
@media (max-width: 480px) {
    .footer-container .redes {
        display: flex;
        flex-wrap: nowrap; /* 🔥 Ahora siempre estarán en la misma línea */
        justify-content: center;
        gap: 15px;
    }

    .footer-container .redes a {
        text-align: center;
        white-space: nowrap; /* evita que el texto se corte */
    }
}
