/* Main Container */
.wc-attribute-group {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    background: #f9f9f9;
}

/* Attribute Group */
.wc-attribute-group {
    margin-bottom: 25px;
}

.wc-attribute-group:last-child {
    margin-bottom: 0;
}

.wc-attribute-group label {
    display: block;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

/* Swatches Grid */
.wc-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Individual Swatch Button */
.wc-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.wc-swatch:hover {
    border-color: #aaa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.wc-swatch.selected {
    border-color: var(--theme-button-background-initial-color);
    background: var(--theme-button-background-initial-color);
}

/* Swatch Image */
.wc-swatch-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 4px;
    background: #f5f5f5;
    padding: 5px;
}

/* Swatch Label */
.wc-swatch-label {
    font-size: 14px;
    font-weight: 600;
    color: inherit;
}

.wc-swatch.selected .wc-swatch-label {
    color: #fff;
}

/* Hide default dropdowns */
.variations select {
    display: none !important;
}



/* Add to your existing CSS */
.custom-size-switcher button.active {
    border-color: #000;
    background-color: #f5f5f5;
    font-weight: bold;
}

.custom-size-switcher button.loading {
    opacity: 0.7;
    position: relative;
}

.custom-size-switcher button.loading:after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 5px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Swatch Image */
.wc-swatch-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 4px;
    background: #f5f5f5;
    padding: 5px;
    display: none;
}

/* Adjust swatch padding when image is present */
.wc-swatch.has-image {
    padding: 15px;
    min-width: 80px;
}


