/**
 * KyoZoom - Complete Styles
 * Version: 2.0.0
 */

/* =============================================
   HOVER ZOOM PANE
   ============================================= */

.product-gallery-container {
    position: relative;
}

.kyo-zoom-pane {
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 450px;
    height: 450px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    transition: opacity 200ms ease, visibility 200ms ease;
}

.kyo-zoom-pane.active {
    opacity: 1;
    visibility: visible;
}

.kyo-zoom-image {
    position: absolute;
    max-width: none;
    max-height: none;
    transform-origin: top left;
}

.bb-product-gallery-images img,
.kyo-zoom-slide img {
    cursor: zoom-in;
}

.kyo-zoom-slide {
    cursor: zoom-in;
}

/* Responsive hover zoom */
@media (max-width: 1400px) {
    .kyo-zoom-pane {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 1200px) {
    .kyo-zoom-pane {
        width: 350px;
        height: 350px;
        left: calc(100% + 15px);
    }
}

@media (max-width: 991px) {
    .kyo-zoom-pane {
        display: none !important;
    }
}

/* =============================================
   LIGHTBOX MODAL
   ============================================= */

.kyo-lightbox-open {
    overflow: hidden;
}

.kyo-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
}

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

.kyo-lightbox-container {
    width: 100%;
    height: 100%;
    position: relative;
    box-sizing: border-box;
}

/* Header - Overlay on top */
.kyo-lightbox-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    z-index: 20;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.kyo-lightbox-counter {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.kyo-lightbox-zoom-indicator {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 6px;
}

.kyo-lightbox-zoom-indicator .zoom-level {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: monospace;
}

.kyo-lightbox-actions {
    display: flex;
    gap: 10px;
}

.kyo-lightbox-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background 200ms ease, transform 100ms ease;
}

.kyo-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.kyo-lightbox-btn:active {
    transform: scale(0.95);
}

/* Content area - Fullscreen */
.kyo-lightbox-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Navigation buttons */
.kyo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background 200ms ease, transform 100ms ease;
    z-index: 10;
}

.kyo-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.kyo-lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

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

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

/* Image wrapper - Fullscreen */
.kyo-lightbox-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.kyo-lightbox-image {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    transition: transform 150ms ease-out;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
}

.kyo-lightbox-image-wrapper.is-zoomed {
    cursor: grab;
}

.kyo-lightbox-image-wrapper.is-zoomed .kyo-lightbox-image {
    cursor: grab;
    transition: transform 50ms ease-out;
}

/* Hint text */
.kyo-lightbox-hint {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 15;
}

/* Thumbnails - Overlay at bottom */
.kyo-lightbox-thumbnails {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    overflow-x: auto;
    max-width: 100%;
    z-index: 20;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.kyo-lightbox-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 200ms ease, transform 100ms ease;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.kyo-lightbox-thumb:hover {
    opacity: 0.8;
}

.kyo-lightbox-thumb.active {
    opacity: 1;
    border-color: #fd4513;
}

.kyo-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .kyo-lightbox-header {
        padding: 10px 15px;
    }

    .kyo-lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .kyo-lightbox-prev {
        left: 10px;
    }

    .kyo-lightbox-next {
        right: 10px;
    }

    .kyo-lightbox-thumb {
        width: 50px;
        height: 50px;
    }

    .kyo-lightbox-btn {
        width: 40px;
        height: 40px;
    }

    .kyo-lightbox-thumbnails {
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .kyo-lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .kyo-lightbox-prev {
        left: 5px;
    }

    .kyo-lightbox-next {
        right: 5px;
    }

    .kyo-lightbox-thumbnails {
        gap: 6px;
        padding: 8px 10px;
    }

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

    .kyo-lightbox-hint {
        bottom: 80px;
        font-size: 11px;
    }
}
