/* WC Advanced Variations Product Gallery */
.wc-adv-var-product-gallery {
    max-width: 600px;
    margin: 0 auto;
}

.gallery-main-image {
    position: relative;
    margin-bottom: 15px;
}

.main-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    aspect-ratio: 1;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.main-product-image:hover {
    transform: scale(1.05);
}

/* Navegación principal */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    opacity: 0;
}

.gallery-main-image:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

/* Indicador de zoom */
.zoom-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image-container:hover .zoom-indicator {
    opacity: 1;
}

/* Contador de imágenes */
.image-counter {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* Miniaturas */
.gallery-thumbnails {
    position: relative;
    overflow: hidden;
}

.thumbnails-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.thumbnails-container::-webkit-scrollbar {
    display: none;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.thumbnail-item:hover {
    transform: scale(1.05);
}

.thumbnail-item.active {
    border-color: #2c5aa0;
    box-shadow: 0 0 0 1px #2c5aa0;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navegación de miniaturas */
.thumbnails-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.thumbnails-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.thumbnails-prev {
    left: -5px;
}

.thumbnails-next {
    right: -5px;
}

/* Modal de zoom */
.gallery-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.zoom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

.zoom-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.zoom-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background 0.3s ease;
    z-index: 10;
}

.zoom-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Navegación en modal */
.zoom-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    z-index: 10;
}

.zoom-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.zoom-prev {
    left: 30px;
}

.zoom-next {
    right: 30px;
}

/* Contador en modal */
.zoom-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-adv-var-product-gallery {
        max-width: 100%;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
    
    .zoom-nav {
        width: 50px;
        height: 50px;
    }
    
    .zoom-prev {
        left: 15px;
    }
    
    .zoom-next {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .thumbnails-container {
        gap: 8px;
    }
    
    .thumbnail-item {
        width: 50px;
        height: 50px;
    }
    
    .zoom-indicator {
        display: none;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.gallery-zoom-modal {
    animation: fadeIn 0.3s ease;
}

.zoom-modal-content {
    animation: slideIn 0.3s ease;
}
