/* ========================================
   Press - 水晶烟具 SKU 配置器 样式
   ======================================== */

/* ---- 整体三栏 ---- */
.configurator-layout {
    display: grid;
    grid-template-columns: 300px 1fr 280px;
    gap: 0;
    min-height: calc(100vh - var(--header-height) - 100px);
    background: #f5f5f5;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    overflow: hidden;
}

@media (max-width: 1100px) {
    .configurator-layout {
        grid-template-columns: 260px 1fr 250px;
    }
}
@media (max-width: 900px) {
    .configurator-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
}


/* ==========================================
   左侧：配置选项栏
   ========================================== */
.cfg-sidebar {
    background: #fff;
    padding: 24px 18px 32px;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-height));
    -webkit-overflow-scrolling: touch;
}

.cfg-section {
    margin-bottom: 22px;
}

.cfg-section:last-child { margin-bottom: 0; }

.cfg-label {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    letter-spacing: .02em;
}

.cfg-hint {
    font-size: 11.5px;
    color: #94a3b8;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* 配置按钮组 */
.cfg-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cfg-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 7px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 9999px; /* 胶囊形 */
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
    text-align: center;
    white-space: nowrap;
}
.cfg-btn:hover {
    border-color: #d97706;
    color: #d97706;
    background: #fffbeb;
}
.cfg-btn.active {
    border-color: #d97706;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(217,119,6,.15);
}

/* ==========================================
   颜色管理UI
   ========================================== */
.color-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.color-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 4px 22px;
    border-radius: 99px;
    position: relative;
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.color-tag::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: inherit;
    border: 1.5px solid rgba(255,255,255,.5);
}
.color-tag-label {
    white-space: nowrap;
}
.color-tag-price {
    font-size: 10px;
    opacity: 0.9;
    background: rgba(255,255,255,.2);
    padding: 1px 5px;
    border-radius: 99px;
}
.color-tag-del {
    width: 18px; height: 18px;
    background: rgba(255,255,255,.2);
    border: 1.5px solid rgba(255,255,255,.5);
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    opacity: 0;
    transform: scale(0.7);
    transition: all .18s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.color-tag:hover .color-tag-del {
    opacity: 1;
    transform: scale(1);
}
.color-tag-del:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #fff;
}
.color-add-btn-inline {
    margin-left: 6px;
    padding: 1px 6px;
    border: 1.5px dashed rgba(217,119,6,.4);
    border-radius: 99px;
    background: rgba(255,251,235,.5);
    color: #d97706;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}
.color-add-btn-inline:hover {
    background: #fffbeb;
    border-color: #d97706;
}
.color-add-form {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    padding: 8px 10px;
    background: #fffbeb;
    border: 1.5px solid #fbbf24;
    border-radius: 12px;
    align-items: center;
}
.color-add-picker {
    width: 28px; height: 28px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}
.color-add-name {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    transition: border-color .18s;
}
.color-add-name:focus { border-color: #d97706; }
.color-add-price {
    width: 60px;
    padding: 5px 6px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    outline: none;
    transition: border-color .18s;
    -moz-appearance: textfield;
}
.color-add-price::-webkit-inner-spin-button,
.color-add-price::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.color-add-price:focus { border-color: #d97706; }
.color-add-confirm,
.color-add-cancel {
    width: 28px; height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}
.color-add-confirm {
    background: #16a34a;
    color: #fff;
}
.color-add-confirm:hover { background: #15803d; }
.color-add-cancel {
    background: #f1f5f9;
    color: #94a3b8;
}
.color-add-cancel:hover { background: #e2e8f0; color: #64748b; }

/* ==========================================
   品类项（款式/底座材质/加工方式）增删UI
   ========================================== */
.cat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cat-item-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.cat-item-wrap .cfg-btn {
    width: 100%;
}
/* 删除徽章 */
.cat-item-del {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px; height: 18px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    opacity: 0;
    transform: scale(0.7);
    transition: all .18s;
    z-index: 2;
}
.cat-item-wrap:hover .cat-item-del {
    opacity: 1;
    transform: scale(1);
}
.cat-item-del:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}
/* 添加按钮 */
.cat-add-btn {
    width: 100%;
    margin-top: 6px;
    padding: 5px;
    border: 1.5px dashed #d1d5db;
    border-radius: 10px;
    background: #fafbfc;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.cat-add-btn:hover {
    border-color: #d97706;
    color: #d97706;
    background: #fffbeb;
}
/* 内联添加表单 */
.cat-add-form {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    padding: 6px 8px;
    background: #fffbeb;
    border: 1.5px solid #fbbf24;
    border-radius: 10px;
    align-items: center;
}
.cat-add-form.inline {
    margin-top: 0;
    margin-bottom: 12px;
    padding: 10px 12px;
    flex-wrap: wrap;
}
.cat-add-name {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    transition: border-color .18s;
}
.cat-add-name:focus { border-color: #d97706; }
.cat-add-price {
    width: 60px;
    padding: 5px 6px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    outline: none;
    transition: border-color .18s;
    -moz-appearance: textfield;
}
.cat-add-price::-webkit-inner-spin-button,
.cat-add-price::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cat-add-price:focus { border-color: #d97706; }
.cat-add-confirm,
.cat-add-cancel {
    width: 28px; height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}
.cat-add-confirm {
    background: #16a34a;
    color: #fff;
}
.cat-add-confirm:hover { background: #15803d; }
.cat-add-cancel {
    background: #f1f5f9;
    color: #94a3b8;
}
.cat-add-cancel:hover { background: #e2e8f0; color: #64748b; }

/* 颜色选择 */
.layer-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}
.layer-color-row:last-child { border-bottom: none; }
.layer-num {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    min-width: 38px;
    flex-shrink: 0;
}
.layer-color-row.hidden {
    display: none;
}

/* 颜色行布局：预设网格 + 自定义 + 彩虹 */
.color-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.swatches-grid {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.swatch-wrap {
    position: relative;
    display: inline-flex;
}
.swatch {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    border-radius: 50% !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    transition: all .18s !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.12) !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    vertical-align: top !important;
    flex-shrink: 0 !important;
    background-clip: padding-box !important;
}
.swatch:hover { transform: scale(1.15); }
.swatch.active {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217,119,6,.25);
    transform: scale(1.1);
}
.swatch-del {
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    background: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #94a3b8 !important;
    opacity: 0 !important;
    transform: scale(0.7) !important;
    transition: all .18s !important;
    z-index: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}
.swatch-wrap:hover .swatch-del {
    opacity: 1 !important;
    transform: scale(1) !important;
}
.swatch-del:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

/* 自定义颜色选择器 */
.custom-color-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 7px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: border-color .18s, box-shadow .18s;
}
.custom-color-wrap:hover { border-color: #cbd5e1; }
.custom-color-wrap:focus-within,
.custom-color-wrap.is-active { border-color: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.12); }

.cc-input {
    width: 22px; height: 22px;
    opacity: 0;
    position: absolute;
    left: 4px; top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    margin: 0; padding: 0;
}
.cc-preview-dot {
    width: 22px; height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    box-shadow: inset 0 -1px 2px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.1);
}
.cc-text {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
}

.cc-rainbow-btn {
    width: 30px; height: 28px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: conic-gradient(red,yellow,lime,cyan,blue,magenta,red);
    cursor: pointer;
    font-size: 13px;
    line-height: 24px;
    text-align: center;
    transition: all .18s;
    flex-shrink: 0;
    padding: 0;
}
.cc-rainbow-btn:hover { transform: scale(1.1); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.cc-rainbow-btn.active {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217,119,6,.25);
}


/* ==========================================
   中间：产品预览区
   ========================================== */
.cfg-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 45% 40%, rgba(245,158,11,.04), transparent 55%),
        repeating-conic-gradient(#fafafa 0% 25%, #ffffff 0% 50%) 0 0 / 80px 80px;
    position: relative;
    min-width: 0;
}

.preview-inner {
    width: 100%;
    max-width: 520px;
    height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.bracelet-preview-ring {
    width: 520px; height: 560px;
    position: relative;
}

.prev-bead {
    transition: all .35s cubic-bezier(.34,1.56,.64,1);
}

.layer-guide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

/* Logo 展示区 */
.logo-preview-area {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.logo-placeholder {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 28px;
    border: 2px dashed #d1d5db;
    border-radius: 14px;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(4px);
    transition: all .3s;
    cursor: default;
    color: #94a3b8;
    font-size: 12px;
    letter-spacing: .03em;
}
.logo-preview-area.logo-active .logo-placeholder {
    border-style: solid;
    border-color: #d97706;
    border-width: 2px;
    background: linear-gradient(135deg,#fffbeb,#fefce8);
    color: #92400e;
    box-shadow: 0 4px 20px rgba(217,119,6,.15);
}


/* ==========================================
   右侧：报价 + 服务面板
   ========================================== */
.cfg-panel {
    background: #fff;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-height));
    -webkit-overflow-scrolling: touch;
}

/* 报价框 */
.quote-box {
    text-align: center;
    padding: 20px 16px 18px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 2px solid #fbbf24;
    border-radius: 18px;
}
.quote-box label {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    letter-spacing: .05em;
}
.quote-total {
    margin-top: 6px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}
.currency-symbol {
    font-size: 24px;
    font-weight: 800;
    color: #d97706;
}
.quote-number {
    font-size: 48px;
    font-weight: 900;
    color: #d97706;
    letter-spacing: -.03em;
    line-height: 1;
}

/* 价格明细折叠 */
.quote-breakdown {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #fde68a;
    text-align: left;
    font-size: 11.5px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.quote-box:hover .quote-breakdown {
    max-height: 400px;
}
.bd-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    color: #78716c;
}
.bd-item span:last-child { font-weight: 600; }
.bd-item span.neg { color: #059669; }

/* 服务卡片 */
.service-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid #e8ecf0;
    border-radius: 14px;
    background: #fafbfc;
    transition: all .2s;
}
.service-card:hover { border-color: #d1d5db; }

.service-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}
.service-info {
    flex: 1;
    min-width: 0;
}
.service-info strong {
    display: block;
    font-size: 13.5px;
    color: #334155;
}
.service-info small {
    font-size: 11px;
    color: #94a3b8;
}
.service-price {
    font-size: 13px;
    font-weight: 700;
    color: #d97706;
    white-space: nowrap;
}

/* Toggle 开关 */
.toggle-switch {
    position: relative;
    width: 44px; height: 24px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0;
    background: #cbd5e1;
    border-radius: 99px;
    cursor: pointer;
    transition: background .25s;
}
.toggle-slider::before {
    content:'';
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s cubic-bezier(.4,2,.2,1);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: #d97706; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-slider.small { width: 36px; height: 20px; }
.toggle-slider.small::before { width: 16px; height: 16px; }
.toggle-switch input:checked + .toggle-slider.small::before { transform: translateX(16px); }

/* 礼盒/物流 并排 */
.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.service-card.half {
    flex-direction: column;
    text-align: center;
    padding: 10px;
}
.service-card.half strong { font-size: 13px; }
.service-card.half small { font-size: 10.5px; }
.service-card.half .service-price { display: none; }

/* 服务项可编辑样式 */
.svc-name-editable, .svc-desc-editable, .svc-price-editable, .svc-price-inline {
    cursor: pointer;
    transition: background .15s, color .15s;
    border-radius: 4px;
    padding: 0 2px;
    margin: -2px -2px;
}
.svc-name-editable:hover, .svc-desc-editable:hover,
.svc-price-editable:hover, .svc-price-inline:hover {
    background: #fef3c7;
    color: #92400e;
}
.svc-price-inline { font-weight: normal; }
.svc-inline-input {
    border: 1.5px solid #d97706 !important;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: inherit;
    font-weight: inherit;
    outline: none;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

/* 操作按钮 */
.btn-block {
    width: 100%; border-radius: 14px;
    padding: 14px;
    font-size: 15px;
}
.action-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; border: none; cursor: pointer;
    font-weight: 600; transition: all .2s; letter-spacing: .01em;
}
.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 16px rgba(217,119,6,.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(217,119,6,.42);
}
.btn-outline {
    background: #fff;
    color: #d97706;
    border: 2px solid #fbbf24;
}
.btn-outline:hover { background: #fffbeb; }

/* 配置摘要 */
.config-summary {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}
.config-summary h5 {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.config-summary ul {
    list-style: none; margin: 0; padding: 0;
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.85;
}
.config-summary li { padding-left: 0; }


/* ==========================================
   Toast
   ========================================== */
.config-toast {
    animation: toastIn .25s ease both;
}
@keyframes toastIn {
    from { opacity:0; transform:translateX(-50%) translateY(-8px); }
    to   { opacity:1; transform:translateX(-50%) translateY(0); }
}


/* ==========================================
   部件卡片
   ========================================== */
.part-card {
    border: 1.5px solid #e8ecf0;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fafbfc;
    transition: all .2s;
}
.part-card:hover { border-color: #d1d5db; }

.part-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.part-num {
    width: 22px; height: 22px;
    background: #d97706;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.part-name {
    font-weight: 700;
    font-size: 13.5px;
    color: #1e293b;
}

.part-name-input {
    font-weight: 700;
    font-size: 13.5px;
    color: #1e293b;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 2px 6px;
    outline: none;
    flex: 1;
    min-width: 0;
    transition: border-color .15s, background .15s;
}
.part-name-input:hover {
    border-color: #e2e8f0;
}
.part-name-input:focus {
    border-color: #d97706;
    background: #fffbeb;
}

.part-desc {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
}

.part-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-label {
    font-size: 10.5px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* 紧凑按钮组 */
.cfg-options.compact .cfg-btn {
    padding: 4px 9px;
    font-size: 11px;
}
.cfg-options.compact.with-del {
    gap: 4px;
}
.cat-item-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.cat-item-wrap .cfg-btn {
    width: 100%;
}
.cat-item-del {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px; height: 16px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    opacity: 0;
    transform: scale(0.7);
    transition: all .15s;
    z-index: 2;
}
.cat-item-wrap:hover .cat-item-del {
    opacity: 1;
    transform: scale(1);
}
.cat-item-del:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

/* 内联添加按钮 */
.inline-add-btn {
    width: 100%;
    margin-top: 4px;
    padding: 5px;
    border: 1.5px dashed #d1d5db;
    border-radius: 8px;
    background: #fafbfc;
    color: #94a3b8;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.inline-add-btn:hover {
    border-color: #d97706;
    color: #d97706;
    background: #fffbeb;
}
.inline-add-btn.color-add-btn {
    margin-top: 8px;
}

/* 添加/删除部件按钮 */
.add-part-btn {
    width: 100%;
    padding: 10px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #fafbfc;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    margin-top: 8px;
}
.add-part-btn:hover {
    border-color: #d97706;
    color: #d97706;
    background: #fffbeb;
}

.part-delete {
    margin-left: auto !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    border: 1.5px solid #e2e8f0 !important;
    background: #fff !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all .2s !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 5 !important;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
}
.part-delete:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

/* ==========================================
   产品立体堆叠预览
   ========================================== */
.product-preview {
    transition: all .4s ease;
}

.product-stack {
    transition: all .4s ease;
}

.part-part {
    transition: all .4s cubic-bezier(.34,1.56,.64,1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.part-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.7);
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
    pointer-events: none;
    letter-spacing: .06em;
}

.part-connector {
    transition: all .4s ease;
    border-radius: 4px;
}

.part-texture {
    transition: all .4s ease;
}

.part-material-tag {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #94a3b8;
    background: rgba(255,255,255,.8);
    padding: 1px 8px;
    border-radius: 99px;
    white-space: nowrap;
    pointer-events: none;
}

.part-accessory {
    transition: all .4s ease;
}

.size-tag {
    font-size: 11px;
    font-weight: 600;
    color: #d97706;
    background: #fffbeb;
    padding: 2px 10px;
    border-radius: 99px;
    border: 1px solid #fde68a;
}

/* ==========================================
   Logo 激活态
   ========================================== */
.logo-preview-area.logo-active .logo-placeholder {
    border-style: solid;
    border-color: #d97706;
    border-width: 2px;
    background: linear-gradient(135deg,#fffbeb,#fefce8);
    color: #92400e;
    box-shadow: 0 4px 20px rgba(217,119,6,.15);
}


/* ==========================================
   响应式微调
   ========================================== */
@media (max-width: 900px) {
    .part-card { padding: 10px; }
}


/* ==========================================
   响应式
   ========================================== */
@media (max-width: 900px) {
    .cfg-sidebar { max-height: none; border-bottom: 1px solid #e2e8f0; }
    .cfg-panel {
        max-height: none;
        border-top: 1px solid #e2e8e8;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 18px;
    }
    .quote-box { grid-column: 1 / -1; }
    .service-card.full { grid-column: 1 / -1; }
    .btn-block { grid-column: 1 / -1; }
    .config-summary { grid-column: 1 / -1; }
    .preview-inner { max-width: 360px; height: 420px; }
}

@media (max-width: 550px) {
    .cfg-panel { grid-template-columns: 1fr; }
    .service-row { grid-template-columns: 1fr; }
    .preview-inner { max-width: 280px; height: 340px; }
}


/* ==========================================
   价格管理弹窗
   ========================================== */
.pe-open-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}
.pe-open-btn:active {
    transform: scale(0.97);
}

.pe-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}
.pe-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.pe-panel {
    background: #fff;
    border-radius: 20px;
    width: 92vw;
    max-width: 620px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
    overflow: hidden;
    transform: translateY(12px);
    transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.pe-overlay.active .pe-panel {
    transform: translateY(0);
}

.pe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.pe-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.pe-close {
    width: 32px; height: 32px;
    border: none; background: #f1f5f9;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.pe-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.pe-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 24px;
    -webkit-overflow-scrolling: touch;
}

.pe-section {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f8fafc;
}
.pe-section:last-child { border-bottom: none; margin-bottom: 0; }
.pe-section h4 {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
}

.pe-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    gap: 12px;
}
.pe-row-label {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    white-space: nowrap;
}
.pe-row-input {
    display: flex;
    align-items: center;
    gap: 4px;
}
.pe-unit {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    min-width: 14px;
    text-align: center;
}
.pe-input {
    width: 90px;
    padding: 6px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    color: #1e293b;
    font-weight: 600;
    transition: all .2s;
    -moz-appearance: textfield;
}
.pe-input::-webkit-inner-spin-button,
.pe-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pe-input:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217,119,6,.1);
}

.pe-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.pe-btn {
    flex: 1;
    padding: 11px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.pe-btn-reset {
    background: #fff;
    color: #94a3b8;
    border: 2px solid #e2e8f0;
}
.pe-btn-reset:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}
.pe-btn-save {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 14px rgba(217,119,6,.3);
}
.pe-btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(217,119,6,.4);
}

@media (max-width: 550px) {
    .pe-panel {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }
    .pe-header { padding: 14px 18px; }
    .pe-body { padding: 14px 18px; }
    .pe-footer { padding: 12px 18px; }
    .pe-input { width: 70px; }
}
