/* ===========================
   1. VARIABLES Y RESET
=========================== */
:root {
    --color-primary: #1a1a1a;
    --color-secondary: #007bff;
    --color-accent: #ff4500;
    --colo-accent2: #fff;
    --color-background: #f8f8f8;
    --color-white: #ffffff;
    --color-steel: #aaaaaa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Helvetica Neue', sans-serif;
    background-color: var(--color-background);
    color: var(--color-primary);
    line-height: 1.6;
}

/* ===========================
   2. CONTENEDOR (La clave del centrado)
=========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    /* Esto centra el bloque en la pantalla */
    padding: 0 20px;
    /* Margen interno para que no pegue en bordes de celular */
    width: 100%;
}

/* ===========================
   3. HERO PARALLAX
=========================== */
.parallax-hero {
    height: 100vh;
    background-image: url('../assets/img/licua1.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    /* Cambiado a relative para que el overlay funcione bien */
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content h1 {
    color: white;
    font-size: 3.5rem;
    text-shadow: 2px 2px 8px black;
    text-transform: uppercase;
    text-align: center;
}

.subtitle {
    color: var(--color-steel);
    font-size: 1.4rem;
    display: block;
    /* Para que quede debajo del título */
    text-align: center;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.4rem;
    }
}

/* ===========================
   4. INTRODUCCIÓN
=========================== */
.product-intro {
    min-height: 80vh;
    /* Cambiado a min-height para evitar cortes en pantallas chicas */
    background-image: url('../assets/img/licua1.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    text-align: center;
}

.product-intro h2 {
    color: #fffefe;
    font-size: 2rem;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--color-white);
    margin: 15px auto 30px;
}

.description-text {
    max-width: 850px;
    margin: auto;
    font-size: 1.15rem;
    line-height: 1.8;
    background: rgba(255, 255, 255, 0.8);
    /* Fondo suave para leer mejor */
    padding: 20px;
    border-radius: 10px;
}

/* ===========================
   5. PRODUCT GRID (CORREGIDO)
=========================== */
.products-section {
    padding: 60px 0;
}

.product-grid {
    display: grid;
    /* Móvil: 1 columna centrada */
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
}

/* Tablet y Escritorio: 3 columnas */
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tarjeta General */
.product-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    overflow: hidden;
    /* Mantiene todo dentro de las curvas */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    /* Asegura orden vertical */
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* ===========================
   6. IMAGENES DE TARJETAS (UNIFICADO)
=========================== */
/* Agrupamos todas tus clases (1, 2, 3) para que todas se vean bien */
.card-image1,
.card-image2,
.card-image3,
.card-image {
    width: 100%;
    height: 250px;
    /* Altura fija para que todas las cards sean iguales */
    background: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    /* Espacio para que la licuadora no toque bordes */
}

/* ====================================
   10. MISIÓN, VISIÓN Y VALORES (MVV)
==================================== */
.mission-section {
    padding: 80px 0;
    background-color: var(--color-white);
    /* Fondo blanco para destacar */
}

.mvv-grid {
    display: grid;
    gap: 30px;
}

/* Diseño de tres columnas en escritorio */
@media (min-width: 992px) {
    .mvv-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.mvv-card {
    background: var(--color-background);
    /* Gris claro */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s, transform 0.3s;
}

.mvv-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.icon-mvv {
    display: block;
    font-size: 3rem;
    margin-bottom: 15px;
}

.mvv-card h3 {
    color: var(--color-accent);
    /* Naranja/rojo para el título */
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.mvv-card p {
    font-size: 1rem;
    color: #444;
}

.values-list {
    list-style: none;
    padding: 0;
    text-align: center;
    max-width: 250px;
    margin: 10px auto 0;
}

.values-list li {
    padding: 5px 0;
    border-bottom: 1px dashed #ddd;
    font-size: 0.95rem;
}

.values-list li:last-child {
    border-bottom: none;
}

/* Estilo común para todas las imágenes dentro de las cards */
.card-image1 img,
.card-image2 img,
.card-image3 img,
.card-image img {
    width: auto;
    height: 100%;
    /* Se ajusta a la altura del contenedor */
    max-width: 100%;
    object-fit: contain;
    /* CLAVE: La imagen se ve completa sin cortarse */
    transition: transform 0.4s ease;
}

/* Efecto Zoom al pasar mouse sobre la tarjeta */
.product-card:hover img {
    transform: scale(1.1);
}

/* Etiqueta "Más Vendida" */
.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-accent);
    color: white;
    padding: 5px 12px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* ===========================
   7. INFORMACIÓN DE TARJETA
=========================== */
.card-info {
    padding: 25px;
    flex-grow: 1;
    /* Hace que esta parte llene el espacio sobrante */
    display: flex;
    flex-direction: column;
}

.card-info h3 {
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.model-ref {
    color: var(--color-steel);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.specs-list {
    list-style: none;
    /* Quitamos viñetas por defecto */
    margin: 0 0 20px 0;
    padding: 0;
}

.specs-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}

/* Botones */
.btn-card {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--color-secondary);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    margin-bottom: 10px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-card:hover {
    background: #0056c7;
}

.btn-add-cart {
    display: block;
    width: 100%;
    padding: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-cart:hover {
    background: #1e7e34;
}

/* ===========================
   8. MODALES
=========================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    /* Z-index alto para estar encima de todo */
    padding-top: 50px;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: 20px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    animation: modalShow 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: red;
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   9. CARRITO (MINI-CART)
=========================== */
#cart-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--color-accent);
    padding: 12px 18px;
    color: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

#cart-icon:hover {
    transform: scale(1.05);
}

#cart-count {
    background: white;
    color: var(--color-accent);
    padding: 2px 6px;
    border-radius: 50%;
    margin-left: 8px;
    font-size: 0.9rem;
    font-weight: bold;
}

.mini-cart {
    position: fixed;
    top: 0;
    right: -350px;
    /* Oculto a la derecha */
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    z-index: 1600;
    transition: right 0.3s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    display: flex;
    flex-direction: column;
}

.mini-cart.open {
    right: 0;
}

.mini-cart h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

#cartItems {
    list-style: none;
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

#cartItems li {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eee;
}

.remove-btn {
    background: #ff4d4d;
    border: none;
    padding: 6px 10px;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.remove-btn:hover {
    background: #cc0000;
}

.close-cart-btn {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s;
}

.close-cart-btn:hover {
    background: #333;
}