/**
 * Zeus Product Gallery Styles
 * Base styles and lightbox functionality
 */

/* Gallery Base Styles */
.zeus-product-gallery {
    position: relative;
    user-select: none;
}

.zeus-gallery-thumbnails {
    position: relative;
}

.zeus-thumbnails-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.zeus-thumbnails-track::-webkit-scrollbar {
    display: none;
}

.zeus-thumbnails-track.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.zeus-thumbnails-track.dragging * {
    pointer-events: none;
}

/* Thumbnail Items */
.zeus-thumbnail-item {
    position: relative;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.zeus-thumbnail-item img {
    display: block;
    pointer-events: none;
}

/* Video Play Icon on Thumbnails */
.zeus-video-play-icon svg {
    display: block;
}

/* Main Image Wrapper */
.zeus-main-wrapper {
    width: 100%;
}

.zeus-product-gallery.layout-auto .zeus-main-wrapper {
    height: auto;
    padding-bottom: 0 !important;
}

/* Main Items */
.zeus-main-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.zeus-main-item img {
    display: block;
    user-select: none;
    -webkit-user-select: none;
}

/* Video Container */
.zeus-video-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.zeus-video-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.zeus-video-iframe {
    display: block;
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: 177.78vh;
    height: 56.25vw;
}

/* Badges */
.zeus-badges {
    pointer-events: none;
}

.zeus-badge {
    pointer-events: auto;
}

/* Navigation Arrows for Thumbnails */
.zeus-thumb-arrow {
    background: none;
    outline: none;
    padding: 0;
}

.zeus-thumb-arrow svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Navigation Arrows for Main Image */
.zeus-main-arrow {
    background: none;
    outline: none;
    padding: 0;
}

.zeus-main-arrow svg {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

/* Hide arrows on mobile for main image */
@media (max-width: 768px) {
    .zeus-main-arrow {
        width: 35px;
        height: 35px;
    }
    
    .zeus-main-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .zeus-main-arrow-prev {
        left: 10px;
    }
    
    .zeus-main-arrow-next {
        right: 10px;
    }
}

/* Lightbox Styles */
.zeus-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
}

.zeus-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.zeus-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    box-sizing: border-box;
}

.zeus-lightbox-main {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zeus-lightbox-main img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

.zeus-lightbox-video {
    width: 90vw;
    height: 50.625vw;
    max-width: 1200px;
    max-height: 675px;
}

.zeus-lightbox-video iframe {
    width: 100%;
    height: 100%;
}

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

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

.zeus-lightbox-prev,
.zeus-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

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

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

.zeus-lightbox-prev:hover,
.zeus-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.zeus-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 10;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .zeus-lightbox-content {
        padding: 40px 20px;
    }
    
    .zeus-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .zeus-lightbox-prev,
    .zeus-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 32px;
    }
    
    .zeus-lightbox-prev {
        left: 10px;
    }
    
    .zeus-lightbox-next {
        right: 10px;
    }
    
    .zeus-lightbox-video {
        width: 95vw;
        height: 53.4375vw;
    }
    
    .zeus-lightbox-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 549px) {
    .zeus-product-gallery.layout-vertical .zeus-gallery-container,
    .zeus-product-gallery.layout-vertical-right .zeus-gallery-container {
        flex-direction: column !important;
    }
    
    .zeus-product-gallery.layout-vertical .zeus-gallery-thumbnails,
    .zeus-product-gallery.layout-vertical-right .zeus-gallery-thumbnails {
        flex-direction: row !important;
        width: auto !important;
        overflow-x: auto;
    }
}

/* Utility Classes */
.zeus-product-gallery * {
    box-sizing: border-box;
}

/* Smooth Transitions */
.zeus-thumbnail-item,
.zeus-main-item,
.zeus-main-image {
    will-change: transform, opacity;
}

/* Focus Styles for Accessibility */
.zeus-product-gallery:focus {
    outline: none;
}

.zeus-thumbnail-item:focus {
    outline: none;
}

/* Loading State */
.zeus-main-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print Styles */
@media print {
    .zeus-lightbox,
    .zeus-gallery-thumbnails {
        display: none !important;
    }
}