/* Container */
.custom-swatches { 
    display: flex !important; 
    gap: 12px !important; 
    margin: 15px 0 !important; 
    flex-wrap: wrap !important;
}

/* Bottone */
.swatch-btn { 
    width: 50px !important; 
    height: 50px !important; 
    border-radius: 50% !important; 
    border: 2px solid #ddd !important; 
    cursor: pointer !important; 
    background-size: cover !important; 
    background-position: center !important;
    position: relative !important;
    transition: all 0.2s ease !important;
}

/* Selezione */
.swatch-btn.active { 
    border-color: #000 !important; 
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000 !important; 
    transform: scale(1.05);
}

/* La Spunta (Check) */
.gmg-check-mark { 
    display: none; 
    position: absolute; 
    bottom: -4px; 
    right: -4px;
    width: 20px; 
    height: 20px; 
    background: #000;
    border-radius: 50%; 
    border: 2px solid #fff;
    z-index: 10;
}

.swatch-btn.active .gmg-check-mark {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.swatch-btn.active .gmg-check-mark::after {
    content: '✓'; 
    color: #fff; 
    font-size: 11px;
    font-weight: bold;
}

/* Container Galleria */
#gmg-gallery-container { 
    transition: opacity 0.3s; 
    min-height: 300px;
    width: 100%;
}

/* Forza visibilità miniature nello shortcode */
#gmg-gallery-container .flex-control-nav.flex-control-thumbs {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 15px !important;
    padding: 0 !important;
    list-style: none !important;
}

#gmg-gallery-container .flex-control-thumbs li {
    width: 80px !important;
    cursor: pointer;
}

#gmg-gallery-container .flex-control-thumbs li img {
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block !important;
}

#gmg-gallery-container .flex-control-thumbs li img.flex-active {
    border-color: #000;
}

.gmg-shadow-gallery { width: 100%; position: relative; }
.gmg-main-viewport { margin-bottom: 15px; border-radius: 12px; overflow: hidden; background: #fff; }
.gmg-main-img { width: 100%; display: block; height: auto; }
.gmg-thumbs-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.gmg-thumb-unit { width: 70px; height: 70px; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; transition: 0.2s; }
.gmg-thumb-unit.active { border-color: #7a52b3; } /* Colore viola come il tuo pulsante */
.gmg-thumb-unit img { width: 100%; height: 100%; object-fit: cover; }

/* Griglia degli swatch */
.gmg-swatches-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Card dello swatch */
.gmg-swatch-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    width: 140px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.gmg-swatch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* Stato attivo/selezionato */
.gmg-swatch-card.active {
    border-color: #7a52b3; /* Viola come il tuo tema */
}

/* Immagine del cerchione */
.gmg-swatch-image {
    width: 80px;
    height: 80px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 auto 10px;
}

/* Etichetta nome colore */
.gmg-swatch-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-transform: capitalize;
}

/* Checkmark sopra l'immagine */
.gmg-swatch-check {
    position: absolute;
    bottom: 45px;
    right: 20px;
    background: #e0e0e0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.gmg-swatch-card.active .gmg-swatch-check {
    display: flex;
    background: #7a52b3;
    color: white;
}