/* Estilos para la página de productos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    max-height: 220px;
    background: #f5f5f5;
    line-height: 0; /* evita espacio fantasma bajo la imagen en móviles */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* elimina gap por línea base */
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    padding: 0.4rem;
    background: #f8f8f8;
    border-radius: 8px;
    margin-top: 0.8rem;
}

.product-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
    max-height: 60px;
}

.product-gallery img:hover {
    transform: scale(1.05);
}

.product-info {
    padding: 1rem 1.2rem 1.2rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.4rem 0;
    color: var(--ink);
}

.product-description {
    color: var(--muted);
    margin-bottom: 0.8rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1rem;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

/* Estilos base compartidos para todos los botones */
.btn-comprar,
.btn-whatsapp,
.btn-pagar {
    background: linear-gradient(90deg,var(--gold),var(--gold-2));
    color: white;
    padding: 0.65rem 1.2rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    text-decoration: none;
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.btn-comprar:hover,
.btn-whatsapp:hover,
.btn-pagar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(197,155,45,.25);
}

.product-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
}

.badge {
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    backdrop-filter: blur(4px);
}

/* Lightbox para galería */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Tabs de información */
.product-tabs {
    margin-top: 1rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.tab-buttons {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.tab-button {
    padding: 0.4rem 0.8rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
}

.tab-button.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.tab-content {
    display: none;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tab-content.active {
    display: block;
}

.tab-content ul {
    margin: 0;
    padding-left: 1.2rem;
}

.tab-content ul li {
    margin-bottom: 0.3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .product-actions {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-image {
        aspect-ratio: 4/5;
        max-height: none;
    }
    
    .product-info {
        padding: 1.2rem;
    }
    
    .product-title {
        font-size: 1.3rem;
    }
    
    .product-description {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .product-image {
        aspect-ratio: 4/5;
        max-height: none;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-actions .btn-comprar,
    .product-actions .btn-whatsapp {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
        height: 46px;
    }
    
    .product-gallery {
        gap: 0.3rem;
        padding: 0.3rem;
    }
    
    .product-gallery img {
        max-height: 70px;
    }
}