/* AI-MALL V1.9.25 R1 — 商品规格选择器样式（PC + H5 共用） */

.spec-dim {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    line-height: 1.6;
}

.spec-dim-name {
    flex-shrink: 0;
    min-width: 56px;
    color: #6B7280;
    font-size: 13px;
    padding-top: 6px;
}

.spec-dim-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.spec-opt {
    appearance: none;
    background: #fff;
    border: 1px solid #D1D5DB;
    color: #374151;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
    position: relative;
}

.spec-opt:hover:not(.is-disabled) {
    border-color: #6366F1;
    color: #4338CA;
}

.spec-opt.is-active {
    border-color: #6366F1;
    background: #6366F1;
    color: #fff;
    font-weight: 500;
}

.spec-opt.is-active::after {
    content: '';
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-right-color: #4338CA;
    border-bottom-color: #4338CA;
    border-radius: 0 0 4px 0;
}

.spec-opt.is-disabled {
    background: #F9FAFB;
    border-color: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.6;
}

/* 颜色色块：在文本左侧加圆形色块（按文本字面取色，仅用于视觉提示） */
.spec-opt.is-color {
    padding-left: 28px;
}

.spec-opt.is-color::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* H5 端响应式 */
@media (max-width: 768px) {
    .spec-dim {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 16px;
    }
    .spec-dim-name {
        min-width: 0;
        padding-top: 0;
        font-size: 14px;
        font-weight: 500;
        color: #111827;
    }
    .spec-opt {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* H5 底部弹窗模式（详情页加购按钮触发） */
.spec-sheet-mask {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
}

.spec-sheet-mask.is-open { display: block; }

.spec-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
    z-index: 1051;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.spec-sheet.is-open {
    transform: translateY(0);
}

.spec-sheet-header {
    padding: 14px 16px;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.spec-sheet-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.spec-sheet-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.spec-sheet-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.spec-sheet-footer {
    padding: 12px 16px;
    border-top: 1px solid #F3F4F6;
    display: flex;
    gap: 10px;
}

.spec-sheet-info {
    flex: 1;
    font-size: 13px;
    color: #6B7280;
    line-height: 1.5;
}

.spec-sheet-info .price {
    color: #DC2626;
    font-size: 16px;
    font-weight: 700;
}

.spec-sheet-confirm {
    padding: 10px 24px;
    background: #6366F1;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.spec-sheet-confirm:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
}
