/**
 * Product Zoom & Gallery Styles
 * Hadra Home Theme
 */

/* Zoom Lens */
.woocommerce-product-gallery__image {
    position: relative;
}

.zoom-lens {
    position: absolute;
    border: 2px solid #D4AF37;
    width: 100px;
    height: 100px;
    display: none;
    pointer-events: none;
    background: rgba(212, 175, 55, 0.2);
    z-index: 10;
}

.zoom-result {
    position: absolute;
    top: 0;
    right: -420px;
    width: 400px;
    height: 400px;
    border: 1px solid #ddd;
    display: none;
    background-repeat: no-repeat;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
}

/* Hide zoom on mobile */
@media (max-width: 1024px) {
    .zoom-result {
        display: none !important;
    }
}

/* Fullscreen Gallery Modal */
.product-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
}

.gallery-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.gallery-main-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-close,
.gallery-prev,
.gallery-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-close {
    top: 20px;
    right: 20px;
    font-size: 36px;
}

.gallery-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-close:hover,
.gallery-prev:hover,
.gallery-next:hover {
    background: #D4AF37;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-close:hover {
    transform: scale(1.1) rotate(90deg);
}

.gallery-thumbnails {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 600px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.gallery-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-thumb.active {
    border-color: #D4AF37;
    opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .gallery-modal-content {
        max-width: 95vw;
    }
    
    .gallery-main-image {
        max-height: 60vh;
    }
    
    .gallery-close,
    .gallery-prev,
    .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .gallery-close {
        top: 10px;
        right: 10px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-thumb {
        width: 60px;
        height: 60px;
    }
}

