.zoom-image {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    /* Must clear the mobile navbar (z-index 1280) so the zoom overlay sits on top. */
    z-index: 1300;
    /* Suppress the browser's default panning (so our touchmove drives the swipe carousel)
       but still allow two-finger pinch-zoom to inspect the image. */
    touch-action: pinch-zoom;
}

    .zoom-image .zoom-overlay {
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: #000;
        opacity: 0.5;
        animation-name: fade-zoom-overlay;
        animation-timing-function: ease;
        animation-duration: 1s;
    }

    .zoom-image .zoom-wrapper {
        z-index: 1000;
        width: 100%;
        height: 100%;
        position: absolute;
        /* Carousel-style: the track is wider than the viewport; clip everything outside. */
        overflow: hidden;
    }

    .zoom-image .zoom-img-container {
        animation-name: scale-zoom-image;
        animation-timing-function: ease;
        animation-duration: 0.2s;
        position: relative;
        width: 100%;
        height: 100%;
    }

    /* Three-slide track: previous / current / next. Translated horizontally so neighbors
       slide in alongside the current image with a small gap between them. */
    .zoom-image .zoom-track {
        display: flex;
        height: 100%;
        column-gap: 8px;
        transition: transform 0.22s ease-out;
        will-change: transform;
    }
    .zoom-image .zoom-track.zoom-no-transition {
        transition: none;
    }

    .zoom-image .zoom-slide {
        flex: 0 0 100vw;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .zoom-image .zoom-img {
        box-shadow: 0 8px 20px 0 rgba(0,0,0,0.3), 0 10px 50px 0 rgba(0,0,0,0.2);
        max-width: 100%;
        max-height: 100%;
        border-radius: 5px;

        -khtml-user-select: none;
        -o-user-select: none;
        -moz-user-select: none;
        -webkit-user-select: none;
        user-select: none;
    }

.zoom-image .zoom-close {
    width: 40px;
    height: 40px;
    z-index: 999;
    cursor: pointer;
    position: absolute;
    top: -40px;
    right: 0;
    display:none;
}
[onclick^="zoomImage"]{
    cursor:pointer;
}
    .zoom-image .zoom-close img {
        width: 40px;
        height: 40px;
    }

.zoom-image .zoom-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    width: 50px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.zoom-image .zoom-nav:hover,
.zoom-image .zoom-nav:focus {
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    text-decoration: none;
}
.zoom-image .zoom-prev {
    left: 12px;
}
.zoom-image .zoom-next {
    right: 12px;
}
@media (max-width: 600px) {
    .zoom-image .zoom-nav {
        width: 38px;
        height: 48px;
        font-size: 20px;
        background: rgba(0, 0, 0, 0.35);
    }
    .zoom-image .zoom-prev { left: 6px; }
    .zoom-image .zoom-next { right: 6px; }
    .zoom-image .zoom-img {
        border-radius: 0;
    }
}

/* Mobile: solid black backdrop behind the zoomed image (no see-through to the page). */
@media (max-width: 888px) {
    .zoom-image .zoom-overlay {
        opacity: 1;
        animation: none;
    }
    /* Visible close button in the top-left so users don't have to discover the tap-anywhere-to-close gesture. */
    .zoom-image .zoom-close {
        display: block;
        position: fixed;
        top: 12px;
        left: 12px;
        right: auto;
        z-index: 1001;
    }
}

@keyframes scale-zoom-image {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(100%);
    }
}

@keyframes fade-zoom-overlay {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 0.5;
    }
}
