/* =========================
   GALERÍA
   ========================= */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: auto;
}

.gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .3s;
    pointer-events: auto !important;
}

.gallery img:hover {
    transform: scale(1.05);
}

/* IMAGEN INDIVIDUAL */
.viewer-single {
    width: 100%;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    pointer-events: auto !important;
}

/* =========================
   VISOR DE GALERÍA
   ========================= */
.gallery-viewer {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.gallery-viewer__content {
    position: relative;
}

.gallery-viewer__image {
    max-width: 90vw;
    max-height: 90vh;
    max-height: 90svh;
    border-radius: 10px;
    -webkit-user-select: none;
    user-select: none;
}

/* =========================
   MARCA DE AGUA
   ========================= */
.gallery-viewer__watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    pointer-events: none;
}

.gallery-viewer__watermark img {
    width: 10%;
}

/* =========================
   CONTROLES
   ========================= */
.gallery-viewer__close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10;
}

.gallery-viewer__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    cursor: pointer;
    user-select: none;
    z-index: 10;
    padding: 10px;
}

.gallery-viewer__prev {
    left: -70px;
}

.gallery-viewer__next {
    right: -70px;
}

.is-hidden {
    display: none;
}