/**
 * MÓDULO PRODUCTOS - ESTILOS PREMIUM
 * Compatible con homepage.css y sistema moderno
 * Diseño fresco y moderno para catálogo de productos
 */

/* ====== VARIABLES GLOBALES PRODUCTOS ====== */
:root {
    /* Colores específicos del módulo productos */
    --productos-primary: #d32f2f;
    --productos-secondary: #ff9800;
    --productos-accent: #ffc107;
    --productos-success: #4caf50;
    --productos-dark: #1a1a1a;
    --productos-light: #f8f9fa;
    --productos-card-bg: #ffffff;
    
    /* Gradientes productos */
    --gradient-productos-hero: linear-gradient(135deg, var(--productos-primary) 0%, var(--productos-secondary) 100%);
    --gradient-productos-card: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    --gradient-productos-btn: linear-gradient(45deg, var(--productos-secondary) 0%, var(--productos-accent) 100%);
    
    /* Sombras productos */
    --shadow-productos-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-productos-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-productos-hover: 0 15px 50px rgba(0, 0, 0, 0.15);
    --shadow-productos-glow: 0 0 30px rgba(255, 152, 0, 0.3);
    
    /* Transiciones productos */
    --transition-productos: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-productos-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
}

/* ====== CONTENEDOR PRINCIPAL PRODUCTOS ====== */
.productos-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    min-height: calc(100vh - 200px);
}

/* ====== HEADER PRODUCTOS SIMPLIFICADO ====== */
.productos-header-simple {
    background: var(--gradient-productos-hero, linear-gradient(135deg, #d32f2f 0%, #ff9800 100%));
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.productos-title-simple {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
}

/* ====== FILTROS SIMPLIFICADOS ====== */
.productos-filters-simple {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gradient-productos-card, linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%));
    border-radius: 15px;
    box-shadow: var(--shadow-productos-soft, 0 4px 20px rgba(0, 0, 0, 0.08));
}

.filters-grid-simple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* ====== HEADER PRODUCTOS MODERNO ====== */
.productos-header-modern {
    background: var(--gradient-productos-hero);
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
}

.productos-header-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../../../../recursos-compartidos/imagenes/branding/productos-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 1;
}

.productos-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.productos-title-main {
    font-family: var(--font-hero, 'Fredoka One', cursive);
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInScale 1s ease-out;
}

.productos-subtitle-main {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* ====== FILTROS MODERNOS ====== */
.productos-filters-modern {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 20px;
    box-shadow: var(--shadow-productos-soft);
    margin-bottom: var(--spacing-xl);
    position: sticky;
    top: 20px;
    z-index: 100;
    border: 1px solid rgba(255, 152, 0, 0.1);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-weight: 600;
    color: var(--productos-dark);
    margin-bottom: var(--spacing-xs);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select,
.filter-input {
    padding: var(--spacing-sm);
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition-productos);
    background: white;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--productos-secondary);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.filter-btn-group {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--productos-dark);
    cursor: pointer;
    transition: var(--transition-productos);
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-productos-btn);
    border-color: var(--productos-secondary);
    color: var(--productos-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-productos-soft);
    text-decoration: none;
}

.search-bar-modern {
    position: relative;
    grid-column: 1 / -1;
}

.search-input-modern {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    font-size: 1.1rem;
    transition: var(--transition-productos);
}

.search-input-modern:focus {
    border-color: var(--productos-secondary);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
}

/* ====== CATEGORÍAS GRID MODERNO ====== */
.categorias-grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xxl);
}

.categoria-card-productos {
    background: var(--gradient-productos-card);
    border-radius: 20px;
    padding: 0;
    text-align: center;
    box-shadow: var(--shadow-productos-soft);
    transition: var(--transition-productos);
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 152, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 350px;
}

.categoria-card-productos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-productos-btn);
    transform: scaleX(0);
    transition: var(--transition-productos);
    z-index: 2;
}

.categoria-card-productos:hover::before {
    transform: scaleX(1);
}

.categoria-card-productos:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-productos-hover);
    text-decoration: none;
    color: inherit;
    border-color: rgba(255, 152, 0, 0.3);
}

/* Contenedor de imagen */
.categoria-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.categoria-image-productos {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-productos);
}

.categoria-card-productos:hover .categoria-image-productos {
    transform: scale(1.05);
}

/* Fallback de iconos */
.categoria-icon-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-productos-btn);
}

.categoria-icon-productos {
    font-size: 5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Contenido de la categoría */
.categoria-content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.categoria-titulo-productos {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--productos-dark);
}

.categoria-descripcion-productos {
    color: #666;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.categoria-count-productos {
    background: var(--productos-secondary);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-top: auto;
    transition: var(--transition-productos);
}

.categoria-card-productos:hover .categoria-count-productos {
    background: var(--productos-primary);
    transform: scale(1.05);
}

/* ====== IMÁGENES DE CATEGORÍAS ====== */
.categoria-imagen-container {
    position: relative;
    margin-bottom: var(--spacing-md);
    border-radius: 15px;
    overflow: hidden;
    height: 200px;
}

.categoria-imagen-productos {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-productos);
}

.categoria-card-productos:hover .categoria-imagen-productos {
    transform: scale(1.05);
}

/* ====== NUEVOS ESTILOS PARA CATEGORÍAS DINÁMICAS ====== */

/* Overlay para hover effect */
.categoria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: var(--transition-productos);
}

.categoria-card-productos:hover .categoria-overlay {
    opacity: 1;
}

.categoria-hover-text {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: translateY(10px);
    transition: var(--transition-productos);
}

.categoria-card-productos:hover .categoria-hover-text {
    transform: translateY(0);
}

/* Estilos para contador dinámico */
.categoria-count-productos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--productos-secondary);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: auto;
    transition: var(--transition-productos);
}

.categoria-count-number {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Estados especiales */
.categoria-sin-productos {
    opacity: 0.6;
    pointer-events: none;
}

.categoria-sin-productos .categoria-count-productos {
    background: #6c757d;
}

.categoria-sin-productos::after {
    content: "Sin productos disponibles";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 10;
}

/* Color dinámico de categoría */
.categoria-card-productos {
    border: 2px solid transparent;
    transition: var(--transition-productos);
}

.categoria-card-productos:hover {
    border-color: var(--categoria-color, var(--productos-primary));
    box-shadow: 
        var(--shadow-productos-hover),
        0 0 0 3px rgba(var(--categoria-color-rgb, 211, 47, 47), 0.1);
}

.categoria-icon-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-productos-soft);
}

.categoria-content {
    padding: 0 0.5rem;
}

/* ====== PRODUCTOS GRID MODERNO ====== */
.productos-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
}

.producto-card-modern {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-productos-soft);
    transition: var(--transition-productos);
    border: 1px solid rgba(255, 152, 0, 0.1);
    position: relative;
}

.producto-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-productos-hover);
    border-color: rgba(255, 152, 0, 0.3);
}

.producto-imagen-container {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f8f9fa;
}

.producto-imagen-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-productos);
}

.producto-card-modern:hover .producto-imagen-modern {
    transform: scale(1.1);
}

.producto-badges {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.producto-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-productos-soft);
}

.badge-nuevo { background: var(--productos-success); }
.badge-destacado { background: var(--productos-primary); }
.badge-promocion { background: var(--productos-secondary); }
.badge-agotado { background: #666; }

.producto-precio-destacado {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--gradient-productos-btn);
    color: var(--productos-dark);
    padding: 0.6rem 1rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: var(--shadow-productos-medium);
}

.producto-content-modern {
    padding: var(--spacing-lg);
}

.producto-categoria-tag {
    color: var(--productos-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
}

.producto-titulo-modern {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--productos-dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.producto-descripcion-modern {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.producto-ingredientes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: var(--spacing-md);
}

.ingrediente-tag {
    background: #f8f9fa;
    color: #666;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid #e1e5e9;
}

.producto-footer-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-md);
}

.producto-precio-container {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.producto-precio-actual {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--productos-primary);
}

.producto-precio-anterior {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.btn-agregar-modern {
    background: var(--gradient-productos-btn);
    color: var(--productos-dark);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-productos-bounce);
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-agregar-modern:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-productos-medium);
    color: var(--productos-dark);
    text-decoration: none;
}

.btn-agregar-modern:active {
    transform: translateY(0) scale(0.98);
}

/* ====== ESTADOS ESPECIALES ====== */
.producto-card-agotado {
    opacity: 0.7;
    filter: grayscale(0.5);
}

.producto-card-agotado .btn-agregar-modern {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

.loading-productos {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: var(--productos-secondary);
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--productos-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: var(--spacing-md);
}

.no-productos {
    text-align: center;
    padding: var(--spacing-xxl);
    color: #666;
}

.no-productos-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

/* ====== PAGINACIÓN MODERNA ====== */
.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xxl);
    padding: var(--spacing-lg);
}

.pagination-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid #e1e5e9;
    background: white;
    color: var(--productos-dark);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-productos);
    min-width: 44px;
    text-align: center;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--gradient-productos-btn);
    border-color: var(--productos-secondary);
    color: var(--productos-dark);
    text-decoration: none;
    transform: translateY(-2px);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ====== ANIMACIONES ====== */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 768px) {
    .productos-container {
        padding: 0 var(--spacing-sm);
    }
    
    .productos-header-modern {
        padding: var(--spacing-xl) 0 var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }
    
    .productos-filters-modern {
        padding: var(--spacing-md);
        position: static;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .categorias-grid-productos {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }
    
    .categoria-card-productos {
        height: 320px;
    }
    
    .categoria-image-container {
        height: 180px;
    }
    
    .categoria-content {
        padding: var(--spacing-md);
    }
    
    .categoria-titulo-productos {
        font-size: 1.2rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .categoria-descripcion-productos {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    /* Ajustes para categorías dinámicas en móviles */
    .categoria-overlay {
        opacity: 1; /* Siempre visible en móviles */
        background: linear-gradient(
            to bottom,
            transparent 60%,
            rgba(0, 0, 0, 0.8) 100%
        );
    }
    
    .categoria-hover-text {
        transform: translateY(0);
        font-size: 0.9rem;
    }
    
    .categoria-count-productos {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }
    
    .categoria-count-number {
        font-size: 1rem;
    }
    
    .categoria-sin-productos::after {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
    }
    
    .productos-grid-modern {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .pagination-modern {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .producto-footer-modern {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }
    
    .btn-agregar-modern {
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .categorias-grid-productos {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .categoria-card-productos {
        height: 300px;
        margin: 0 var(--spacing-xs);
    }
    
    .categoria-image-container {
        height: 160px;
    }
    
    .categoria-titulo-productos {
        font-size: 1.1rem;
    }
    
    .categoria-icon-productos {
        font-size: 4rem;
    }
    
    .producto-badges {
        position: static;
        flex-direction: row;
        margin-bottom: var(--spacing-sm);
    }
    
    .producto-precio-destacado {
        position: static;
        display: inline-block;
        margin-bottom: var(--spacing-sm);
    }
}

/* ====== UTILIDADES ====== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

/* ====== COMPATIBILIDAD CON HOMEPAGE.CSS ====== */
.section-title-advanced {
    font-family: var(--font-hero, 'Fredoka One', cursive);
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--productos-dark);
}

.section-subtitle-advanced {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ====== MODAL Y OVERLAY PRODUCTOS ====== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: var(--spacing-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* ====== RESPONSIVE SIMPLIFICADO ====== */
@media (max-width: 768px) {
    .productos-title-simple {
        font-size: 2rem;
    }
    
    .productos-header-simple {
        padding: 1.5rem 0;
    }
    
    .filters-grid-simple {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ====== ESTILOS ADICIONALES PARA SECCIONES ====== */
.productos-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-info {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

.info-adicional-productos {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin: 4rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--productos-dark, #1a1a1a);
}

.info-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.cta-productos-final {
    background: linear-gradient(135deg, var(--productos-primary, #d32f2f) 0%, var(--productos-secondary, #ff9800) 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    margin: 4rem 0;
}

.cta-productos-final h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
}

.cta-productos-final p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive adicional */
@media (max-width: 768px) {
    .productos-section-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .info-adicional-productos {
        padding: 2rem 1rem;
        margin: 2rem 0;
    }
    
    .cta-productos-final {
        padding: 2rem 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ====== PLACEHOLDERS DE IMAGEN ====== */
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-imagen-placeholder,
.modal-imagen-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    min-height: 200px;
    color: #6c757d;
    transition: var(--transition-productos);
}

.producto-imagen-placeholder {
    min-height: 200px;
}

.modal-imagen-placeholder {
    min-height: 300px;
}

.producto-imagen-placeholder:hover,
.modal-imagen-placeholder:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
    transform: scale(1.02);
}

.producto-imagen-placeholder svg,
.modal-imagen-placeholder svg {
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.placeholder-text {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    margin-top: 0.5rem;
    opacity: 0.7;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-imagen-placeholder .placeholder-text {
    font-size: 1rem;
    white-space: normal;
    max-width: 90%;
}

/* Responsivo para placeholders */
@media (max-width: 768px) {
    .producto-imagen-placeholder {
        min-height: 150px;
    }
    
    .modal-imagen-placeholder {
        min-height: 200px;
    }
    
    .placeholder-text {
        font-size: 0.75rem;
    }
}

/* ====== ANIMACIONES PARA CARGA DE IMÁGENES ====== */
.producto-imagen-modern,
.modal-imagen {
    opacity: 0;
    animation: fadeInImage 0.5s ease-in-out forwards;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
