/* Woo Color Swatches — frontend.css */

.wcs-swatches-wrap {
    margin-bottom: 1em;
}

.wcs-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

/* Círculo base */
.wcs-swatch {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    outline: 2px solid #d0d0d0;
    cursor: pointer;
    transition: outline-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
    position: relative;
    box-sizing: border-box;
}

.wcs-swatch:hover {
    transform: scale(1.12);
    outline-color: #888;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* Swatch seleccionado */
.wcs-swatch.wcs-selected {
    outline-color: #111;
    outline-width: 2px;
    box-shadow: 0 0 0 3px #fff inset, 0 2px 8px rgba(0,0,0,0.22);
    transform: scale(1.08);
}

/* Estado deshabilitado (variación agotada) */
.wcs-swatch.wcs-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.wcs-swatch.wcs-disabled::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 2px;
    height: 90%;
    background: rgba(0,0,0,0.4);
    border-radius: 2px;
}

/* Focus accesibilidad teclado */
.wcs-swatch:focus-visible {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* Tooltip nombre del color */
.wcs-swatch::before {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 99;
}
.wcs-swatch:hover::before,
.wcs-swatch:focus-visible::before {
    opacity: 1;
}
