/* Hide original dropdowns but keep functional */
.variations select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Swatch container */
.variswatch-wrapper {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 5px;
}

/* Base swatch style */
.variswatch-swatch {
    width: var(--vs-size, 32px);
    height: var(--vs-size, 32px);
    border: var(--vs-border, 1px) solid var(--vs-border-color, #ccc);
    border-radius: var(--vs-shape, 4px);
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
    position: relative;
    font-size: var(--vs-font-size, 14px);
    margin: var(--vs-spacing, 4px);
}

.variswatch-swatch.variswatch-image {
    position: relative;
    width: var(--vs-size, 40px);
    height: var(--vs-size, 40px);
    border: var(--vs-border, 1px) solid var(--vs-border-color, #ccc);
    border-radius: var(--vs-shape, 4px);
    overflow: hidden;
    background-color: #fff;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.variswatch-swatch.variswatch-image img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Selected state */
.variswatch-swatch.selected {
    border-color: var(--vs-border-selected, #333);
    box-shadow: 0 0 0 2px #ddd;
    transform: scale(1.1);
}

/* Out of stock state */
.variswatch-swatch.out-of-stock {
    opacity: 0.4;
    pointer-events: none;
    position: relative;
}

.variswatch-swatch.out-of-stock::after {
    content: "×";
    color: red;
    font-size: 18px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Tooltip */
.vs-tooltip {
    position: absolute;
    background-color: var(--vs-tooltip-bg, #333);
    color: var(--vs-tooltip-color, #fff);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: var(--vs-tooltip-font-size, 12px);
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
}

.vs-outofstock-blur {
    filter: blur(2px);
    opacity: 0.6;
    pointer-events: none;
}

.vs-outofstock-cross::after {
    content: "×";
    color: red;
    font-size: 18px;
    position: absolute;
    top: 0;
    right: 0;
    font-weight: bold;
}

.vs-outofstock-hide {
    display: none !important;
}

/* Responsive swatches on small screens */
@media (max-width: 768px) {
    .variswatch-wrapper {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .variswatch-swatch {
        flex: 1 0 25%;
    }
}

/* Swatches in archive/shop loop */
.variswatch-archive-swatch {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: var(--vs-spacing, 4px);
} 
