/* ======================
   AKBC 颜色选择器容器 
   ====================== */
.akbc-color-picker {
    margin-bottom: 15px;
    max-width: 100%;
    box-sizing: border-box;
}

/* 头部样式 */
.akbc-color-header {
    margin-bottom: 15px;
    text-align: left;
    display:flex;
    justify-content: space-between;
}

.akbc-color-title {
    font-weight: 400;
    color: var(--em-color__dark);
    margin: 0;
    padding: 0;
    text-transform: uppercase;
    font-size: 1rem;
    line-height: 1.25rem;
}

.akbc-selected-color {
    text-transform: capitalize;
    color: var(--em-color__base);
    font-size: 15px;
}

.akbc-color-link {
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: .875rem;
    cursor: pointer;
    line-height: 1.25rem;
    font-weight: 400;
    color: var(--em-color__dark);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.akbc-color-link:hover {
    color: var(--em-color__base);
}

/* 颜色网格布局 - 精确匹配图片 */
.akbc-color-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap:15px 10px;
    margin: 0 auto;
}

/* 颜色块样式 */
.akbc-color-swatch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width:32px;
    height:32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
    /*border: 1px solid #fff;*/
}

.akbc-color-swatch span{
    width: 32px;
    height: 32px;
    display: block;
    border-radius: 50%;
}

.akbc-color-swatch .bg{
    width: 32px;
    height: 32px;
    position: absolute;
    background-size: cover;
    background-position: 50%;
}

/* 色块内颜色 */
.akbc-color-block {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: transform 0.25s ease;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* 图片类型色块 */
.akbc-color-block[style*="background-image"] {
    background-size: cover;
    background-position: center;
    border: 1px solid #f0f0f0;
}

/* 选中状态样式 - 精确匹配图片效果 */
.akbc-color-swatch.akbc-active .bg{
    border: 1px solid #80583f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
    width: 34px;
    height: 34px;
}

.akbc-color-swatch.akbc-active .akbc-color-block{
    width: 26px;
    height: 26px;
}


/* ======================
   闪购标识样式 - 商品详情页
   ====================== */
.akbc-flash-icon {
    width: 16px;
    height: 16px;
    fill: #fff;
    position:absolute;
}


/* 悬停效果 */
/*.akbc-color-swatch:hover {
    border-color:#80583f;
}*/


/* =================================================
   悬浮提示 - 使用 ::before 伪元素
   ================================================= */
.akbc-color-swatch::before {
    content: attr(data-color-name);
    text-indent: initial;
    position: absolute;
    bottom:100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #80583f;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    margin: -10px 0 0 0;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    transform: translate(-50%, -10px);
    z-index: 10;
}

/* 单独设置内容 */
.akbc-color-swatch:hover::before {
    opacity: 1;
}

/* 悬浮提示箭头 */
.akbc-color-swatch::after {
    content: "";
    position: absolute;
    bottom: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #80583f transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 10;
}

.akbc-color-swatch:hover::after {
    opacity: 1;
}
/* =================================================
   响应式设计
   ================================================= */

/*@media (max-width: 768px) {
    .akbc-color-picker {
        padding: 25px;
    }
    .akbc-color-title {
        font-size: 18px;
    }
    .akbc-color-grid {
        gap: 8px;
    }
    .akbc-color-swatch {
        width: 32px;
        height: 32px;
    }
    .akbc-color-block {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .akbc-color-picker {
        padding: 20px;
    }
    .akbc-color-grid {
        gap: 6px;
    }
    .akbc-color-swatch {
        width: 28px;
        height: 28px;
    }
    .akbc-color-block {
        width: 24px;
        height: 24px;
    }
    .akbc-color-title {
        font-size: 17px;
    }
}*/

/* ======================
   商品卡片色块样式 - 精确匹配图片设计
   ====================== */
.akbc-product-card-colors {
    margin-top: 8px;
    text-align: center;
}

.akbc-colors-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

/* 颜色块样式 */
.akbc-card-color-swatch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #f9f9f9;
    border: 1px solid #eee;
}

/* 色块内颜色 */
.akbc-card-color-block {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: transform 0.25s ease;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* 图片类型色块 */
.akbc-card-color-block[style*="background-image"] {
    background-size: cover;
    background-position: center;
    border: 1px solid #f0f0f0;
}

/* 选中状态样式 - 精确匹配图片效果 */
.akbc-card-color-swatch.akbc-card-swatch-active, .akbc-card-color-swatch:hover {
    border: 1px solid #80583f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.akbc-card-color-swatch.akbc-card-swatch-active .akbc-card-color-block, .akbc-card-color-swatch:hover .akbc-card-color-block {
    width: 12px;
    height: 12px;
}


/* 剩余颜色计数 */
.akbc-remaining-count {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-left: 7px;
    line-height: 1;
}


/* ======================
   相同颜色产品样式
   ====================== */

.akbc-same-color-products {
    margin-top: 50px;
}

.akbc-section-title {
    font-size:1.5rem;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .1px;
    margin:0!important;
}

.akbc-products-grid.products {
    width:100%;
    padding:15px;
}

/* 桌面端隐藏移动端商品 */
.mobile-only,
.tablet-only {
    display: none;
}

