/* Pecado — Lightbox con álbum (flechas, contador, caption, swipe) */
.lb-overlay {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    background: rgba(0,0,0,.92);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; transition: opacity .25s ease; cursor: zoom-out;
    -webkit-user-select: none; user-select: none; /* arrastrar no selecciona */
}
.lb-overlay.open { opacity: 1; }
.lb-stage {
    position: relative; display: flex; align-items: center; justify-content: center;
    max-width: 100%; max-height: 100%;
}
.lb-img {
    max-width: min(92vw, 960px); max-height: 86vh; max-height: 86dvh;
    -o-object-fit: contain; object-fit: contain;
    border-radius: 12px; background: var(--surface-2, #2a2c37);
    transform: scale(.94); transition: transform .25s ease;
    cursor: default; box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.lb-overlay.open .lb-img { transform: scale(1); }

/* Cargando */
.lb-loader {
    position: absolute; inset: 0; display: none;
    align-items: center; justify-content: center;
    color: rgba(255,255,255,.8); font-size: 2rem; pointer-events: none;
}
.lb-loader i { animation: lb-spin 1s linear infinite; }
.lb-overlay.lb-loading .lb-loader { display: flex; }
@keyframes lb-spin { to { transform: rotate(360deg); } }

/* Flechas: zonas laterales sobre la imagen (como Lightbox2) */
.lb-nav {
    position: absolute; top: 0; bottom: 0; width: 32%;
    display: flex; align-items: center;
    color: #fff; font-size: 2.6rem; opacity: 0;
    transition: opacity .2s ease; cursor: pointer; z-index: 2;
    -webkit-tap-highlight-color: transparent;
}
.lb-prev { left: 0; justify-content: flex-start; padding-left: 4px; }
.lb-next { right: 0; justify-content: flex-end; padding-right: 4px; }
.lb-nav i {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.18);
    transition: background .18s;
}
.lb-stage:hover .lb-nav, .lb-nav:focus-visible { opacity: 1; }
.lb-nav:hover i { background: var(--pecado-red, #FF0000); border-color: var(--pecado-red, #FF0000); }
.lb-nav[hidden] { display: none; }

/* Cerrar: fijo a la esquina del viewport, siempre visible */
.lb-close {
    position: fixed; top: 16px; right: 16px; width: 46px; height: 46px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff;
    background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.25);
    transition: .18s; z-index: 5; cursor: pointer;
}
.lb-close:hover { background: var(--pecado-red, #FF0000); border-color: var(--pecado-red, #FF0000); }

/* Caption + contador */
.lb-details {
    position: absolute; left: 0; right: 0; bottom: -34px;
    display: flex; align-items: baseline; justify-content: center; gap: 14px;
    pointer-events: none;
}
.lb-caption { color: rgba(255,255,255,.65); font-size: .85rem; }
.lb-number { color: rgba(255,255,255,.45); font-size: .78rem; white-space: nowrap; }

/* Táctil: flechas siempre visibles (como alwaysShowNavOnTouchDevices) */
@media (hover: none) {
    .lb-nav { opacity: .9; }
}
@media (max-width: 720px) {
    .lb-overlay { padding: 14px; }
    .lb-img { max-height: 78vh; max-height: 78dvh; border-radius: 10px; }
    .lb-nav { width: 22%; }
    .lb-nav i { width: 44px; height: 44px; font-size: 2rem; }
    .lb-close { top: 12px; right: 12px; width: 42px; height: 42px; }
    .lb-details { bottom: -30px; }
}
