
.gallery-wrapper {
    position: relative;
    overflow: hidden;
    padding: 10px 40px;
}

.gallery-track {
    display: flex;
    transition: transform .4s ease;
}

.gallery-item {
    flex: 0 0 25%;
    padding: 8px;
    box-sizing: border-box;
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .3s;
}

.gallery-item img:hover {
    transform: scale(1.04);
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: #343a40;
    color: white;
    border: none;
    width: 35px;
    height: 45px;
    cursor: pointer;
}

.gallery-prev { left: 0; }
.gallery-next { right: 0; }

#imageModal {
    z-index: 9999;
}

#imageModal .modal-body {
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 300px;
}

#modalImage {
    max-width: 80%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.modal-nav {
    background: transparent;
    color: white;
    border: none;
    font-size: 25px;
    cursor: pointer;
}
#imageModal {
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1050;
}

#imageModal .modal-dialog {
    pointer-events: auto;
}

#imageModal .modal-content {
    pointer-events: auto;
    position: relative;
}

#imageModal .modal-header .close {
    opacity: 1;
    cursor: pointer;
    z-index: 10;
}

#imageModal .modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#modalImage {
    max-width: 80%;
    max-height: 70vh;
    object-fit: contain;
}

.modal-nav {
    cursor: pointer;
    pointer-events: auto;
    padding: 10px;
}
@media(max-width: 768px) {
    .gallery-item { flex: 0 0 50%; }
    .gallery-item img { height: 150px; }
}

@media(max-width: 480px) {
    .gallery-item { flex: 0 0 100%; }
}
/*// add */

/* LIGHTBOX BACKGROUND */
.image-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);

    align-items: center;
    justify-content: center;
}

/* SHOW LIGHTBOX */
.image-lightbox.active {
    display: flex;
}

/* LARGE IMAGE */
#lightboxImage {
    max-width: 80%;
    max-height: 80vh;
    object-fit: contain;
    user-select: none;
}

/* CLOSE BUTTON */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 30px;
    color: white;
    font-size: 45px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000000;
}

/* PREVIOUS AND NEXT */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    background: rgba(255,255,255,0.15);
    border: none;
    font-size: 30px;
    padding: 15px;
    cursor: pointer;
    border-radius: 5px;
    z-index: 1000000;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* COUNTER */
#lightboxCounter {
    position: absolute;
    bottom: 20px;
    color: white;
    font-size: 16px;
}

/* MOBILE */
@media(max-width: 600px) {

    #lightboxImage {
        max-width: 90%;
        max-height: 70vh;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 20px;
        padding: 10px;
    }

    .lightbox-prev {
        left: 5px;
    }

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

