.tvws-swatches-field {
    margin: 8px 0 12px;
}

.tvws-swatches-field--hide-select select {
    display: none;
}

.tvws-swatches {
    margin: var(--tvws-swatch-margin, 6px 0 12px);
}

.tvws-swatches__label {
    display: block;
    margin: 0 0 6px;
    font-family: var(--tvws-swatch-label-font);
    font-size: 12px;
    font-weight: 600;
    color: var(--tvws-swatch-label-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.variations label.tvws-has-value::after {
    content: '' !important;
}

.variations label .tvws-selected-value::before {
    content: ': ';
}

.variations label .tvws-selected-value {
    font-weight: 600;
}

.tvws-swatches--highlight .tvws-swatches__label {
    color: var(--tvws-swatch-highlight-label);
}

.tvws-swatches__list {
    display: flex;
    /* flex-wrap: wrap; */
    flex-direction: row;
    gap: var(--tvws-swatch-gap);
    list-style: none;
    padding: 0;
    margin: 0;

}

.bundle_form .tvws-swatches__list,
.bundled_item .tvws-swatches__list {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    align-items: center;
}

.tvws-swatch {
    position: relative;
}

.tvws-swatch.is-hidden {
    display: none;
}

.tvws-swatches--has-more.is-expanded .tvws-swatch.is-hidden {
    display: block;
}

.tvws-swatch__button {
    position: relative;
    width: var(--tvws-swatch-width);
    height: var(--tvws-swatch-height);
    padding: 0;
    border: var(--tvws-swatch-border-width) var(--tvws-swatch-border-style) var(--tvws-swatch-border-color);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tvws-swatches--highlight .tvws-swatch__button {
    box-shadow: 0 0 0 2px var(--tvws-swatch-highlight-border), 0 0 12px var(--tvws-swatch-highlight-shadow);
}

.tvws-swatch__button:focus {
    outline: 2px solid rgba(17, 17, 17, 0.35);
    outline-offset: 2px;
}

.tvws-swatch.is-selected .tvws-swatch__button {
    border-color: var(--tvws-swatch-active-border-color);
    border-width: var(--tvws-swatch-active-border-width);
    border-style: var(--tvws-swatch-active-border-style);
}

.tvws-swatch__color {
    width: 100%;
    height: 100%;
    background: var(--tvws-swatch-color, #cccccc);
}

.tvws-swatch--dual .tvws-swatch__color {
    background: linear-gradient(135deg, var(--tvws-swatch-color, #cccccc) 50%, var(--tvws-swatch-color-secondary, #999999) 50%);
}

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

.tvws-swatch--color .tvws-swatch__button,
.tvws-swatch--dual .tvws-swatch__button,
.tvws-swatch--image .tvws-swatch__button {
    padding: var(--tvws-swatch-color-inset, 0);
}

.tvws-swatch--button .tvws-swatch__button,
.tvws-swatch--label .tvws-swatch__button,
.tvws-swatch--radio .tvws-swatch__button {
    width: auto;
    min-width: var(--tvws-swatch-width);
    padding: var(--tvws-swatch-label-padding, 6px 10px);
    background: var(--tvws-swatch-label-bg);
}

.tvws-swatch__text {
    font-family: var(--tvws-swatch-label-font);
    font-weight: var(--tvws-swatch-label-weight);
    font-size: var(--tvws-swatch-label-size);
    line-height: var(--tvws-swatch-label-line);
    color: var(--tvws-swatch-label-color);
}

.tvws-swatch.is-selected .tvws-swatch__text {
    color: var(--tvws-swatch-label-text-active);
}

.tvws-swatch.is-selected .tvws-swatch__button {
    background: var(--tvws-swatch-label-bg-active);
}

.tvws-swatches--shape-round .tvws-swatch__button {
    border-radius: 999px;
}

.tvws-swatches--shape-rounded .tvws-swatch__button {
    border-radius: 8px;
}

.tvws-swatches--shape-square .tvws-swatch__button {
    border-radius: 0;
}

.tvws-swatch.is-out-of-stock {
    opacity: var(--tvws-swatch-oos-opacity);
}

.tvws-swatch--oos-blur {
    filter: blur(1px);
}

.tvws-swatch--oos-cross::after {
    content: '';
    position: absolute;
    left: 4px;
    right: 4px;
    top: 50%;
    height: 2px;
    background: var(--tvws-swatch-oos-cross);
    transform: rotate(-20deg);
    pointer-events: none;
}

.tvws-swatch--oos-x::before,
.tvws-swatch--oos-x::after,
.tvws-swatch--oos-strike::after {
    content: '';
    position: absolute;
    left: 4px;
    right: 4px;
    top: 50%;
    height: 2px;
    background: var(--tvws-swatch-oos-cross);
    pointer-events: none;
}

.tvws-swatch--oos-x::before {
    transform: translateY(-50%) rotate(45deg);
}

.tvws-swatch--oos-x::after {
    transform: translateY(-50%) rotate(-45deg);
}

.tvws-swatch--oos-strike::after {
    transform: translateY(-50%);
}

.tvws-swatch__tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--tvws-swatch-tooltip-bg);
    color: var(--tvws-swatch-tooltip-color);
    padding: 6px 8px;
    border-radius: var(--tvws-swatch-tooltip-radius);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.tvws-swatch__tooltip-image {
    display: block;
    width: 60px;
    height: 60px;
    background-size: cover;
    background-position: center;
    margin-bottom: 4px;
    border-radius: 4px;
}

.tvws-swatch:hover .tvws-swatch__tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tvws-swatch__stock {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #111111;
    color: #ffffff;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 10px;
    line-height: 1;
}

.tvws-swatches__more {
    margin-top: 6px;
    background: none;
    border: none;
    color: #111111;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
}

.tvws-layered-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    border: 1px solid #cccccc;
}

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

.tvws-layered-swatch .tvws-swatch__color {
    width: 100%;
    height: 100%;
    background: var(--tvws-swatch-color, #cccccc);
}

.tvws-layered-swatch--dual .tvws-swatch__color {
    background: linear-gradient(135deg, var(--tvws-swatch-color, #cccccc) 50%, var(--tvws-swatch-color-secondary, #999999) 50%);
}

.tvws-layered-label {
    margin-right: 4px;
}

.tvws-woodmart-replace .wd-swatches-product {
    display: none;
}
