/* =========================
   LIGHTBOX (FULL VIEWPORT + ZOOM/PAN)
========================= */

.lb {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.lb.is-open { display: block; }

/* overlay */
.lb__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(6px);
}

/* panel (usa casi toda la pantalla) */
.lb__panel {
    position: absolute;
    inset: 24px;
    border-radius: 18px;
    background: rgba(10,10,10,0.55);
    box-shadow: 0 18px 60px rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.10);
    overflow: hidden;

    display: grid;
    grid-template-columns: 56px 1fr 56px;
    align-items: center;
}

/* area central donde se pinta la imagen */
.lb__stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden; /* clave para pan sin salirse */
    cursor: zoom-in;
}

/* cuando está en zoom */
.lb.is-zoom .lb__stage { cursor: grab; }
.lb.is-zoom .lb__stage:active { cursor: grabbing; }

/* imagen */
.lb__img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;

    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;

    /* suavidad */
    transition: transform .15s ease;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none; /* el drag lo maneja el stage */
}

/* botones */
.lb__btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(0,0,0,0.35);
    color: rgba(255,255,255,0.92);
    display: grid;
    place-items: center;
    cursor: pointer;
    margin: 0 auto;
    transition: transform .12s ease, background .12s ease, opacity .12s ease;
}

.lb__btn:hover { background: rgba(0,0,0,0.55); transform: translateY(-1px); }
.lb__btn:disabled { opacity: .25; cursor: default; transform: none; }

.lb__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

/* hint */
.lb__hint {
    position: absolute;
    left: 16px;
    bottom: 14px;
    z-index: 2;
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.10);
    padding: 8px 10px;
    border-radius: 999px;
}

/* responsive */
@media (max-width: 760px) {
    .lb__panel { inset: 12px; grid-template-columns: 44px 1fr 44px; }
    .lb__btn { width: 36px; height: 36px; }
}
