/* ============================================
   GG Color Swatches
   ============================================ */

.gg-color-swatches {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 15px;
}

.gg-swatch {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gg-swatch:hover {
    border-color: #00A1E1;
}

.gg-swatch.active {
    border-color: #00A1E1;
    box-shadow: 0 0 0 2px rgba(0, 161, 225, 0.3);
}

.gg-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Text fallback swatch */
.gg-swatch-text {
    background: #f5f5f5;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

/* Color variation wrapper */
.variations {
    background: #F3F3F3;
    border-radius: 10px;
    padding: 12px;
}

/* Color variation label */
.variations th.label {
    font-size: 18px !important;
    font-weight: 200 !important;
    text-align: center !important;
}

/* Hide the original select when swatches are present */
.gg-hidden-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

/* Variation form row adjustments */
.variations td.value .gg-color-swatches {
    margin-top: 5px;
}

/* ============================================
   Vertical Thumbnail Carousel
   Max 3 visible, up/down buttons side-by-side below.
   ============================================ */
.flex-control-thumbs.gg-thumb-active {
    overflow: hidden !important;
}

.flex-control-thumbs.gg-thumb-active li {
    transition: transform 0.3s ease;
}

.gg-thumb-nav-bar {
    position: absolute;
    left: 0;
    width: 139px;
    display: flex;
    gap: 4px;
    z-index: 5;
    padding-top: 6px;
}

.gg-thumb-nav-bar button {
    flex: 1;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f3f3;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    color: #888;
    font-size: 12px;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

.gg-thumb-nav-bar button:hover {
    background: var(--gg-primary, #00A1E1);
    color: #fff;
    border-color: var(--gg-primary, #00A1E1);
}

.gg-thumb-nav-bar button.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .gg-swatch {
        width: 60px;
        height: 60px;
    }

    .gg-color-swatches {
        gap: 6px;
    }
}
