/* Hides the <select> if JS is enabled */
.custom-color-swatches + select,
.custom-size-swatches + select {
    display: none !important;
}

/* === COLOR SWATCHES === */
.custom-color-swatches {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.custom-color-swatches .swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ccc;
    cursor: pointer;
    transition: border 0.2s ease;
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.custom-color-swatches .swatch.active {
    border-color: #000;
}

/* === SIZE SWATCHES === */
.custom-size-swatches {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.custom-size-swatches .swatch {
    min-width: 48px;
    min-height: 48px;
    border: 1px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s ease, border 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    padding: 4px 10px;
    box-sizing: border-box;
    white-space: normal;
}

.custom-size-swatches .swatch.active {
    background-color: #111;
    border-color: #111;
    color: white;
}

.swatch-tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.swatch-tooltip-wrapper .swatch-tooltip {
    visibility: hidden;
    opacity: 0;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 6px 10px;
    position: absolute;
    z-index: 10;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    transition: opacity 0.2s ease;
}

.swatch-tooltip-wrapper:hover .swatch-tooltip {
    visibility: visible;
    opacity: 1;
}

.swatch.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

.variations .label {
    display: none;
}

.reset-swatches-button {
    margin-top: 1em;
    padding: 0.5em 1em;
    cursor: pointer;
    font-size: 14px;
    max-width: fit-content;
    background: transparent;
    border: 1px solid;
    transition: .3s;
    border-radius: 10px;
}

.reset-swatches-button:hover {
    background: black;
    color: white;
}

.selected-attributes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.selected-attributes > div > span {
    color: black;
}
.selected-attributes > div {
    color: #a2a2a2;
}

/* Hide duplicate selected-attributes divs - only show the first one */
.selected-attributes ~ .selected-attributes {
    display: none !important;
}

/* Hide selected-attributes if labels are disabled via admin option */
body:not(.show-selected-labels) .selected-attributes {
    display: none !important;
}

/* Hide color/size selects when swatches are present (handled by JavaScript, this is fallback) */
.variations td .custom-color-swatches ~ select[name^="attribute_"],
.variations td .custom-size-swatches ~ select[name^="attribute_"] {
    display: none !important;
}
.swatch-actions {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-top: 10px;
}

.variation-stock-status {
    font-weight: bold;
}