/* ============================================================
   PC Builder — page-specific styles (extends shop.css)
   ============================================================ */

.builder-hero {
  background: linear-gradient(180deg, #0d0e12 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 40px;
}
.builder-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
}
.builder-hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}
.builder-hero h1 .accent { color: var(--orange); }
.builder-lede {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 580px;
  margin-bottom: 24px;
}
.builder-trust {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.builder-trust > div { display: flex; flex-direction: column; }
.builder-trust strong { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.builder-trust span { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

.hero-preset {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.preset-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.preset-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.preset-btn {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.preset-btn:hover { border-color: var(--orange); background: var(--bg-4); }
.preset-btn.active { border-color: var(--orange); background: rgba(255,107,0,0.08); color: var(--orange); }
.preset-clear { width: 100%; margin-top: 12px; }

@media (max-width: 900px) {
  .builder-hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Builder columns */
.builder-layout { padding: 40px 0 80px; }
.builder-cols {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: flex-start;
}
@media (max-width: 1100px) {
  .builder-cols { grid-template-columns: 1fr; }
  .summary-col { order: -1; }
}

/* Parts column */
.parts-col { display: flex; flex-direction: column; gap: 16px; }

.part-section {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
}
.part-section.has-selection { border-color: rgba(255,107,0,0.45); }
.part-section.required-empty { border-color: rgba(255,107,0,0.2); }
.part-section.has-conflict { border-color: var(--red); box-shadow: 0 0 0 1px rgba(255,59,48,0.25); }

.part-section-head {
  background: var(--bg-3);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  user-select: none;
}
.part-section-head .left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.part-section-head .num {
  width: 28px; height: 28px;
  background: var(--bg-4);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-2);
  flex-shrink: 0;
}
.part-section.has-selection .num { background: var(--orange); border-color: var(--orange); color: #fff; }
.part-section-head .title-block { min-width: 0; }
.part-section-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.part-section-head .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.part-section.has-selection .part-section-head .sub { color: var(--text); }
.part-section-head .pick {
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  white-space: nowrap;
  flex-shrink: 0;
}
.part-section-head .chev { color: var(--text-3); font-size: 14px; transition: transform .2s; }
.part-section.open .chev { transform: rotate(90deg); }
.part-section.has-conflict .pick { color: var(--red); }

.part-filters {
  display: none;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.15);
  align-items: center;
}
.part-section.open .part-filters { display: flex; }
.part-filters input {
  flex: 1;
  min-width: 0;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.part-filters input:focus { border-color: var(--orange); }
.part-filters select {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}
.part-filters .part-count { font-size: 11.5px; color: var(--text-3); font-weight: 600; white-space: nowrap; }

.part-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.part-section.open .part-grid { max-height: 6000px; padding: 16px; }
.part-section:not(.open) .part-grid { padding: 0 16px; }

.part-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.part-card:hover { border-color: var(--line-2); background: var(--bg-4); }
.part-card.selected {
  border-color: var(--orange);
  background: rgba(255,107,0,0.06);
  box-shadow: 0 0 0 1px var(--orange);
}
.part-card.incompatible {
  opacity: 0.45;
  background: var(--bg-3);
  cursor: not-allowed;
}
.part-card.incompatible:hover { border-color: var(--line); background: var(--bg-3); }

.part-card .brand {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.part-card .name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.part-card .summary { font-size: 12px; color: var(--text-2); line-height: 1.5; flex: 1; }
.part-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.part-card .price { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.part-card .tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-4);
  color: var(--text-3);
}
.part-card.selected .tag { background: var(--orange); color: #fff; }
.part-card .featured-badge {
  position: absolute;
  top: -6px;
  right: 10px;
  background: var(--orange);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.part-card .incompat-reason {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 10px;
  color: var(--red);
  font-weight: 600;
  background: var(--bg-2);
  padding: 3px 8px;
  border-radius: 999px;
}

/* Summary column */
.summary-col { position: sticky; top: 84px; }
@media (max-width: 1100px) { .summary-col { position: static; } }

.summary-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.summary-head h3 { font-size: 16px; font-weight: 700; }
.link-btn {
  background: none;
  color: var(--orange);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.link-btn:hover { color: var(--orange-2); }

.summary-empty {
  background: var(--bg-3);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary-list:empty { display: none; }
.summary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.summary-row:last-child { border-bottom: none; }
.summary-row .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--text-3);
  font-weight: 700;
  margin-bottom: 3px;
}
.summary-row .nm { font-size: 13px; font-weight: 600; line-height: 1.3; }
.summary-row .px { font-size: 14px; font-weight: 700; text-align: right; white-space: nowrap; }
.summary-row .x {
  background: none;
  color: var(--text-3);
  font-size: 12px;
  padding: 2px;
  cursor: pointer;
}
.summary-row .x:hover { color: var(--red); }

.compat-box {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 4px 0 16px;
}
.compat-box.has-error { border-color: var(--red); }
.compat-head {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 10px;
}
.compat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.compat-list li {
  font-size: 12.5px;
  line-height: 1.4;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.compat-list li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.compat-list li.ok    { color: var(--text-2); }
.compat-list li.ok::before    { background: var(--green); }
.compat-list li.warn  { color: var(--text); }
.compat-list li.warn::before  { background: var(--warn); }
.compat-list li.error { color: #ff8a80; font-weight: 600; }
.compat-list li.error::before { background: var(--red); }

.summary-totals {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-bottom: 14px;
}
.summary-totals .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  font-size: 13px;
}
.summary-totals .row > span { color: var(--text-2); }
.summary-totals .row > strong { font-weight: 700; }
.summary-totals .row.total {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 12px;
  font-size: 16px;
}
.summary-totals .row.total > span { color: var(--text); font-weight: 600; }
.summary-totals .row.total > strong { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }

.summary-power {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.summary-power strong { color: var(--text); font-weight: 700; }
.summary-power.warn { border-color: rgba(245,166,35,0.3); background: rgba(245,166,35,0.06); }

.summary-cta { width: 100%; margin-bottom: 10px; }
.summary-cta:last-child { margin-bottom: 0; }

.summary-note {
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.5;
  margin-top: 12px;
}
.summary-note strong { color: var(--text); }
