﻿.gallery-wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: gallery-scroll 25s linear infinite;
}

.gallery-wrap:hover .gallery-track {
    animation-play-state: paused;
}

@keyframes gallery-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.gallery-item {
    flex: 0 0 auto;
    width: 220px !important;
    height: 140px !important;
    border-radius: 8px;
    overflow: hidden !important;
    cursor: pointer;
    display: block;
}

    .gallery-item img {
        width: 220px !important;
        height: 140px !important;
        max-width: 220px !important;
        max-height: 140px !important;
        object-fit: cover !important;
        display: block;
        border-radius: 8px;
        padding: 0 !important;
    }

@media (max-width: 576px) {
    .gallery-item, .gallery-item img {
        width: 160px !important;
        height: 100px !important;
        max-width: 160px !important;
        max-height: 100px !important;
    }
}

/* Lightbox */
.glb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

    .glb-overlay.active {
        display: flex;
    }

.glb-img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
}

.glb-close, .glb-prev, .glb-next {
    position: absolute;
    color: #fff;
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .glb-close:hover, .glb-prev:hover, .glb-next:hover {
        background: rgba(255,255,255,.3);
    }

.glb-close {
    top: 20px;
    right: 20px;
}

.glb-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.glb-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}
 /*ZOOM*/

.glb-zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10000;
}

.glb-zoom-btn {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .glb-zoom-btn:hover {
        background: rgba(255,255,255,.3);
    }

.glb-img-wrap {
    overflow: hidden;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glb-img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    transition: transform .15s ease-out;
    cursor: zoom-in;
    user-select: none;
}

    .glb-img.zoomed {
        cursor: grab;
    }

    .glb-img.dragging {
        cursor: grabbing;
        transition: none;
    }

.glb-zoom-level {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 13px;
    background: rgba(0,0,0,.5);
    padding: 3px 10px;
    border-radius: 10px;
    z-index: 10000;
    opacity: 0;
    transition: opacity .2s;
}

    .glb-zoom-level.show {
        opacity: 1;
    }