table.variations td {
    padding: 5px 0;
    vertical-align: top !important;
}

/* Consolidated: covers both table.variations td and .variations contexts */
table.variations td .swatch-control,
.variations .swatch-control {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 5px;
    position: relative;
}

table.variations td .swatch-label,
.variations .swatch-control .swatch-label {
    display: none;
}

table.variations td.value > .swatch-control .swatch-picker > select {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
}

table.variations td.value {
    position: relative;
}

.select-option.swatch-wrapper {
    display: inline-block;
    margin: 0 3px 3px 0;
    position: relative;
    border: 2px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.select-option.swatch-wrapper:hover {
    border-color: #ee7f4b;
    transform: scale(1.1);
}

.select-option.swatch-wrapper.selected {
    border-color: #ee7f4b;
    box-shadow: 0 0 0 2px rgba(238, 127, 75, 0.3);
}

.select-option.swatch-wrapper.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.select-option.swatch-wrapper.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(180, 0, 0, 0.65);
    transform: rotate(-45deg);
    z-index: 2;
    pointer-events: none;
}

.select-option.swatch-wrapper.disabled::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(180, 0, 0, 0.65);
    transform: rotate(45deg);
    z-index: 2;
    pointer-events: none;
}

.select-option.swatch-wrapper .swatch-anchor {
    display: block;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.select-option.swatch-wrapper:hover .swatch-anchor {
    border-color: #ee7f4b;
}

.swatch-anchor {
    display: block;
    width: 32px;
    height: 32px;
}

.swatch-anchor img,
.swatch-anchor .swatch-color {
    display: block;
    width: 32px;
    height: 32px;
}

.swatch-photo,
.swatch-img {
    margin: 0;
    padding: 0;
}

.swatch-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.mvp-attribute-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.swatch-selected-label {
    font-size: 13px;
    color: #666;
    font-style: italic;
    display: none;
}

.swatch-selected-label.visible {
    display: inline !important;
}

.reset_variations {
    display: inline-block;
    font-size: 12px;
    margin-top: 8px;
    color: #666;
    text-decoration: none;
}

.reset_variations:hover {
    color: #ee7f4b;
}
