/* MUZI LIGHTBOX SYSTEM - MODERN & RESPONSIVE */

.muzi-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.muzi-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.muzi-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.muzi-lightbox-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.muzi-lightbox.active .muzi-lightbox-container {
    transform: scale(1);
}

.muzi-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.muzi-lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.muzi-lightbox-caption {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    margin-top: 16px;
    padding: 0 20px;
    max-width: 600px;
    line-height: 1.5;
}

.muzi-lightbox-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000001;
}

.muzi-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.muzi-lightbox-prev,
.muzi-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000001;
}

.muzi-lightbox-prev {
    left: -80px;
}

.muzi-lightbox-next {
    right: -80px;
}

.muzi-lightbox-prev:hover,
.muzi-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.muzi-lightbox-counter {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 20px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.muzi-lightbox-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding: 0 20px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.muzi-lightbox-thumbnails::-webkit-scrollbar {
    display: none;
}

.muzi-lightbox-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.muzi-lightbox-thumb:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.muzi-lightbox-thumb.active {
    opacity: 1;
    border-color: #c19a6b;
    transform: scale(1.1);
}

/* Zoom Icon Overlay */
.muzi-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(5px);
}

.product-card:hover .muzi-zoom-icon,
.gallery-item:hover .muzi-zoom-icon,
[style*="cursor: pointer"]:hover .muzi-zoom-icon {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .muzi-lightbox-container {
        max-width: 100vw;
        max-height: 100vh;
        padding: 20px;
        position: relative;
    }

    .muzi-lightbox-content {
        max-width: 100%;
        max-height: 90vh;
    }

    .muzi-lightbox-image {
        max-height: 60vh;
        border-radius: 8px;
    }

    .muzi-lightbox-close {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
        background: rgba(0, 0, 0, 0.8);
        z-index: 1000001;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

    .muzi-lightbox-prev,
    .muzi-lightbox-next {
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 50px;
        font-size: 20px;
        background: rgba(0, 0, 0, 0.8);
        z-index: 1000001;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

    .muzi-lightbox-prev {
        left: 20px;
    }

    .muzi-lightbox-next {
        right: 20px;
    }

    .muzi-lightbox-caption {
        font-size: 1rem;
        margin-top: 12px;
        padding: 0 10px;
    }

    .muzi-lightbox-counter {
        font-size: 0.9rem;
        margin-top: 16px;
        padding: 6px 12px;
    }

    .muzi-lightbox-thumbnails {
        margin-top: 16px;
        padding: 0 10px;
        gap: 6px;
    }

    .muzi-lightbox-thumb {
        width: 50px;
        height: 50px;
        border-radius: 6px;
    }

    .muzi-zoom-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .muzi-lightbox-image {
        max-height: 50vh;
    }

    .muzi-lightbox-prev,
    .muzi-lightbox-next {
        position: fixed !important;
        width: 45px;
        height: 45px;
        font-size: 18px;
        background: rgba(0, 0, 0, 0.9) !important;
        border: 2px solid rgba(255, 255, 255, 0.4) !important;
        z-index: 1000002 !important;
    }

    .muzi-lightbox-close {
        position: fixed !important;
        width: 45px;
        height: 45px;
        font-size: 18px;
        background: rgba(0, 0, 0, 0.9) !important;
        border: 2px solid rgba(255, 255, 255, 0.4) !important;
        z-index: 1000002 !important;
    }

    .muzi-lightbox-thumb {
        width: 45px;
        height: 45px;
    }
}

/* Animation enhancements */
@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.muzi-lightbox.active .muzi-lightbox-image {
    animation: lightboxFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Accessibility improvements */
.muzi-lightbox button:focus {
    outline: 2px solid #c19a6b;
    outline-offset: 2px;
}

.muzi-lightbox-thumb:focus {
    outline: 2px solid #c19a6b;
    outline-offset: 2px;
}
