/*=============================================
            PRODUCTOS SECTION - CSS INDEPENDIENTE
=============================================*/

/* Contenedor principal */
.products-section {
    background-color: #f8f9fa !important;
    position: relative;
    overflow: hidden;
    font-family: 'Ubuntu', sans-serif;
}

.products-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
}

/* Tarjeta de producto */
.products-section .product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    background: white;
}

.products-section .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    border-color: #0d6efd;
}

/* Contenedor de imagen */
.products-section .product-image-container {
    height: 280px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.products-section .product-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.products-section .product-card:hover .product-image {
    transform: scale(1.05);
}

/* Títulos y texto */
.products-section .products-title {
    background: linear-gradient(45deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.products-section .products-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #0d6efd, transparent);
}

/* Subtítulos de producto */
.products-section .product-card .product-title {
    min-height: 56px;
    display: flex;
    align-items: center;
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
    font-weight: 600;
}

.products-section .product-card .product-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #0d6efd;
    transition: width 0.3s ease;
}

.products-section .product-card:hover .product-title::after {
    width: 100%;
}

/* Descripción */
.products-section .product-card .product-description {
    line-height: 1.6;
    color: #666;
    font-size: 0.95rem;
    min-height: 120px;
    margin-bottom: 1.5rem;
}

/* Botones */
.products-section .product-card .product-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 10px 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: white;
    text-decoration: none;
    display: inline-block;
    border-radius: 0.375rem;
    text-align: center;
}

.products-section .product-card .product-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transition: left 0.3s ease;
    z-index: -1;
    border-radius: 0.375rem;
}

.products-section .product-card .product-button:hover::before {
    left: 0;
}

.products-section .product-card .product-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Separador */
.products-section .products-separator {
    width: 126px;
    height: 10px;
    margin: 20px auto;
    display: block;
}

/* Grid de productos */
.products-section .products-grid {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.products-section .products-grid.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Estado loading */
.products-section .product-image.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: products-loading 1.5s infinite;
}

@keyframes products-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.products-section .product-image.loaded {
    background: none;
    animation: none;
}

/* Responsive */
@media (max-width: 992px) {
    .products-section .product-card {
        margin-bottom: 30px;
    }
    
    .products-section .product-image-container {
        height: 250px;
    }
    
    .products-section .product-card .product-description {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .products-section .products-title {
        font-size: 2rem;
    }
    
    .products-section .product-image-container {
        height: 220px;
    }
    
    .products-section .product-card .product-title {
        min-height: auto;
        font-size: 1.25rem;
    }
    
    .products-section .products-description {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .products-section {
        padding: 3rem 0 !important;
    }
    
    .products-section .product-card {
        margin-bottom: 25px;
    }
    
    .products-section .product-image-container {
        height: 200px;
    }
    
    .products-section .product-button {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* Animaciones específicas del módulo */
@keyframes products-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.products-section .product-card {
    animation: products-fade-in-up 0.5s ease forwards;
    opacity: 0;
}

.products-section .product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.products-section .product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.products-section .product-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Efectos de hover avanzados */
.products-section .product-card:hover {
    z-index: 10;
}

.products-section .product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.products-section .product-card:hover::after {
    opacity: 1;
}

/* Mejoras de accesibilidad */
.products-section .product-card:focus-within {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.products-section .product-button:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}