/* Reset y estilos base - TEMA NAVIDAD */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #fff;
    background: linear-gradient(135deg, #1a472a 0%, #0d2818 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - TEMA NAVIDAD */
header {
    background: linear-gradient(180deg, #0f3d23 0%, #1a472a 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(196, 30, 58, 0.3);
    border-bottom: 3px solid #c41e3a;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffd700;
}

.logo i {
    font-size: 2rem;
    color: #ffd700;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    position: relative;
}

.search-container input {
    padding: 10px 40px 10px 15px;
    border: 2px solid #ffd700;
    border-radius: 25px;
    width: 300px;
    font-size: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    color: #0f3d23;
}

.search-container i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #c41e3a;
}

.cart-container {
    position: relative;
}

.cart-btn {
    background: #c41e3a;
    border: 2px solid #ffd700;
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
}

.cart-btn:hover {
    background: #a01830;
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffd700;
    color: #0f3d23;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Hero Section - TEMA NAVIDAD */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.2) 0%, rgba(26, 71, 42, 0.2) 100%);
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 2px solid #c41e3a;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    color: #fff;
}

/* Filtros - TEMA NAVIDAD */
.filters {
    margin: 2rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #1a472a 0%, #0f3d23 100%);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: 2px solid #c41e3a;
}

.filters h3 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #ffd700;
    background: transparent;
    color: #ffd700;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #c41e3a;
    color: white;
    border-color: #c41e3a;
    transform: translateY(-2px);
}

/* Productos - TEMA NAVIDAD */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}

.product {
    background: linear-gradient(135deg, #1a472a 0%, #0f3d23 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 3px solid #c41e3a;
    transition: all 0.3s ease;
    position: relative;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.5);
}

.product.out-of-stock {
    position: relative;
}

.product.out-of-stock::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    pointer-events: none;
    z-index: 1;
}

.product.out-of-stock .product-info {
    position: relative;
    z-index: 2;
}

.product.out-of-stock::before {
    content: "SIN STOCK";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #8b1528;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    border: 2px solid #ff6b6b;
}

.product.in-stock::before {
    content: "EN STOCK";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2d5f3f;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    border: 2px solid #90ee90;
}

.product img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #ffd700;
}

.product-info .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #90ee90;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: #c41e3a;
    color: white;
    border: 2px solid #ffd700;
}

.btn-primary:hover {
    background: #a01830;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #c41e3a;
    border: 2px solid #c41e3a;
}

.btn-secondary:hover {
    background: #c41e3a;
    color: #fff;
    transform: translateY(-2px);
}

.btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    opacity: 0.5;
}

.btn-details {
    flex: 1;
    background: transparent;
    border: 2px solid #ffd700;
    color: #ffd700;
}

.btn-details:hover {
    background: #ffd700;
    color: #0f3d23;
}

.btn-cart {
    flex: 1;
}

/* Modal - TEMA NAVIDAD */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #1a472a 0%, #0f3d23 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
    border: 3px solid #c41e3a;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.product-modal {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #c41e3a;
    background: rgba(196, 30, 58, 0.2);
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #ffd700;
}

.close {
    color: #ffd700;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #c41e3a;
    transform: scale(1.2);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 2px solid #c41e3a;
    background: rgba(196, 30, 58, 0.2);
    border-radius: 0 0 15px 15px;
}

/* Carrito - TEMA NAVIDAD */
.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(196, 30, 58, 0.3);
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
    border-radius: 10px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: white;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
    color: #ffd700;
}

.cart-item-info p {
    margin: 0;
    color: #90ee90;
    font-size: 14px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 2px solid #ffd700;
    background: transparent;
    color: #ffd700;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #c41e3a;
    color: white;
}

.quantity {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    color: #ffd700;
}

.remove-btn {
    background: #c41e3a;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #8b1528;
}

.cart-total {
    text-align: center;
    padding: 1rem;
    background: rgba(196, 30, 58, 0.2);
    border-radius: 10px;
    margin-top: 1rem;
    border: 2px solid #c41e3a;
}

.cart-total h3 {
    color: #ffd700;
    font-size: 1.5rem;
}

.empty-cart {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

/* Detalles del producto - TEMA NAVIDAD */
.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.product-details img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    border-radius: 10px;
    background: white;
    padding: 20px;
}

.product-info .price {
    font-size: 2rem;
    font-weight: bold;
    color: #90ee90;
    margin-bottom: 1rem;
}

.description, .specifications {
    margin-bottom: 1.5rem;
}

.description h4, .specifications h4 {
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.description p {
    color: #fff;
}

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

.specifications li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(196, 30, 58, 0.3);
    color: #fff;
}

.specifications li:last-child {
    border-bottom: none;
}

/* Footer - TEMA NAVIDAD */
footer {
    background: #0f3d23;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 3px solid #c41e3a;
}

footer p {
    color: #ffd700;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-container input {
        width: 250px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .products {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .product-details {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
}

/* Animaciones adicionales */
.product {
    animation: fadeInUp 0.5s ease;
}

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

/* Estados de carga */
.loading {
    text-align: center;
    padding: 2rem;
    color: #ffd700;
}

.loading::after {
    content: "Cargando...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "Cargando."; }
    40% { content: "Cargando.."; }
    60%, 100% { content: "Cargando..."; }
}

/* ========== ESTILOS PARA MODAL DE GALERÍA - TEMA NAVIDAD ========== */
.btn-galeria {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: 2px solid #ffd700;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #ffd700;
    color: #0f3d23;
}

.btn-galeria:hover {
    background: #ffed4e;
    transform: translateY(-2px);
}

.modal-galeria {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-galeria-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 80%;
    margin: 5% auto;
    background: linear-gradient(135deg, #1a472a 0%, #0f3d23 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(196, 30, 58, 0.5);
    border: 3px solid #c41e3a;
}

.galeria-container {
    position: relative;
    width: 100%;
    height: calc(100% - 80px);
    overflow: hidden;
}

.galeria-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galeria-item.active {
    opacity: 1;
}

.galeria-item img,
.galeria-item video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.close-galeria {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #ffd700;
    z-index: 10002;
    background: rgba(196, 30, 58, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-galeria:hover {
    background: rgba(196, 30, 58, 1);
    transform: scale(1.1);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 215, 0, 0.9);
    border: 2px solid #c41e3a;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.5rem;
    color: #0f3d23;
    transition: all 0.3s ease;
    z-index: 10002;
}

.nav-btn:hover {
    background: rgba(255, 215, 0, 1);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.galeria-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10002;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #c41e3a;
}

.indicator.active {
    background: #ffd700;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .modal-galeria-content {
        width: 95%;
        height: 70%;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}