/* <!-- ===== Estilos específicos ===== --> */
/* Grid de thumbs */
.thumb img {
    transition: transform .2s ease;
}

.thumb:hover img {
    transform: scale(1.02);
}

/* Área de imagen dentro del modal */
.zoom-stage {
    position: relative;
    width: 100%;
    height: 80vh;
    /* alto útil */
    background: #000;
    overflow: hidden;
    /* recorta cuando se hace pan */
    touch-action: none;
    /* habilita pan/zoom manual sin que la página se mueva */
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-img {
    max-width: 100%;
    max-height: 100%;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    transition: transform .08s linear;
    will-change: transform;
}

/* Caption */
.img-caption {
    color: #e9ecef;
    background: rgba(0, 0, 0, .55);
    padding: .4rem .75rem;
    border-radius: .5rem;
    max-width: 100%;
    margin: .5rem auto 0;
    text-align: center;
}

/* Ajuste del slide para que no haya saltos */
.carousel-item {
    background: #000;
}

/* Modal a pantalla completa y sin márgenes */
#viewerModal .modal-dialog {
    margin: 0;
    max-width: 100vw;
}

#viewerModal .modal-content {
    min-height: 100vh;
    background: #000;
}

#viewerModal .modal-body {
    padding: 0;
}

/* El carrusel ocupa todo el alto disponible */
#viewerModal .carousel,
#viewerModal .carousel-inner,
#viewerModal .carousel-item {
    height: 100%;
}

/* Caption opcional */
.img-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: .5rem .75rem;
    font-size: .95rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .6) 100%);
}

/* Modal full screen / mobile friendly */
.zoom-stage {
    width: 100%;
    height: calc(100dvh - 90px);
    /* antes 100vh */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.zoom-img {
    max-width: 100dvw;
    /* antes 100vw */
    max-height: calc(100dvh - 110px);
    /* antes 100vh */
    object-fit: contain;
    width: auto;
    height: auto;
}

#btn-download,
#btn-share {
    min-height: 44px;
    /* pulgar-friendly */
    white-space: nowrap;
}


/* target cómodo en táctil */