/**
 * Artwork Shadowbox Styles - Artsy White Lightbox
 * 
 * @package Glozin Child
 * @version 3.0.3
 */

/* ==========================================================================
   Shadowbox Container
   ========================================================================== */

.artwork-shadowbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shadowbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

/* ==========================================================================
   Shadowbox Content Container (Fullscreen)
   ========================================================================== */

.shadowbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shadowbox-scroll-wrapper {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shadowbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding: 80px 60px 60px;
}

/* ==========================================================================
   Close Button (Artsy Style)
   ========================================================================== */

.shadowbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    border-radius: 50%;
}

.shadowbox-close:hover {
    background: #f5f5f5;
    color: #000;
}

.shadowbox-close svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Navigation Buttons (Prev/Next)
   ========================================================================== */

.shadowbox-prev,
.shadowbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #000;
    cursor: pointer;
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shadowbox-prev {
    left: 20px;
}

.shadowbox-next {
    right: 20px;
}

.shadowbox-prev:hover,
.shadowbox-next:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.shadowbox-prev svg,
.shadowbox-next svg {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   Image Area (Centered, Fullscreen)
   ========================================================================== */

.shadowbox-image-wrapper {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
}

.shadowbox-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ==========================================================================
   Info Panel (Below Image, Centered, Single Line)
   ========================================================================== */

.shadowbox-info {
    width: 100%;
    max-width: 1000px;
    text-align: center;
    color: #000;
    margin-top: 30px;
}

.shadowbox-info-link {
    text-decoration: none;
    color: #666;
    transition: color 0.2s ease;
    display: inline-block;
}

.shadowbox-info-link:hover {
    color: #000;
}

.shadowbox-single-line {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.shadowbox-image-link {
    display: block;
    cursor: pointer;
}

.shadowbox-image-link:hover .shadowbox-image {
    opacity: 0.95;
}

/* ==========================================================================
   Body Lock
   ========================================================================== */

body.shadowbox-open {
    overflow: hidden;
}

html.shadowbox-open {
    overflow: hidden;
}

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */

.shadowbox-scroll-wrapper::-webkit-scrollbar {
    width: 6px;
}

.shadowbox-scroll-wrapper::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.shadowbox-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.shadowbox-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ==========================================================================
   Mobile Responsive (Fullscreen on All Devices)
   ========================================================================== */

@media (max-width: 1024px) {
    .shadowbox-content {
        padding: 70px 40px 40px;
    }

    .shadowbox-image {
        max-height: 60vh;
    }
}

@media (max-width: 768px) {
    .shadowbox-content {
        padding: 60px 30px 30px;
    }

    .shadowbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .shadowbox-prev,
    .shadowbox-next {
        width: 44px;
        height: 44px;
    }
    
    .shadowbox-prev {
        left: 15px;
    }
    
    .shadowbox-next {
        right: 15px;
    }

    .shadowbox-image-wrapper {
        margin-bottom: 25px;
    }

    .shadowbox-image {
        max-height: 55vh;
    }

    .shadowbox-single-line {
        font-size: 14px;
    }
    
    .shadowbox-info {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .shadowbox-content {
        padding: 60px 20px 25px;
    }
    
    .shadowbox-prev,
    .shadowbox-next {
        width: 40px;
        height: 40px;
    }
    
    .shadowbox-prev {
        left: 10px;
    }
    
    .shadowbox-next {
        right: 10px;
    }
    
    .shadowbox-prev svg,
    .shadowbox-next svg {
        width: 20px;
        height: 20px;
    }

    .shadowbox-image {
        max-height: 50vh;
    }
    
    .shadowbox-image-wrapper {
        margin-bottom: 20px;
    }

    .shadowbox-single-line {
        font-size: 13px;
    }
    
    .shadowbox-info {
        margin-top: 15px;
    }
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.shadowbox-image-wrapper.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: shadowbox-spin 1s linear infinite;
}

@keyframes shadowbox-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Quick View Button - Keep Visible, Disable Default Modal
   ========================================================================== */

/* Don't hide quick view buttons - they trigger the shadowbox */
.gz-button-quick-view,
.quick-view-button {
    /* Allow to show - they now open our shadowbox */
}

/* Hide Glozin's default Quick View modal if it somehow loads */
#glozin-quick-view-modal,
.glozin-quick-view-modal,
.gz-quick-view-modal,
.quick-view-modal,
.woocommerce-quick-view-modal,
div[class*="quick-view"][class*="modal"],
.mfp-bg.quick-view-bg,
.mfp-wrap.quick-view-wrap {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
