/* contenitore generale modale */
.openmenumobile-b {
    display: none;
    position: fixed;
    z-index: 100;
    width: 100%;
    height: 100vh;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
}

/* sfondo scuro */
.cont-openmenumobile-b {
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /*background: #000 url('<?php echo BASE_URL; ?>img/overlay.png') repeat 0 0;*/
    background: #000 url('../img/overlay.png') repeat 0 0;
    opacity: 0.8;
    cursor: pointer;
}

/* contenitore modale centrale */
.cont-modale-openmenumobile-b {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 100vh;
    margin: 0 auto;
    z-index: 101;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 15px 40px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cont-modale-openmenumobile-b::-webkit-scrollbar {
    display: none;
}

/* box interno bianco */
.cont-interno-openmenumobile-b {
    width: 100%;
    min-height: 100%;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
}

/*#####################################################*/

/* intestazione modale */
.top-galleria {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.top-galleria-sx {
    display: flex;
    flex-direction: column;
    flex: 1; /* occupa tutto lo spazio disponibile */
    min-width: 0; /* permette al testo di restringersi senza invadere la X */
}

.top-galleria-sx h2,
.top-galleria-sx p {
    margin: 0;
    word-break: break-word;
}

.top-galleria-dx {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0; /* la X mantiene la sua dimensione */
}

/**/

/* contenuto generico modale */
.contenuto-openmenumobile-b {
    width: 100%;
}

/**/

.galleria-prodotto {
    width: 100%;
}

/*#####################################################*/

/* contenitore della singola immagine dentro la modale */
.box-immagine-modale {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    overflow: hidden;
}

/* toglie lo spazio sotto all'ultima immagine */
.box-immagine-modale:last-child {
    margin-bottom: 0;
}

/* stile dell'immagine */
.box-immagine-modale img {
    /*
    display: block;
    width: 100%;
    height: auto;
    */
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

/**/

.nome-foto {
    /*
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    */
    margin: 0 0 10px;
}

.pagina-foto {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 6px 10px;
    border-radius: 20px;
}

/*#####################################################*/