.col-md-12.pt {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.moneta-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 175px;
    text-align: center;
    margin: 5px;
    padding: 5px;
    border: 1px solid #ddd;
    vertical-align: top;
    height: 100%;
}

.moneta-img {
    width: 120px;
    height: 120px;
    margin: 5px auto;
    object-fit: cover;
    cursor: pointer;
}

.star-varianti {
    position: absolute;
    top: 35px;
    left: 5px;
    font-size: 35px;
    z-index: 10;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    /* Il cursor verrà sovrascritto dall'inline style in base alla condizione */
}
.stella-cliccabile {
    cursor: pointer !important;
}
/* Riquadro descrittivo uniforme */
.descrizione-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    padding: 8px;
    margin-top: 5px;
    font-size: 12px;
    line-height: 15px;
}
/* Badge per il tipo */
.badge-tipo {
    font-size: 10px;
    padding: 0 5px;
    border-radius: 3px;
    text-transform: uppercase;
    float: right;
}
.modal-body-varianti {
    padding: 20px;
}
.img-variante-modal {
    max-width: 150px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
#vDesc {
    font-size: 14px;
    padding: 10px;
    border-top: 1px solid #eee;
    margin-top: 15px;
}
.modal-xl {
    max-width: 95% !important;
}
/* Container principale */

@media (min-width: 992px) {
    #modalSerie .modal-dialog {
        max-width: 900px !important;
        margin: 1.75rem auto;
    }
}

#serieBody {
    max-height: 70vh;
    overflow-y: auto;
    padding-bottom: 100px;
}
.serie-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start; /* Allinea a sinistra */
    padding: 10px;
}

/* Ogni singolo box moneta */
.moneta-box {
    flex: 0 0 calc(50% - 5px); /* 2 monete affiancate su mobile */
    max-width: calc(50% - 5px);
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px;
    background: #fff;
    align-items: center;
    overflow: visible;
}

/* Nazione: font leggibile e fisso */
.nazione-label {
    font-size: 0.8rem;
    font-weight: bold;
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Immagine */
.moneta-box img {
    width: 100%;
    max-width: 100px;
    height: auto;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

/* Codice */
.moneta-codice {
    font-size: 0.75rem;
    color: #666;
    margin-top: 5px;
}
.moneta-box img:hover {
    transform: scale(1.1);
}
/* Stile per l'immagine cliccabile */
.thumb-zoom {
    cursor: zoom-in;
    transition: transform 0.3s ease;
    max-width: 100px; /* Dimensione base nel box */
}

/* Media query per schermi più grandi */
@media (min-width: 768px) {
    .moneta-box {
        flex: 0 0 calc(25% - 8px); /* 4 monete su tablet */
        max-width: calc(25% - 8px);
    }
}

@media (min-width: 1200px) {
    .moneta-box {
        flex: 0 0 calc(16.66% - 9px); /* 6 monete su desktop */
        max-width: calc(16.66% - 9px);
    }
}
#freeZoomContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#freeZoomContainer.show {
    opacity: 1;
    pointer-events: auto;
}

#freeZoomImage {
    max-width: 90vw;
    max-height: 90vh;
    border: 5px solid white;
    cursor: default;
}
