.config-hero { padding: 50px 0 10px; text-align: center; }
.config-hero p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

.config-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  padding: 40px 0 100px;
  align-items: start;
}

/* ---- Шаги выбора компонентов ---- */
.steps-col { display: flex; flex-direction: column; gap: 16px; }
.step-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: border-color .2s;
}
.step-card.done { border-color: var(--success); }
.step-head { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.step-head-left { display: flex; align-items: center; gap: 14px; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.step-card.done .step-num { background: var(--success); color: #06231a; }
.step-title { font-weight: 700; font-size: 15.5px; }
.step-selected { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.step-toggle-icon { transition: transform .25s; color: var(--text-muted); }
.step-card.open .step-toggle-icon { transform: rotate(180deg); }

.step-options {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
}
.step-card.open .step-options { max-height: 900px; margin-top: 18px; }

.option-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.option-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; cursor: pointer; transition: all .2s; display: flex; gap: 12px; align-items: center;
  background: var(--bg-soft);
}
.option-item:hover { border-color: var(--accent); }
.option-item.selected { border-color: var(--accent); background: rgba(79,124,255,.08); }
.option-item img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.option-item .o-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.option-item .o-price { font-size: 13px; color: var(--accent); font-weight: 700; margin-top: 4px; }
.option-item .o-check {
  margin-left: auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.option-item.selected .o-check { border-color: var(--accent); background: var(--accent); }

/* ---- Правая колонка: визуализация сборки + итог ---- */
.build-preview {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px;
}
.build-visual {
  height: 260px; position: relative; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center;
}
.build-tower {
  width: 160px; height: 220px; border-radius: 18px;
  background: linear-gradient(160deg, #1c2233, #0f1320);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
  transition: box-shadow .4s ease;
}
.build-tower.glow { box-shadow: 0 0 50px rgba(79,124,255,.5), 0 20px 40px rgba(0,0,0,.4); }
.build-part {
  position: absolute; left: 10%; right: 10%;
  opacity: 0; transform: translateY(14px) scale(.9);
  transition: opacity .5s ease, transform .5s ease;
  border-radius: 6px;
}
.build-part.active { opacity: 1; transform: translateY(0) scale(1); }
.part-cpu { top: 12%; height: 14%; background: var(--accent-gradient); }
.part-gpu { top: 62%; height: 16%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 16px rgba(124,92,255,.6); }
.part-ram { top: 30%; height: 8%; left: 15%; width: 30%; background: var(--success); }
.part-fan { top: 45%; left: 30%; width: 40%; height: 40%; border-radius: 50%; border: 3px solid var(--accent); background: transparent; animation: spin 2.5s linear infinite; }
.part-cooler { top: 5%; left: 25%; width: 50%; height: 10%; background: var(--text-muted); border-radius: 4px; }

.build-summary-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; max-height: 260px; overflow-y: auto; }
.summary-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.summary-row .s-name { color: var(--text-muted); }
.summary-row .s-price { font-weight: 700; }
.summary-row.empty-row { color: var(--text-muted); font-style: italic; border: none; }

.build-total-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-top: 1px solid var(--border); margin-bottom: 16px; }
.build-total-row b { font-size: 24px; }
.build-actions { display: flex; flex-direction: column; gap: 10px; }

.compat-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-muted); background: var(--bg-soft); padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 16px; }

@media (max-width: 1000px) {
  .config-layout { grid-template-columns: 1fr; }
  .build-preview { position: static; }
  .option-list { grid-template-columns: 1fr; }
}
