:root {
    --ml-yellow: #fff159;
    --ml-bg: #ebebeb;
    --ml-green: #00a650;
    --ml-blue: #3483fa;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; }

body { background-color: var(--ml-bg); overflow-x: hidden; }

/* HEADER RESPONSIVO */
.header {
    background-color: var(--ml-yellow);
    padding: 10px 0;
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    gap: 10px;
}

.search-container {
    flex: 1;
    min-width: 280px;
    background: white;
    display: flex;
    padding: 8px 15px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.search-container input { border: none; width: 100%; outline: none; }

/* BANNER */
.hero-slider {
    width: 100%;
    height: 35vh;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    padding: 0 20px;
    transition: background-image 0.5s ease-in-out;
}

#banner-content {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    width: 100%;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    transition: opacity 0.4s ease-in-out;
}

.banner-btn {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 10;
}

.banner-btn:hover { background: rgba(0, 0, 0, 0.6); }

/* BARRA DE BENEFICIOS */
.benefits-bar {
    max-width: 1200px;
    margin: -20px auto 20px;
    background: white;
    display: flex;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
    white-space: nowrap;
}

.benefit-item {
    flex: 1;
    min-width: 150px;
    text-align: center;
    font-size: 13px;
    border-right: 1px solid #eee;
}

/* GRID DE PRODUCTOS (MODIFICADO PARA 4 COLUMNAS) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    /* Mínimo 250px para forzar 4 columnas en pantallas grandes */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 15px;
    padding: 15px;
}

.card {
    background: white;
    border-radius: 4px;
    padding: 0; /* Quitamos padding para que la imagen llegue al borde si quieres */
    transition: 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* Ajuste para imágenes de 600x600 */
.card img { 
    width: 100%; 
    height: 200px; /* Altura fija para alinear todas las cards */
    object-fit: contain; 
    padding: 10px;
    background-color: #fff;
}

.info { padding: 15px; }
.price { font-size: 22px; font-weight: 500; color: #333; }
.shipping { color: var(--ml-green); font-size: 13px; font-weight: bold; margin: 4px 0; }
.title { font-size: 14px; color: #666; line-height: 1.2; }

/* CATEGORÍAS */
.categories-grid {
    max-width: 1200px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 0 15px;
}

/* MEDIA QUERIES PARA CELULAR */
@media (max-width: 600px) {
    .header-ads { display: none; }
    .hero-slider { height: 180px; }
    #banner-content { font-size: 1.2rem; }
    
    /* 2 productos por fila en móvil */
    .container { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 8px; 
        padding: 8px; 
    }
    
    .card img { height: 150px; }
    .price { font-size: 18px; }
    .title { font-size: 12px; }
}
