/* ==========================================================
   定制杆 7 步向导  cue-builder.css
   前置：css/style.css（CSS 变量与基础组件）
   ========================================================== */

.cb-fit { height: 100vh; overflow: hidden; }
.cb-fit .cb-hero,
.cb-fit .footer { display: none; }

.cb-section {
  height: calc(100vh - var(--header-height));
  padding: 8px 0 10px;
  background: var(--color-warm-white);
  overflow: hidden;
}
.cb-section > .container {
  height: 100%;
}
.cb-page-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #111;
  line-height: 1.2;
}

.cb-photo {
  background: #f4efe6;
  border: 1px solid #ece6da;
  margin-bottom: 8px;
  padding: 2px 0 0;
  flex: 0 0 auto;
}
#cbCue {
  width: 100%;
  height: 72px;
  display: block;
  background: #f4efe6;
}
.cb-photo-cap {
  margin: 2px 0 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #8a8378;
}

.cb-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cb-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: stretch;
}

/* ---------- 进度条 ---------- */
.cb-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 8px;
  flex: 0 0 auto;
}
.cb-dot {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  border: 1px solid #ddd6c9;
  background: #fff;
  color: #b3aa9b;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  display: flex; align-items: center; justify-content: center;
}
.cb-dot:disabled { cursor: default; opacity: .55; }
.cb-dot.done { border-color: #000; background: #000; color: var(--color-beige); }
.cb-dot.current { border-color: var(--color-beige); background: #fff; color: #000; box-shadow: 0 0 0 3px rgba(196,168,130,.22); }
.cb-dot-line { flex: 1 1 auto; height: 1px; background: #e2dbcd; margin: 0 6px; }

/* ---------- 左侧主区 ---------- */
.cb-stage {
  background: #fff;
  border: 1px solid #ece6da;
  padding: 16px 22px 12px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#cbStage { flex: 1 1 auto; min-height: 0; overflow: auto; }
.cb-step-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-beige);
  font-weight: 700;
  margin-bottom: 12px;
}
.cb-step-title {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #111;
  margin-bottom: 8px;
  line-height: 1.2;
  font-size: 1.35rem;
}
.cb-step-help {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #6b6558;
  margin-bottom: 12px;
  max-width: 640px;
}
.cb-sub-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: #111;
  margin-bottom: 14px;
}

/* ---------- 选项卡片 ---------- */
.cb-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.cb-options-3 { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }

.cb-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
  padding: 12px 14px 10px;
  border: 1px solid #e4ded2;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  font-family: inherit;
  min-height: 108px;
}
.cb-option:hover { border-color: #c9bda7; background: #fdfbf6; }
.cb-option.active {
  border-color: #111;
  background: #fdfbf6;
  box-shadow: inset 0 0 0 1px #111;
}
.cb-option-check {
  position: absolute; top: 14px; right: 14px;
  width: 16px; height: 16px;
  border: 1px solid #d5cdbd;
  border-radius: 50%;
  background: #fff;
}
.cb-option.active .cb-option-check { border-color: #000; background: #000; }
.cb-option.active .cb-option-check::after {
  content: ''; position: absolute; left: 5px; top: 2px;
  width: 4px; height: 8px;
  border: solid var(--color-beige);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(42deg);
}
.cb-option-name { font-size: 0.94rem; font-weight: 800; color: #141414; padding-right: 22px; }
.cb-option-en { font-size: 0.62rem; letter-spacing: 0.13em; text-transform: uppercase; color: #a79c88; font-weight: 600; }
.cb-option-desc { font-size: 0.76rem; line-height: 1.65; color: #7b7466; margin-top: 4px; }
.cb-option-price { font-size: 0.74rem; font-weight: 700; color: var(--color-beige-dark); margin-top: 6px; min-height: 1em; }

/* ---------- 饰线组数 chips ---------- */
.cb-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cb-chip {
  padding: 11px 18px;
  border: 1px solid #e4ded2;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3d3a33;
  cursor: pointer;
  transition: all .16s ease;
  font-family: inherit;
}
.cb-chip:hover { border-color: #c9bda7; }
.cb-chip.active { border-color: #000; background: #000; color: #fff; }
.cb-chip em { font-style: normal; color: var(--color-beige); font-size: 0.72rem; }
.cb-chip.active em { color: var(--color-beige); }

/* ---------- 第 7 步：调色板插槽 ---------- */
.cb-slot { border-top: 1px solid #efeadf; padding: 22px 0; }
.cb-slot:first-of-type { border-top: none; padding-top: 0; }
.cb-slot-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.cb-slot-name { font-size: 0.85rem; font-weight: 800; color: #141414; }
.cb-slot-hint {
  font-size: 0.62rem; letter-spacing: .1em; text-transform: uppercase;
  color: #a79c88; font-weight: 700;
}
.cb-slot-current {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.76rem; color: #6b6558; font-weight: 600;
}
.cb-slot-current i { width: 14px; height: 14px; border: 1px solid rgba(0,0,0,.18); display: inline-block; }

.cb-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
}
.cb-swatch {
  border: 1px solid transparent;
  background: #fff;
  padding: 6px 4px 5px;
  cursor: pointer;
  font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: border-color .15s ease, background .15s ease;
}
.cb-swatch i {
  width: 100%; height: 26px; display: block;
  border: 1px solid rgba(0,0,0,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.cb-swatch span {
  font-size: 0.62rem; color: #6b6558; line-height: 1.2;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.cb-swatch:hover { border-color: #d8cfbe; background: #fdfbf6; }
.cb-swatch.active { border-color: #111; background: #fdfbf6; box-shadow: inset 0 0 0 1px #111; }
.cb-swatch.active span { color: #111; font-weight: 700; }

.cb-empty { font-size: .85rem; color: #8a8378; padding: 24px 0; }

/* ---------- 步骤导航 ---------- */
.cb-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 10px; padding-top: 10px; flex: 0 0 auto;
  border-top: 1px solid #efeadf;
}
.cb-nav:empty { display: none; }
.cb-nav .btn[disabled], .cb-nav .btn:disabled { opacity: .38; cursor: not-allowed; }

/* ---------- 右侧面板 ---------- */
.cb-aside { min-height: 0; overflow: auto; }
.cb-panel { background: #fff; border: 1px solid #ece6da; }
.cb-preview {
  background: radial-gradient(circle at 50% 38%, #fcfaf5 0%, #ece5d8 72%);
  padding: 22px 10px 8px;
  display: flex; justify-content: center;
}
.cb-svg { width: 100%; max-width: 210px; height: auto; display: block; }
.cb-preview-caption {
  font-size: 0.6rem; letter-spacing: .16em; text-transform: uppercase;
  color: #a79c88; text-align: center; padding: 6px 0 16px;
}
.cb-panel-body { padding: 14px 16px 16px; }
.cb-sum-title {
  font-size: 0.72rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: #111;
  padding-bottom: 12px; border-bottom: 1px solid #efeadf; margin-bottom: 4px;
}
.cb-sum-list { list-style: none; margin: 0 0 4px; padding: 0; }
.cb-sum-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  grid-template-areas: "no label" ". value";
  gap: 1px 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f4f0e8;
}
.cb-sum-no {
  grid-area: no;
  font-size: 0.6rem; font-weight: 700; color: #c3b9a6;
  padding-top: 2px;
}
.cb-sum-label {
  grid-area: label;
  font-size: 0.66rem; letter-spacing: .1em; text-transform: uppercase;
  color: #8a8378; font-weight: 700;
}
.cb-sum-value {
  grid-area: value;
  font-size: 0.79rem; color: #2a2620; font-weight: 600; line-height: 1.45;
}
.cb-sum-row.done .cb-sum-no { color: var(--color-beige-dark); }
.cb-sum-row.done .cb-sum-value { color: #111; }
.cb-sum-price {
  grid-column: 2;
  font-size: 0.72rem; color: var(--color-beige-dark); font-weight: 700;
}
.cb-sum-price:empty { display: none; }

.cb-sum-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 18px; padding: 16px 0 4px;
  border-top: 2px solid #111;
}
.cb-sum-total span { font-size: 0.72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #111; }
.cb-sum-total strong { font-size: 1.28rem; font-weight: 900; color: #111; }
.cb-sum-note { font-size: 0.68rem; line-height: 1.7; color: #9a9284; margin-top: 12px; }

/* ---------- 最终清单 ---------- */
.cb-spec-table { width: 100%; border-collapse: collapse; margin: 0; }
.cb-spec-table th, .cb-spec-table td {
  border-bottom: 1px solid #efeadf;
  padding: 5px 4px;
  font-size: 0.78rem;
  text-align: left;
  vertical-align: middle;
}
.cb-spec-table th {
  width: 34%;
  font-weight: 700;
  color: #8a8378;
  font-size: 0.66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cb-spec-table td { color: #1a1a1a; font-weight: 600; }

.cb-final-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}
.cb-final-left,
.cb-final-right {
  min-height: 0;
  overflow: hidden;
}
.cb-final-left .cb-step-title { font-size: 1.15rem; margin-bottom: 6px; }
.cb-final-left .cb-step-label { margin-bottom: 4px; }
.cb-final-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid #111;
}
.cb-final-total {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}
.cb-final-total span { font-size: 0.7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.cb-final-total strong { font-size: 1.2rem; font-weight: 900; }
.cb-final-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.cb-final-actions .btn { min-width: 108px; padding: 10px 14px; font-size: 0.78rem; }

.cb-customize {
  height: 100%;
  margin: 0;
  padding: 12px 14px 10px;
  border: 1px solid #ece6da;
  background: #fbfaf7;
  box-sizing: border-box;
}
.cb-customize-title {
  margin: 0 0 2px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: #111;
}
.cb-customize-help {
  margin: 0 0 8px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #8a8378;
}
.cb-customize-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
.cb-customize-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
}
.cb-customize-name { margin-top: 8px; }
.cb-customize-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2a2620;
}
.cb-customize-field select,
.cb-customize-field input {
  width: 100%;
  height: 32px;
  border: 1px solid #ddd6c9;
  background: #fff;
  padding: 0 8px;
  font-size: 0.76rem;
  color: #111;
}
.cb-customize-field select:focus,
.cb-customize-field input:focus {
  outline: none;
  border-color: #111;
}

/* ---------- 产品列表页：正常滚动 + 底部定制邀请 ---------- */
.products-page {
  padding-top: 8px;
  padding-bottom: 48px;
}

.products-page-head {
  margin-bottom: 24px;
}

.products-page-head h1 {
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.products-page-head p {
  color: var(--color-gray-500);
  margin-top: 8px;
}

.products-filter-bar {
  border-bottom: 1px solid #eee;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.products-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.products-filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #000;
}

.products-pagination {
  text-align: center;
  margin: 32px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cb-end-invite {
  margin: 48px 0 16px;
  padding: 56px 40px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(196, 168, 130, 0.14), transparent 55%),
    linear-gradient(165deg, #111 0%, #1a1612 55%, #0c0b0a 100%);
  color: #fff;
  border: 1px solid rgba(196, 168, 130, 0.2);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.cb-end-invite.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cb-end-invite-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-beige);
  margin-bottom: 14px;
}

.cb-end-invite-title {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  color: #fff;
}

.cb-end-invite-desc {
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.62);
  max-width: 420px;
  margin: 0 auto 28px;
}

.cb-end-invite .btn {
  min-width: 200px;
}

@media (max-width: 720px) {
  .products-page-head h1 {
    font-size: 1.8rem;
  }
  .cb-end-invite {
    margin-top: 36px;
    padding: 40px 22px;
  }
  .cb-end-invite-desc {
    font-size: 0.84rem;
  }
}

/* ---------- 响应式 ---------- */
body.cb-final .cb-page-title,
body.cb-final .cb-progress,
body.cb-final .cb-aside { display: none; }
body.cb-final .cb-body { grid-template-columns: 1fr; }
body.cb-final .cb-stage {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 12px;
}
body.cb-final #cbStage {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
body.cb-final #cbCue { height: 64px; }
body.cb-final .cb-photo { margin-bottom: 6px; padding: 2px 0 0; }
body.cb-final .cb-photo-cap { display: none; }
body.cb-final .cb-nav { display: none; }

@media (max-width: 1080px) {
  .cb-fit { height: auto; overflow: auto; }
  .cb-fit .footer { display: block; }
  .cb-section { height: auto; overflow: visible; }
  .cb-wrap { height: auto; }
  .cb-body { grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
  .cb-stage, .cb-aside { height: auto; overflow: visible; }
  #cbStage { overflow: visible; }
  #cbCue { height: 72px; }
  body.cb-final .cb-body { grid-template-columns: 1fr; }
  body.cb-final .cb-aside { display: none; }
}
@media (max-width: 720px) {
  .cb-section { padding: 12px 0 48px; }
  .cb-stage { padding: 28px 20px 24px; }
  .cb-options, .cb-options-3 { grid-template-columns: 1fr; }
  .cb-dot { width: 30px; height: 30px; flex-basis: 30px; font-size: .7rem; }
  .cb-dot-line { margin: 0 3px; }
  .cb-panel { grid-template-columns: 1fr; }
  .cb-final-actions { flex-direction: column; width: 100%; }
  .cb-final-foot { flex-direction: column; align-items: stretch; }
  .cb-swatches { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .cb-final-layout { grid-template-columns: 1fr; }
  .cb-customize-grid { grid-template-columns: 1fr; }
}
