/* ─────────────────────────────────────────────────────────────
   HTG Lightbox — Estilos
───────────────────────────────────────────────────────────── */

/* Wrapper que envuelve cada imagen del contenido */
.gco-lightbox-wrap {
    position: relative;
    display: inline-block;
    cursor: zoom-in;
    line-height: 0; /* elimina espacio bajo la imagen */
}

/* Icono lupa: aparece al hacer hover */
.gco-lightbox-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        rgba(0, 0, 0, 0.25)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E")
        center / 48px 48px no-repeat;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: inherit;
}

.gco-lightbox-wrap:hover::after {
    opacity: 1;
}

/* ── Overlay ── */
#gco-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;

    /* animación de entrada */
    animation: htgFadeIn 0.2s ease;
}

#gco-lightbox-overlay.gco-active {
    display: flex;
}

@keyframes htgFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Imagen ampliada ── */
#gco-lightbox-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
    cursor: default;

    animation: htgZoomIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes htgZoomIn {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* ── Caption ── */
#gco-lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    padding: 8px 18px;
    border-radius: 4px;
    max-width: 80%;
    text-align: center;
    pointer-events: none;
    white-space: pre-wrap;
}

/* ── Botón cerrar ── */
#gco-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    padding: 0;
}

#gco-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#gco-lightbox-close svg {
    display: block;
}

/* ── Navegación anterior / siguiente ── */
.gco-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    padding: 0;
}

.gco-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.28);
}

.gco-lightbox-nav:disabled {
    opacity: 0.2;
    cursor: default;
}

#gco-lightbox-prev { left: 16px; }
#gco-lightbox-next { right: 16px; }

/* ── Contador ── */
#gco-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    pointer-events: none;
}
