/**
 * hybinet-lightbox.css — Hybinet Product Lightbox Styles
 */

/* ── Overlay principal ────────────────────────────────────────────────────── */
#hybinet-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.93);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    opacity: 0;
    transition: opacity 0.28s ease;
}

#hybinet-lightbox[hidden] {
    display: none !important;
}

#hybinet-lightbox.hybinet-lb-open {
    opacity: 1;
}

/* ── Barra superior con flecha y título ──────────────────────────────────── */
#hybinet-lb-back {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    padding: 8px 14px 8px 10px;
    border-radius: 10px;
    z-index: 2;
    transition: background 0.18s ease;
    letter-spacing: 0.01em;
}

#hybinet-lb-back:hover,
#hybinet-lb-back:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

#hybinet-lb-back svg {
    flex-shrink: 0;
}

#hybinet-lb-title {
    max-width: 60vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Contenedor de la imagen centrada ───────────────────────────────────── */
#hybinet-lb-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}

/* ── Imagen ─────────────────────────────────────────────────────────────── */
#hybinet-lb-img {
    width: 90vw;
    height: 88vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
    transform-origin: center center;
    transition: transform 0.1s ease;
    user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-in;
    will-change: transform;
}

/* ── Overlay de protección de imagen (guard invisible) ───────────────────
   Cubre exactamente el área del <img>. Al ser un <div>, el clic derecho
   no ofrece "Guardar imagen como...". La imagen debajo queda con
   pointer-events: none (aplicado por JS).
   ──────────────────────────────────────────────────────────────────────── */
.hybinet-img-guard {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: zoom-in;
    background: transparent;
    -webkit-user-select: none;
    user-select: none;
}

/* ── Responsive móvil ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    #hybinet-lb-back {
        top: 12px;
        left: 12px;
        font-size: 14px;
        padding: 6px 10px 6px 8px;
    }
    #hybinet-lb-title {
        max-width: 55vw;
    }
    #hybinet-lb-img {
        width: 96vw;
        height: 82vh;
    }
}
