/* Product Image Zoom Navigation Animations - Ayaydin Furniture & Carpet */

/* Custom Lightbox */
.product-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    overflow: hidden;
}

.product-lightbox-overlay.active {
    opacity: 1;
}

.product-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

/* Navigation Buttons */
.product-lightbox-nav {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.product-lightbox-button {
    position: absolute;
    background: rgba(255, 126, 0, 0.9);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    transition: all 0.3s ease;
    z-index: 100000;
}

.product-lightbox-button:hover {
    background: rgba(230, 115, 0, 1);
    transform: scale(1.1);
}

.product-lightbox-close {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
}

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

.product-lightbox-prev,
.product-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
}

.product-lightbox-prev {
    left: 30px;
}

.product-lightbox-next {
    right: 30px;
}

.product-lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1) translateX(-5px);
}

.product-lightbox-next:hover {
    transform: translateY(-50%) scale(1.1) translateX(5px);
}

.product-lightbox-button i {
    font-size: 24px;
    transition: all 0.3s ease;
}

.product-lightbox-prev i,
.product-lightbox-next i {
    font-size: 30px;
}

/* Counter */
.product-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100000;
}

/* Responsive */
@media (max-width: 768px) {
    .product-lightbox-button {
        width: 50px;
        height: 50px;
    }
    
    .product-lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .product-lightbox-prev {
        left: 15px;
    }
    
    .product-lightbox-next {
        right: 15px;
    }
    
    .product-lightbox-button i {
        font-size: 20px;
    }
    
    .product-lightbox-prev i,
    .product-lightbox-next i {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .product-lightbox-button {
        width: 40px;
        height: 40px;
    }
    
    .product-lightbox-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
    
    .product-lightbox-prev {
        left: 10px;
    }
    
    .product-lightbox-next {
        right: 10px;
    }
    
    .product-lightbox-button i {
        font-size: 16px;
    }
    
    .product-lightbox-prev i,
    .product-lightbox-next i {
        font-size: 20px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .product-lightbox-button,
    .product-lightbox-button i {
        transition: none;
        animation: none;
    }
    
    .product-lightbox-button:hover {
        transform: none;
    }
}

/* Force visibility of navigation buttons in the lightbox */
.swal2-container .lightbox-nav-btn,
.swal2-container .zoom-nav-btn {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure navigation arrows are visible and correctly positioned */
.lightbox-container {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lightbox-nav {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9990 !important;
    pointer-events: none !important;
}

.lightbox-nav-btn, 
.zoom-nav-btn {
    pointer-events: auto !important;
}

/* Override any SweetAlert styles that might hide buttons */
.swal2-popup .lightbox-nav-btn,
.swal2-popup .zoom-nav-btn,
.product-zoom-popup-transparent .lightbox-nav-btn,
.product-zoom-popup-transparent .zoom-nav-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Additional styles for zoom functionality */
.swal2-container .zoom-nav-btn,
.product-zoom-popup-transparent .zoom-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 155, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
}

.zoom-nav-btn i,
.lightbox-nav-btn i {
    color: white;
    font-size: 24px;
}

/* Make sure the product main image is clickable */
.product-main-image {
    cursor: zoom-in;
    position: relative;
}

.product-main-image img {
    transition: transform 0.3s ease;
}

/* Zoom icon styling */
.image-zoom-icon {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 155, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.image-zoom-icon:hover {
    background-color: rgba(255, 155, 0, 1);
    transform: scale(1.1);
}

.image-zoom-icon i {
    color: white;
    font-size: 18px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .zoom-nav-btn,
    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .zoom-nav-btn i,
    .lightbox-nav-btn i {
        font-size: 20px;
    }
    
    .image-zoom-icon {
        width: 36px;
        height: 36px;
    }
    
    .image-zoom-icon i {
        font-size: 16px;
    }
} 