#galeria {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
}

.gallery-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0;
}

.gallery-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 5px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    min-width: 0;
    align-items: stretch;
}

.gallery-grid::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    flex: 0 0 auto;
    width: 300px;
    height: 300px;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 6px solid var(--white);
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
    border-radius: calc(var(--radius-sm) / 2);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Gallery Navigation Buttons */
.gallery-nav-btn {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transition: var(--transition);
    z-index: 20;
}

.gallery-nav-prev {
    margin-right: -28px;
    margin-left: 10px;
}

.gallery-nav-next {
    margin-left: -28px;
    margin-right: 10px;
}

.gallery-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.gallery-nav-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.gallery-nav-prev {
    margin-right: -28px;
}

.gallery-nav-next {
    margin-left: -28px;
}

.gallery-nav-btn svg {
    transition: transform 0.2s ease;
}

.gallery-nav-btn:hover svg {
    transform: translateX(-2px);
}

.gallery-nav-next:hover svg {
    transform: translateX(2px);
}

/* Hidden state for buttons */
.gallery-nav-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(26, 26, 46, 0.8), transparent);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-text {
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: var(--transition);
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 20px;
}

.lightbox-nav button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.lightbox-nav button:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 30px;
    color: var(--white);
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

/* LIGHTBOX VIDEO */
.lightbox-video {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius-sm);
    outline: none;
}

/* GALLERY VIDEO BADGE */
.gallery-item--video {
    position: relative;
}

.gallery-video-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gradient-1);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(194, 24, 91, 0.4);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.gallery-video-badge svg {
    flex-shrink: 0;
}

/* VIDEO MODAL (standalone para productos) */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 3100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.video-modal.active {
    display: flex;
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: var(--transition);
    z-index: 10;
}

.video-modal-close:hover {
    transform: rotate(90deg);
}

.video-modal-player {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    outline: none;
}

/* LOAD MORE BUTTON */
.gallery-load-more {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    width: 100%;
}

.gallery-load-more .btn {
    min-width: 200px;
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-nav-btn {
        width: 48px;
        height: 48px;
    }
    
    .gallery-nav-prev {
        margin-right: -24px;
    }
    
    .gallery-nav-next {
        margin-left: -24px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        gap: 15px;
        padding: 10px 5px 15px;
    }
    
    .gallery-item {
        width: 260px;
    }
    
    .gallery-nav-btn {
        width: 44px;
        height: 44px;
    }
    
    .gallery-nav-prev {
        margin-right: -22px;
    }
    
    .gallery-nav-next {
        margin-left: -22px;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        width: 220px;
    }
    
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .gallery-nav-prev {
        margin-right: -20px;
    }
    
    .gallery-nav-next {
        margin-left: -20px;
    }
}