/* ===========================
   MODAL GALLERIA (GLOBALE)
   =========================== */

#img-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

/* Immagine principale */
#modal-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: opacity .25s ease;
}

/* Fade */
#modal-img.fade {
    opacity: 0;
}

/* Pulsante chiusura */
#modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
}

#modal-close:hover {
    color: #a0004f;
}

/* ===========================
   FRECCE CAROSELLO (GLOBALE)
   =========================== */

.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #fff;
    cursor: pointer;

    /* Fix warning user-select */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    padding: 0 15px;
    transition: color .25s ease;
    z-index: 100000;
}

#arrow-left {
    left: 30px;
}

#arrow-right {
    right: 30px;
}

.modal-arrow:hover {
    color: #a0004f;
}

/* ===========================
   MINIATURE (GLOBALE)
   =========================== */

#modal-thumbs {
    position: absolute;
    bottom: 25px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#modal-thumbs img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity .25s ease, border-color .25s ease;
}

#modal-thumbs img:hover {
    opacity: 1;
}

#modal-thumbs img.active-thumb {
    border-color: #fff;
    opacity: 1;
}