.ccv-variants {
    width: 100%;
    margin: 8px 0;
    box-sizing: border-box;
}
.ccv-variants-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: var(--ccv-gap, 10px);
    row-gap: var(--ccv-row-gap, 10px);
    width: 100%;
}
.ccv-align-center .ccv-variants-list { justify-content: center; }
.ccv-align-right .ccv-variants-list { justify-content: flex-end; }
.ccv-swatch {
    position: relative;
    display: inline-flex;
    flex: 0 0 var(--ccv-width, 56px);
    width: var(--ccv-width, 56px);
    height: var(--ccv-height, 56px);
    box-sizing: border-box;
    overflow: visible;
    border: var(--ccv-border, 1px) solid var(--ccv-border-color, #9aa3ad);
    border-radius: var(--ccv-radius, 8px);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    background-color: #fff;
    text-decoration: none !important;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ccv-swatch-inner {
    display: block;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}
.ccv-unavailable {
    cursor: default;
}
.ccv-unavailable .ccv-swatch-inner {
    opacity: .48;
    filter: none;
}
.ccv-swatch.ccv-unavailable {
    border-color: transparent;
    box-shadow: none !important;
}
.ccv-shadow .ccv-swatch.ccv-unavailable {
    border-color: transparent;
    box-shadow: none !important;
}
.ccv-out-label {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-block;
    max-width: calc(100% - 8px);
    padding: 2px 4px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, .5);
    color: #111;
    border: 1px solid #111;
    border-radius: 4px;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .22);
    font-family: inherit;
    font-size: clamp(8px, calc(var(--ccv-width, 56px) * .15), 18px);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}
.ccv-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 4px;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}


/* Discreet stock badge: fixed dimensions avoid theme-dependent scaling. */
.ccv-stock-badge {
    position: absolute;
    z-index: 5;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--ccv-badge-gap, 0.5px);
    padding: var(--ccv-badge-padding, 2px);
    /* Slightly inset to account for the rounded thumbnail corner. */
    transform: translate(40%, -40%);
    border: 0;
    border-radius: 50%;
    background: #000;
    color: #fff;
    text-align: center;
    line-height: 1;
    box-shadow: none;
    pointer-events: none;
    font-family: inherit;
}
.ccv-stock-number {
    display: block;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.ccv-stock-unit {
    display: block;
    font-weight: 600;
    line-height: 1;
}
