/* 外层容器 */
.card-swatch-coll-variant-image-content {
    margin-top: 20px;
    font-weight: 400;
}

.variant-list-box {
    width: 100%;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.variant-list {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.variant-item {
    position: relative; /* tooltip 参考定位 */
    flex-shrink: 0;
    border: 1px solid var(--product-swatch-border, #cbcbcb);
    width: 30px;
    height: 30px;
    padding: 2px;
    background-color: rgba(255, 255, 255, 0);
    border-radius: 50%;
    margin: 0 5px 5px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border 0.2s ease;
}
.variant-item img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.variant-item img.label-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
}

/* active 状态 */
.variant-item.active {
    border: 1px solid var(--product-swatch-border-active, #232323);
}

/* 更多按钮样式 */
.variant-item.more-number {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    min-width: 30px;
    font-size: 12px;
    width: auto;
    color: var(--color_text, #969696);
    margin-right: 0;
}

/* tooltip 样式 */
.variant-item .tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 120%; /* 在上方显示 */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    transition: opacity 0.2s ease-in-out;
    z-index: 9999;
    pointer-events: none; /* 不阻挡鼠标 */
}

/* tooltip 下箭头 */
.variant-item .tooltip::after {
    content: '';
    position: absolute;
    top: 100%; /* tooltip 底部 */
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0,0,0,0.8) transparent transparent transparent;
}

/* hover 显示 tooltip */
.variant-item:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* 响应式尺寸 */
@media (max-width: 1440px) {
    .variant-item {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 769px) {
    .variant-item {
        width: 20px;
        height: 20px;
    }
}