/* ==========================================================================
   Visor de imágenes (lightbox) — Salón SHADDAI
   Se usa en el sitio público y en el panel (servicios, productos, paquetes,
   estilistas). Ver assets/js/lightbox.js
   ========================================================================== */
html.slb-lock { overflow: hidden; }
html.slb-lock body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }

/* Señal visual de que una imagen se puede ampliar */
[data-lightbox-src] { cursor: zoom-in; }
img[data-lightbox-src] { transition: transform .2s ease, filter .2s ease; }
img[data-lightbox-src]:hover { filter: brightness(1.04); }

.slb {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(9, 143, 161, .24), transparent 60%),
        rgba(7, 34, 38, .96);
    color: #f5ffff;
    font-family: 'Poppins', system-ui, sans-serif;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}
.slb.is-open { opacity: 1; visibility: visible; }
.slb [hidden] { display: none !important; }

.slb__top {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: max(12px, env(safe-area-inset-top)) 16px 10px;
    background: linear-gradient(180deg, rgba(5, 42, 47, .58), transparent);
}
.slb__info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.slb__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f5ffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slb__counter { font-size: .75rem; color: #bdecef; letter-spacing: .06em; font-weight: 600; }
.slb__tools { display: flex; gap: 8px; flex: 0 0 auto; }

.slb__btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(189, 236, 239, .38);
    background: rgba(9, 143, 161, .2);
    color: #f5ffff;
    cursor: pointer;
    text-decoration: none;
    transition: background .18s, transform .18s, border-color .18s;
    backdrop-filter: blur(6px);
}
.slb__btn svg { width: 20px; height: 20px; }
.slb__btn:hover { background: rgba(9, 143, 161, .48); border-color: #098FA1; }
.slb__btn:active { transform: scale(.94); }
.slb__btn--close { background: linear-gradient(135deg, #12a5b5, #087784); border-color: #d7a632; }
.slb__btn--close:hover { background: linear-gradient(135deg, #24b9c5, #098FA1); }
.slb__btn:focus-visible, .slb__nav:focus-visible, .slb__thumb:focus-visible { outline: 2px solid #f2d48a; outline-offset: 2px; }

.slb__stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 70px;
}
.slb__frame {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}
.slb__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 1px solid rgba(215, 166, 50, .9);
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 20, 24, .52), 0 0 0 1px rgba(215, 166, 50, .28);
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0;
    transform-origin: center;
    transition: opacity .25s ease, transform .22s ease;
    cursor: zoom-in;
    background: #fff;
}
.slb__img.is-ready { opacity: 1; }
.slb.is-zoomed .slb__img { cursor: grab; transition: opacity .25s ease; border-radius: 6px; }
.slb.is-zoomed .slb__img:active { cursor: grabbing; }

.slb__loader {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(189, 236, 239, .28);
    border-top-color: #098FA1;
    animation: slb-spin .8s linear infinite;
}
@keyframes slb-spin { to { transform: rotate(360deg); } }

.slb__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    border-radius: 50%;
    border: 1px solid rgba(189, 236, 239, .4);
    background: rgba(7, 61, 67, .66);
    color: #f5ffff;
    cursor: pointer;
    transition: background .18s, transform .18s;
    backdrop-filter: blur(6px);
}
.slb__nav svg { width: 24px; height: 24px; }
.slb__nav:hover { background: linear-gradient(135deg, #12a5b5, #087784); transform: scale(1.06); }
.slb__nav--prev { left: 12px; }
.slb__nav--next { right: 12px; }

.slb__thumbs {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 10px 16px 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.slb__thumbs::-webkit-scrollbar { display: none; }
.slb__thumb {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    padding: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    overflow: hidden;
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
    opacity: .55;
    transition: opacity .18s, border-color .18s, transform .18s;
}
.slb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slb__thumb:hover { opacity: .9; }
.slb__thumb.is-active { opacity: 1; border-color: #d7a632; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 30, 34, .4); }

.slb__hint {
    margin: 0;
    padding: 4px 16px max(12px, env(safe-area-inset-bottom));
    text-align: center;
    font-size: .72rem;
    color: rgba(235, 251, 252, .72);
    display: none;
}

@media (max-width: 760px) {
    .slb__stage { padding: 4px 10px; }
    .slb__nav { width: 40px; height: 40px; margin-top: -20px; background: rgba(7, 61, 67, .66); }
    .slb__nav svg { width: 20px; height: 20px; }
    .slb__nav--prev { left: 6px; }
    .slb__nav--next { right: 6px; }
    .slb__btn { width: 40px; height: 40px; }
    .slb__thumb { width: 52px; height: 52px; border-radius: 10px; }
    .slb__thumbs { justify-content: flex-start; }
    .slb__hint { display: block; }
    .slb__img { border-radius: 10px; }
}
@media (hover: none) {
    .slb__nav { opacity: .85; }
}
@media (prefers-reduced-motion: reduce) {
    .slb, .slb__img, .slb__thumb, .slb__nav { transition: none !important; }
}

/* Indicador "ampliar" sobre las fotos del catálogo público */
.lb-hint {
    position: absolute; right: 10px; bottom: 10px; z-index: 3;
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
    background: rgba(7, 61, 67, .68); color: #f5ffff; pointer-events: none;
    backdrop-filter: blur(4px); box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    opacity: .9; transition: opacity .2s, transform .2s;
}
.lb-hint svg { width: 16px; height: 16px; }
:hover > .lb-hint { transform: scale(1.08); background: rgba(9, 143, 161, .92); }
.pub-pkg-slide:not(.is-active) { pointer-events: none; }
.pub-pkg-card__media::after, .pub-pkg-card__media::before { pointer-events: none; }
.pub-pkg-card__media .lb-hint { bottom: auto; top: 12px; right: auto; left: 12px; }
.pub-svc-card__img { position: relative; }
