/* ========================================
   PRODUCT ATTRIBUTES - Color & Size
======================================== */

/* Color Attribute */
.field--name-attribute-color,
.commerce-product-variation-attributes .field--name-attribute-color,
div[class*="attribute-color"],
.form-item-attributes-attribute-color {
    margin: var(--spacing-lg) 0;
    margin: 20px 0;
}

/* Color Label */
.field--name-attribute-color>label,
.field--name-attribute-color .fieldset-legend,
div[class*="attribute-color"]>label,
label[for*="color"],
label[for*="Color"],
.form-item-purchased-entity-0-attributes-attribute-color>label {
    font-size: 12px;
    font-weight: 600;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: block;
}

/* Color Swatches Container */
.field--name-attribute-color .form-radios,
div[class*="attribute-color"] .form-radios,
.form-item-purchased-entity-0-attributes-attribute-color .form-radios {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Hide Radio Buttons */
.field--name-attribute-color input[type="radio"],
div[class*="attribute-color"] input[type="radio"],
input[name*="color"][type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Color Swatch Circles */
.field--name-attribute-color .form-type-radio label,
div[class*="attribute-color"] .form-type-radio label,
input[name*="color"][type="radio"]+label {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition-base);
    display: block;
    margin: 0;
    text-indent: -9999px;
    overflow: hidden;
}

/* Color Values */
input[value="2"]+label,
input[value="blue"]+label,
input[id*="blue"]+label,
label[for*="blue"] {
    background-color: #4A90E2;
}

input[value="3"]+label,
input[value="white"]+label,
input[id*="white"]+label,
label[for*="white"] {
    background-color: #FFFFFF;
    border: 2px solid #333;
}

/* Selected Color Swatch */
.field--name-attribute-color input[type="radio"]:checked+label,
input[name*="color"][type="radio"]:checked+label {
    border-color: var(--color-black);
    box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-black);
    transform: scale(1.1);
}

/* Color Swatch Hover */
.field--name-attribute-color .form-type-radio label:hover,
input[name*="color"][type="radio"]+label:hover {
    transform: scale(1.05);
}

/* Size Attribute */
.field--name-attribute-size,
.commerce-product-variation-attributes .field--name-attribute-size,
div[class*="attribute-size"],
.form-item-attributes-attribute-size {
    margin: var(--spacing-lg) 0;
}

/* Size Label */
.field--name-attribute-size>label,
.field--name-attribute-size .fieldset-legend,
div[class*="attribute-size"]>label,
label[for*="size"],
label[for*="Size"] {
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
    display: block;
}

/* Size Buttons Container */
.field--name-attribute-size .form-radios,
div[class*="attribute-size"] .form-radios {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* Hide Radio Buttons */
.field--name-attribute-size input[type="radio"],
div[class*="attribute-size"] input[type="radio"],
input[name*="size"][type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}