/* ========== Lightbox ========== */
.pg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .92);
    display: none;
    opacity: 0;
    transition: opacity .2s;
}

.pg-lightbox.is-open {
    display: block;
    opacity: 1;
}

.pg-lb-toolbar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    pointer-events: none;
}

.pg-lb-toolbar .pg-lb-btn {
    pointer-events: auto;
}

.pg-lb-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(0, 0, 0, .35);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.pg-lb-zoomgrp {
    display: flex;
    gap: .5rem;
}

.pg-lb-stage {
    position: absolute;
    inset: 64px 12px 12px 12px; /* جای نوار بالا */
    display: grid;
    place-items: center;
    overflow: hidden;
}

.pg-lb-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    transform-origin: center center;
    cursor: grab;
    user-select: none;
    transition: transform .08s ease-out;
}

.pg-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 64px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    display: grid;
    place-items: center;
    z-index: 3; /* جدید: روی تصویر و استیج بیاد */
    pointer-events: auto; /* جدید: حتماً کلیک بگیره */
}

.pg-lb-prev {
    right: 16px;
}

/* چون RTL */
.pg-lb-next {
    left: 16px;
}

.pg-lb-btn:hover, .pg-lb-nav:hover {
    background: rgba(255, 255, 255, .2);
}
