/* =====================================================
   CATALOG PAGE CSS
   CSS dedicado exclusivamente para el catálogo de productos
   ===================================================== */

:root {
    --catalog-primary: #E91E63;
    --catalog-secondary: #C2185B;
    --catalog-accent: #8BC34A;
    --catalog-dark: #1a1a1a;
    --catalog-light: #ffffff;
    --catalog-gray: #666;
}

/* ===================================
   CATALOG HERO
   =================================== */
.catalog-hero {
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 50%, #8BC34A 100%);
    color: white;
    padding: 120px 0 60px;
    margin-top: 80px;
    text-align: center;
}

.catalog-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.catalog-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* ===================================
   FILTERS SECTION
   =================================== */
.catalog-filters {
    background: white;
    padding: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filters-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    font-weight: 600;
    color: var(--catalog-dark);
    margin-right: 0.5rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--catalog-primary);
    background: white;
    color: var(--catalog-primary);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filter-btn:hover {
    background: var(--catalog-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.filter-btn.active {
    background: var(--catalog-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

/* ===================================
   PRODUCTS GRID
   =================================== */
.catalog-section {
    padding: 60px 0;
    background: #fafafa;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* ===================================
   PRODUCT CARD
   =================================== */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(233, 30, 99, 0.2);
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--catalog-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(233, 30, 99, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-image-container:hover .zoom-icon {
    opacity: 1;
}

.zoom-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--catalog-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.product-description {
    color: var(--catalog-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.product-description ul {
    list-style: none;
    padding: 0;
}

.product-description li {
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.product-description li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--catalog-accent);
    font-weight: bold;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px solid #f0f0f0;
}

.product-price {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--catalog-primary);
    font-weight: 700;
}

.price-label {
    font-size: 0.75rem;
    color: var(--catalog-gray);
    display: block;
    margin-bottom: 0.25rem;
}

.btn-order {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--catalog-accent) 0%, #689F38 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(139, 195, 74, 0.3);
}

.btn-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 195, 74, 0.4);
    background: linear-gradient(135deg, #689F38 0%, #558B2F 100%);
}

.btn-order svg {
    width: 20px;
    height: 20px;
}

/* ===================================
   LIGHTBOX / MODAL
   =================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--catalog-primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--catalog-secondary);
    transform: rotate(90deg);
}

.lightbox-info {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    text-align: center;
}

.lightbox-info h3 {
    font-family: 'Playfair Display', serif;
    color: var(--catalog-dark);
    margin-bottom: 0.5rem;
}

.lightbox-info p {
    color: var(--catalog-gray);
}

/* ===================================
   EMPTY STATE
   =================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    display: none;
}

.empty-state.active {
    display: block;
}

.empty-state h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--catalog-dark);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--catalog-gray);
    font-size: 1.125rem;
}

/* ===================================
   RESULTS COUNTER
   =================================== */
.results-counter {
    text-align: center;
    padding: 1rem 0;
    color: var(--catalog-gray);
    font-size: 1rem;
}

.results-counter strong {
    color: var(--catalog-primary);
    font-weight: 600;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .catalog-hero {
        padding: 100px 0 40px;
        margin-top: 70px;
    }
    
    .catalog-hero h1 {
        font-size: 2.5rem;
    }
    
    .catalog-hero p {
        font-size: 1rem;
    }
    
    /* SOLUCIÓN: Quitar sticky en móvil */
    .catalog-filters {
        position: static;
        top: auto;
        padding: 1.5rem 0;
    }
    
    .filter-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-name {
        font-size: 1.25rem;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .btn-order {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .lightbox-content {
        max-width: 95%;
    }
    
    .lightbox-close {
        top: -40px;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .catalog-hero h1 {
        font-size: 2rem;
    }
    
    .filters-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-label {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .product-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-order {
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   LOADING ANIMATION
   =================================== */
.product-card.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ===================================
   SCROLL TO TOP BUTTON
   =================================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--catalog-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-top.visible {
    display: flex;
}

.scroll-top:hover {
    background: var(--catalog-secondary);
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(233, 30, 99, 0.5);
}

.scroll-top svg {
    width: 24px;
    height: 24px;
}