/* DIG Image Zoom - Site-wide Lightbox */

/* Zoomable Image Cursor */
img.dig-zoomable {
    cursor: zoom-in !important;
    transition: opacity 0.2s ease;
}

img.dig-zoomable:hover {
    opacity: 0.9;
}

/* Lightbox Container */
.dig-zoom-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.dig-zoom-lightbox.active {
    display: block;
}

/* Dark Overlay */
.dig-zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}

/* Content Container */
.dig-zoom-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000000;
    padding: 40px 20px;
}

/* Close Button */
.dig-zoom-close {
    position: fixed;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dig-zoom-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* Zoomed Image */
.dig-zoom-image {
    max-width: 95%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    cursor: zoom-out;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading Spinner */
.dig-zoom-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Navigation Arrows (Gallery Mode) */
.dig-zoom-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
}

.dig-zoom-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.dig-zoom-nav.dig-zoom-prev {
    left: 30px;
}

.dig-zoom-nav.dig-zoom-next {
    right: 30px;
}

.dig-zoom-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Image Counter */
.dig-zoom-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Caption */
.dig-zoom-caption {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 8px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dig-zoom-content {
        padding: 20px 10px;
    }
    
    .dig-zoom-image {
        max-width: 98%;
        max-height: 85vh;
    }
    
    .dig-zoom-close {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 26px;
    }
    
    .dig-zoom-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .dig-zoom-nav.dig-zoom-prev {
        left: 10px;
    }
    
    .dig-zoom-nav.dig-zoom-next {
        right: 10px;
    }
    
    .dig-zoom-counter {
        bottom: 20px;
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .dig-zoom-caption {
        bottom: 60px;
        font-size: 16px;
        max-width: 90%;
        padding: 8px 16px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .dig-zoom-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .dig-zoom-nav {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .dig-zoom-caption {
        font-size: 14px;
    }
}

/* Print - Hide Lightbox */
@media print {
    .dig-zoom-lightbox {
        display: none !important;
    }
}
