/* ==========================================================
   SECCIÓN DE CATÁLOGO Y TARJETAS DE PRODUCTOS (PREMIUM UI)
   ========================================================== */

/* Contenedor General */
.products-container {
    padding: 80px 8% 100px 8%;
    background-color: var(--bg-light);
}

.products-container h2 {
    text-align: center;
    font-size: 32px;
    color: #2c3e50; /* Tono más elegante y legible */
    margin-bottom: 12px;
    font-weight: 700;
}

/* Subtítulo decorativo para romper la monotonía */
.products-container::after {
    display: block;
    text-align: center;
    font-size: 14px;
    color: #95a5a6;
    margin-bottom: 50px;
    font-weight: 400;
}

/* Grilla Moderna */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 35px; /* Un poco más de aire entre elementos */
}

/* Nueva Tarjeta Minimalista */
.product-card {
    background-color: var(--white);
    border-radius: 20px; /* Bordes más curvos y amigables */
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

/* Contenedor de Imagen con Efecto Máscara */
.product-image-wrapper {
    width: 100%;
    height: 180px;
    border-radius: 16px;
    overflow: hidden; /* Clave para que el zoom no se desborde */
    background-color: #fcfcfc;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.01);
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
   
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: block;
}

/* Animación Zoom de la Imagen al pasar el mouse por la tarjeta */
.product-card:hover .product-image-wrapper img {
    transform: scale(1.08);
}

/* Bloque de Información */
.product-info {
    padding: 15px 5px 5px 5px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.product-card h3 {
    font-size: 17px;
    color: #34495e;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 15px;
    /* Limita el texto a un máximo de 2 líneas por si el nombre es largo */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fila de Precio y Botón de Acción */
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Empuja este contenedor al fondo siempre */
}

.product-card .price {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    position: relative;
}

/* Botón Añadir Estilizado Redondo */
.btn-add {
    background-color: var(--secondary-color);
    color: #2c3e50;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%; /* Botón circular */
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(160, 231, 229, 0.3);
    transition: background-color 0.3s ease, 
                transform 0.2s ease, 
                color 0.3s ease, 
                box-shadow 0.3s ease;
}

.btn-add:hover {
    background-color: var(--primary-color); /* Cambio a rosa suave en hover */
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(255, 182, 193, 0.5);
}

.btn-add:active {
    transform: scale(0.95);
}

/* Optimización para Pantallas Pequeñas */
@media (max-width: 480px) {
    .products-container {
        padding: 50px 5% 60px 5%;
    }
    
    .products-grid {
        grid-template-columns: 1fr; /* Una sola columna fluida en móviles */
        gap: 25px;
    }
    
    .product-image-wrapper {
        height: 280px; /* Un poco más alto en móviles para lucir los detalles */
    }
}