span.alg_wc_pif_range_min, span.alg_wc_pif_range_max { font-size: small; }
span.alg_wc_pif_range_bubble {
    visibility: hidden;
    background-color: #cd2653;
    color: #fff;
    border-radius: 20px;
    padding: 4px;
    position: absolute;
    right: 15px;
    bottom: 7px;
    z-index: 9999;
}
.alg-pif-swatches { display: block; }

.alg-pif-swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    margin: 4px 0 8px;
}

.alg-pif-swatch {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
    line-height: 1.2;
}

/* Keep the radio accessible/focusable but let the swatch be the visible control. */
.alg-pif-swatch-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

/* --- Colour chip --- */
.alg-pif-swatch-chip {
    display: inline-block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    transition: box-shadow 0.12s ease-in-out;
}
.alg-pif-color-swatches .alg-pif-swatch:hover .alg-pif-swatch-chip {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(34, 113, 177, 0.4);
}
.alg-pif-color-swatches .alg-pif-swatch-input:checked + .alg-pif-swatch-chip {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
}
.alg-pif-color-swatches .alg-pif-swatch-input:focus-visible + .alg-pif-swatch-chip {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
    outline: 2px solid transparent;
}

/* --- Image tile --- */
.alg-pif-swatch-image {
    display: inline-flex;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 2px solid transparent;
    overflow: hidden;
    box-sizing: border-box;
    background: #f6f7f7;
    transition: border-color 0.12s ease-in-out, box-shadow 0.12s ease-in-out;
}
.alg-pif-swatch-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
}
.alg-pif-image-swatches .alg-pif-swatch:hover .alg-pif-swatch-image {
    border-color: rgba(34, 113, 177, 0.5);
}
.alg-pif-image-swatches .alg-pif-swatch-input:checked + .alg-pif-swatch-image {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Per-tile option name (image swatches) */
.alg-pif-swatch-name {
    max-width: 84px;
    font-size: 13px;
    color: #1e1e1e;
    text-align: center;
}
.alg-pif-image-swatches .alg-pif-swatch-input:checked ~ .alg-pif-swatch-name {
    font-weight: 600;
    color: #2271b1;
}

/* Selected-option line shown beneath the swatches */
.alg-pif-swatch-selected {
    margin-top: 2px;
    font-size: 14px;
    color: #50575e;
}
.alg-pif-swatch-selected-value {
    font-weight: 600;
    color: #1e1e1e;
}
