/* ============================================================
   Sheen Variation Swatches – v1.3
   ============================================================ */

:root {
    --sheen-swatch-size: 34px;
    --sheen-swatch-gap: 8px;
    --sheen-swatch-ring-color: #333;
    --sheen-swatch-oos-opacity: 0.42;
    --sheen-tooltip-bg: rgba(25, 25, 25, 0.88);
    --sheen-loop-size: 20px;
}

/* ── Single product wrapper ─────────────────────────────────── */
.sheen-swatches-wrap {
    margin-bottom: 12px;
}

/* ── Horizontal swatch row ─────────────────────────────────── */
.sheen-swatches-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sheen-swatch-gap);
    align-items: center;
    padding: 4px 0;
}

/* ── Each button ───────────────────────────────────────────── */
.sheen-swatch {
    position: relative;
    width: var(--sheen-swatch-size);
    height: var(--sheen-swatch-size);
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: transparent;
    outline: none;
    transition: border-color .18s, transform .15s, box-shadow .18s;
    flex-shrink: 0;
}

/* Inner filled circle */
.sheen-swatch-inner {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,.12);
    transition: transform .15s;
}

/* Text-only (no colour set) */
.sheen-swatch-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    font-size: 9px;
    line-height: 1.2;
    background: #f4f4f4;
    border: 1px solid #ddd;
    color: #555;
    padding: 2px;
    text-align: center;
    word-break: break-word;
    overflow: hidden;
}

/* Hover */
.sheen-swatch:hover:not(:disabled) {
    transform: scale(1.13);
    box-shadow: 0 2px 10px rgba(0,0,0,.18);
    border-color: var(--sheen-swatch-ring-color);
    z-index: 2;
}

/* Selected */
.sheen-swatch.is-selected {
    border-color: var(--sheen-swatch-ring-color);
    box-shadow:
        0 0 0 2px #fff,
        0 0 0 4px var(--sheen-swatch-ring-color);
}

/* Out-of-stock */
.sheen-swatch.is-unavailable {
    cursor: not-allowed;
    opacity: var(--sheen-swatch-oos-opacity);
}
.sheen-swatch.is-unavailable .sheen-swatch-inner {
    filter: saturate(.3);
}

/* ✕ mark */
.sheen-swatch-x {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 4px rgba(0,0,0,.55);
    border-radius: 50%;
    pointer-events: none;
    line-height: 1;
}

/* ── Tooltip ───────────────────────────────────────────────── */
.sheen-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--sheen-tooltip-bg);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .17s, transform .17s;
    z-index: 100;
    font-family: inherit;
}
.sheen-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--sheen-tooltip-bg);
}
.sheen-swatch:hover .sheen-tooltip,
.sheen-swatch:focus-visible .sheen-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Shop loop mini dots ───────────────────────────────────── */
.sheen-loop-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 5px 0 3px;
    align-items: center;
}
.sheen-loop-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sheen-loop-size);
    height: var(--sheen-loop-size);
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.14);
    position: relative;
    transition: transform .14s;
    flex-shrink: 0;
}
.sheen-loop-swatch:hover {
    transform: scale(1.25);
    z-index: 1;
}
.sheen-loop-swatch.is-unavailable {
    opacity: .42;
    filter: saturate(.3);
}
.sheen-loop-swatch .sheen-swatch-x {
    font-size: 10px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0,0,0,.6);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
    :root {
        --sheen-swatch-size: 28px;
        --sheen-loop-size: 16px;
    }
    .sheen-swatches-list { gap: 6px; }
}
