/* استایل لایت‌باکس سراسری قالب مرآت */
.glb-zoomable {
    cursor: zoom-in;
}

.glb-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.glb-overlay.open {
    visibility: visible;
    opacity: 1;
}

.glb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 30, 0.92);
    backdrop-filter: blur(4px);
}

.glb-figure {
    position: relative;
    margin: 0;
    max-width: min(92vw, 1100px);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.94);
    transition: transform 0.25s ease;
}

.glb-overlay.open .glb-figure {
    transform: scale(1);
}

.glb-image {
    max-width: min(92vw, 1100px);
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: #111827;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.glb-image.loaded {
    opacity: 1;
}

.glb-caption {
    margin-top: 12px;
    color: #e5e7eb;
    font-size: 15px;
    text-align: center;
    line-height: 1.8;
    max-width: 90%;
}

.glb-counter {
    margin-top: 6px;
    color: #9ca3af;
    font-size: 13px;
    letter-spacing: 1px;
}

.glb-spinner {
    position: absolute;
    top: 40%;
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: glb-spin 0.8s linear infinite;
}

@keyframes glb-spin {
    to { transform: rotate(360deg); }
}

.glb-btn {
    position: absolute;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    line-height: 1;
    z-index: 2;
}

.glb-btn:hover {
    background: #1e3a8a;
    transform: scale(1.08);
}

.glb-close {
    top: 18px;
    left: 18px;
    font-size: 18px;
}

.glb-prev {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
}

.glb-next {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
}

.glb-prev:hover,
.glb-next:hover {
    transform: translateY(-50%) scale(1.08);
}

@media (max-width: 640px) {
    .glb-btn {
        width: 40px;
        height: 40px;
    }
    .glb-prev { right: 8px; }
    .glb-next { left: 8px; }
    .glb-caption { font-size: 13px; }
}
