/* Catálogo Styles */

:root {
    --bg-catalog: #f8f5f0;
    --card-bg: #ffffff;
    --text-catalog: #2c2c2c;
    --text-catalog-secondary: #666;
}

[data-theme="dark"] {
    --bg-catalog: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-catalog: #e0e0e0;
    --text-catalog-secondary: #b0b0b0;
}

.catalog-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 10rem 0 5rem;
    margin-top: 70px;
    text-align: center;
}

.catalog-title {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.catalog-subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.8);
}

/* Filtros */
.filters-section {
    background: var(--bg-catalog);
    padding: 2rem 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

.filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--secondary-color);
    color: var(--text-catalog);
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Grid de Productos */
.catalog-products {
    padding: 4rem 0;
    background: var(--bg-catalog);
    transition: background-color 0.3s ease;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.product-card-catalog {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card-catalog:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.product-card-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card-catalog:hover .product-card-image img {
    transform: scale(1.1);
}

.product-image-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.product-card-body {
    padding: 1.5rem;
}

.product-category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.product-card-title {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-family: 'Playfair Display', serif;
}

.product-card-description {
    color: var(--text-catalog-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.product-card-price {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: bold;
}

.product-card-stock {
    font-size: 0.9rem;
    color: var(--text-catalog-secondary);
}

.product-card-stock.in-stock {
    color: var(--success);
}

.product-card-stock.out-of-stock {
    color: var(--danger);
}

/* Modal de Producto */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    overflow-y: auto;
}

.product-modal.active {
    display: block;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    animation: modalSlideIn 0.4s ease;
    transition: background-color 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.modal-product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 2rem;
}

/* Galería de Imágenes */
.product-gallery {
    position: sticky;
    top: 2rem;
}

.main-image {
    width: 100%;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f5f5f5;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
}

.thumbnail {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    border-color: var(--secondary-color);
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Detalles del Producto */
.product-details {
    padding: 1rem 0;
}

.product-category-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-details h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.product-price-large {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-stock-info {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-catalog);
    border-radius: 8px;
    color: var(--text-catalog);
}

.product-featured-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: gold;
    color: #333;
    border-radius: 25px;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.product-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-catalog-secondary);
    margin-bottom: 2rem;
    white-space: pre-line;
}

.product-actions {
    margin-top: 2rem;
}

.btn-contact {
    display: inline-block;
    padding: 1.25rem 2.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-contact:hover {
    background: #6d1d28;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139,38,53,0.3);
}

.loading {
    grid-column: 1/-1;
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--text-catalog-secondary);
}

/* Responsive */
@media (max-width: 968px) {
    .modal-product-content {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        position: relative;
    }

    .main-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .catalog-title {
        font-size: 2.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-details h2 {
        font-size: 2rem;
    }

    .product-price-large {
        font-size: 2.5rem;
    }
}
