@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@600;700&display=swap");

* {
  box-sizing: border-box;
}

/* ================================
   Admin data tools
================================ */

body.admin-page {
  min-height: 100vh;
  background: #070b12;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(7, 11, 18, 0.92);
  backdrop-filter: blur(14px);
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-brand);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.admin-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-shell {
  width: min(1500px, calc(100vw - 32px));
  margin: 24px auto 64px;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-stat-card,
.admin-controls,
.admin-product-row,
.admin-results-head {
  border: 1px solid var(--border-soft);
  background: rgba(16, 23, 34, 0.94);
  border-radius: 14px;
}

.admin-stat-card {
  padding: 14px;
}

.admin-stat-card strong {
  display: block;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.admin-stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-controls {
  position: sticky;
  top: 86px;
  z-index: 10;
  display: grid;
  gap: 14px;
  padding: 14px;
  margin-bottom: 18px;
}

.admin-tabs,
.admin-issue-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tab,
.admin-issue-chip,
.admin-copy-btn {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(11, 17, 27, 0.86);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab,
.admin-issue-chip {
  padding: 7px 12px;
}

.admin-tab.active,
.admin-issue-chip.active {
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.2);
  color: #dbeafe;
}

.admin-search {
  display: grid;
  gap: 6px;
}

.admin-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-results-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  margin-bottom: 14px;
}

.admin-results-head h1 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.admin-results-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-results {
  display: grid;
  gap: 12px;
}

.admin-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
}

.admin-product-main h2 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.35;
}

.admin-badges,
.admin-row-actions,
.admin-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
}

.admin-badge.clean {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
}

.admin-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.admin-meta-item {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(7, 11, 18, 0.5);
}

.admin-meta-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-meta-item strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.admin-row-actions {
  align-content: start;
  justify-content: flex-end;
  max-width: 360px;
}

.admin-copy-btn {
  padding: 7px 11px;
}

.admin-copy-btn:hover {
  color: var(--text);
  border-color: #94a3b8;
}

.admin-empty {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(16, 23, 34, 0.94);
  color: var(--muted);
}

.dev-admin-link {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.58;
}

.dev-admin-link a {
  color: var(--muted);
  text-decoration: none;
}

.dev-admin-link a:hover {
  color: var(--text);
}

@media (max-width: 760px) {
  .admin-header,
  .admin-results-head,
  .admin-product-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-controls {
    position: static;
  }

  .admin-product-row {
    display: grid;
  }

  .admin-row-actions {
    justify-content: flex-start;
    max-width: none;
  }
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.component-icon {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.icon-text-btn .component-icon {
  width: 17px;
  height: 17px;
}

@media (max-width: 760px) {
  body.home-mode .build-sidebar .build-row.empty-build-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home-mode .build-sidebar .build-row.empty-build-row .build-action {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }

  .build-sidebar .build-row.selected .build-action {
    grid-template-columns: 44px 44px;
    justify-content: flex-start;
  }

  .build-sidebar .build-row.selected .remove-part-btn {
    grid-column: 2;
    justify-self: start;
  }

  .build-sidebar .choose-part-btn.icon-action-btn,
  body.home-mode .build-sidebar .build-row.empty-build-row .icon-action-btn {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 0;
    gap: 0;
    overflow: hidden;
  }

  .build-sidebar .choose-part-btn.icon-action-btn [data-i18n],
  .build-sidebar .choose-part-btn.icon-action-btn .sr-only {
    display: none;
  }
}

.button-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  filter: invert(88%) sepia(13%) saturate(695%) hue-rotate(184deg) brightness(104%) contrast(91%);
}

.product-card-detail-btn .button-icon {
  width: 16px;
  height: 16px;
}

.offer-card > * {
  min-width: 0;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

:root {
  --font-ui: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-brand: "Space Grotesk", "Inter", system-ui, sans-serif;
  --bg: #070b12;
  --panel: #101722;
  --panel-soft: #141d2b;
  --panel-strong: #182235;
  --border: #243044;
  --border-soft: rgba(148, 163, 184, 0.16);
  --text: #e5edf8;
  --muted: #8fa1b8;
  --muted-2: #64748b;
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.14);
  --green: #86efac;
  --red: #fca5a5;
  --yellow: #fcd34d;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

body {
  font-family: var(--font-ui);
  font-weight: 400;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 32rem),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  margin: 0;
}

.hero {
  padding: 20px 20px 18px;
  background: rgba(10, 15, 24, 0.78);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(12px);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.hero h1 {
  font-family: var(--font-brand);
  font-weight: 700;
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.hero p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

main {
  max-width: 1750px;
  margin: 24px auto 48px;
  padding: 0 24px;
}

.site-footer {
  max-width: 980px;
  margin: 22px auto 0;
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: rgba(16, 23, 34, 0.72);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 6px;
}

.site-footer a {
  color: #93c5fd;
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .site-footer {
    margin-bottom: 86px;
  }
}

.controls,
.build-card,
.table-card {
  box-shadow: var(--shadow);
}

.controls {
  background: linear-gradient(180deg, rgba(17, 24, 35, 0.94), rgba(13, 19, 30, 0.94));
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 16px;
}

.home-tabs {
  margin-bottom: 0;
  justify-content: center;
}

@media (min-width: 761px) {
  body.home-mode .home-tabs {
    gap: 14px;
  }

  body.home-mode .home-tabs .tab {
    padding: 14px 22px;
    font-size: 16px;
    min-width: 130px;
  }

  body.home-mode .home-tabs-card {
    padding: 24px;
  }

  body.home-mode .home-tabs-card h2 {
    font-family: var(--font-brand);
    font-weight: 700;
    text-align: center;
    font-size: 24px;
    margin-bottom: 18px;
  }
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab {
  padding: 10px 15px;
  border: 1px solid var(--border);
  background: rgba(21, 30, 43, 0.84);
  color: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.15s ease;
}

.tab:hover {
  border-color: #3b82f6;
  background: rgba(37, 99, 235, 0.16);
  color: white;
}

.tab.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #60a5fa;
  color: white;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.26);
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 170px 190px;
  gap: 10px;
  align-items: center;
}

.filters .secondary-btn {
  padding: 12px;
  white-space: nowrap;
}

body.product-detail-mode .controls {
  padding: 14px 18px;
}

body.product-detail-mode .tabs {
  margin-bottom: 0;
  align-items: center;
}

body.product-detail-mode .controls {
  display: none;
}

body.product-detail-mode .tabs {
  margin-bottom: 0;
}

.product-detail-sidebar-specs {
  display: none;
}

body.product-detail-mode .product-detail-sidebar-specs {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.dynamic-filters {
  display: contents;
}

.filter-control {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 12px;
  background: rgba(11, 17, 27, 0.48);
}

.filter-control-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dynamic-filter {
  padding: 12px;
  font-size: 14px;
  font-family: var(--font-ui);
  font-weight: 500;
  background: #0b111b;
  color: white;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.range-filter-header,
.range-filter-bounds {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.range-filter-value {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.range-filter-control input[type="range"] {
  height: 28px;
  padding: 0;
  accent-color: #3b82f6;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.single-range-filter,
.dual-range-filter {
  position: relative;
  min-height: 28px;
}

.dual-range-filter {
  --range-thumb-size: 16px;
  --range-thumb-radius: calc(var(--range-thumb-size) / 2);
  --range-min-nudge: -6px;
  --range-side-inset: calc(var(--range-thumb-radius) / 2);
  margin-inline: var(--range-side-inset);
}

.dual-range-filter::before,
.dual-range-filter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  transform: translateY(-50%);
  pointer-events: none;
}

.dual-range-filter::before {
  background: rgba(226, 232, 240, 0.85);
}

.dual-range-filter::after {
  left: var(--range-start-position, var(--range-thumb-radius));
  right: var(--range-end-position, var(--range-thumb-radius));
  background: #3b82f6;
}

.dual-range-filter input[type="range"] {
  position: absolute;
  inset: 0;
  z-index: 1;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}

.dual-range-filter input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: #3b82f6;
  cursor: pointer;
  pointer-events: auto;
}

.dual-range-filter input[data-range-bound="min"]::-webkit-slider-thumb {
  transform: translateX(var(--range-min-nudge));
}

.dual-range-filter input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: 0;
}

.dual-range-filter input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: #3b82f6;
  cursor: pointer;
  pointer-events: auto;
}

.dual-range-filter input[data-range-bound="min"]::-moz-range-thumb {
  transform: translateX(var(--range-min-nudge));
}

.dual-range-filter input[type="range"]::-moz-range-track,
.dual-range-filter input[type="range"]::-moz-range-progress {
  height: 4px;
  background: transparent;
  border: 0;
}

.range-filter-bounds {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.check-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-filter-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 9px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.42);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.13);
  cursor: pointer;
}

.check-filter-option input {
  width: 14px;
  height: 14px;
  padding: 0;
  accent-color: #3b82f6;
}

.active-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(11, 17, 27, 0.72);
}

.active-filters-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-chip,
.clear-filter-chips-btn {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip {
  padding: 7px 12px;
  background: rgba(37, 99, 235, 0.18);
  color: #dbeafe;
}

.filter-chip:hover {
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.28);
}

.clear-filter-chips-btn {
  margin-left: auto;
  padding: 7px 14px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--muted);
}

.clear-filter-chips-btn:hover {
  color: var(--text);
  border-color: #94a3b8;
}

input,
select {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-family: var(--font-ui);
  font-weight: 500;
  background: #0b111b;
  color: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 0;
}

.stat-card {
  background: rgba(16, 23, 34, 0.94);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 16px;
}

.stat-card span {
  display: block;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.build-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 36px);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 23, 34, 0.96), rgba(12, 18, 29, 0.96));
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 16px;
}

.build-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.build-header h2 {
  font-family: var(--font-brand);
  font-weight: 700;
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.build-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.48;
}

.secondary-btn,
.add-build-btn {
  border: 1px solid var(--border);
  background: #151e2b;
  color: var(--text);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition: 0.15s ease;
}

.secondary-btn:hover,
.add-build-btn:hover {
  background: #1d2a44;
  border-color: #3b82f6;
}

.add-build-btn {
  background: var(--blue-soft);
  border-color: rgba(96, 165, 250, 0.45);
  color: #bfdbfe;
}

.add-build-btn.selected {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.add-build-btn.selected:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.65);
}

.product-card:has(.add-build-btn.selected) {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.055);
}

.compatibility {
  border-radius: 16px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  font-weight: 600;
  line-height: 1.35;
}

.compatibility-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: currentColor;
  font-size: 15px;
  font-weight: 900;
}

.compatibility-content {
  min-width: 0;
}

.compatibility-title {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.compatibility-summary {
  margin: 4px 0 0;
  color: currentColor;
  font-size: 0.86rem;
  font-weight: 500;
}

.compatibility-details {
  margin-top: 8px;
  color: currentColor;
  font-size: 0.82rem;
  font-weight: 500;
}

.compatibility-details summary {
  cursor: pointer;
  width: fit-content;
  color: #bfdbfe;
  font-weight: 700;
}

.compatibility-details ul {
  margin: 7px 0 0;
  padding-left: 18px;
}

.compatibility-details li + li {
  margin-top: 4px;
}

.compatibility.neutral {
  background: #172033;
  color: #cbd5e1;
}

.compatibility.good {
  background: rgba(34, 197, 94, 0.14);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.compatibility.bad {
  background: rgba(239, 68, 68, 0.14);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.compatibility.warn {
  background: rgba(245, 158, 11, 0.14);
  color: var(--yellow);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.cpu-graphics-warning {
  margin-top: 10px;
}

.table-card {
  overflow-x: auto;
  background: rgba(16, 23, 34, 0.94);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
}

.catalog-column {
  min-width: 0;
}

.build-sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
}

body.home-mode .page-layout {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 334px minmax(0, 900px);
  gap: 18px;
  justify-content: center;
  align-items: start;
}

body.home-mode .component-sidebar {
  grid-column: 1;
}

body.home-mode .catalog-column {
  display: none;
}

body.home-mode .build-sidebar {
  grid-column: 2;
  position: static;
  max-height: none;
}

body.home-mode .build-card {
  max-height: none;
  overflow: visible;
  margin-bottom: 0;
}

body.home-mode .build-body {
  overflow: visible;
  padding-right: 0;
}


@media (max-width: 760px) {
  .mobile-build-btn {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 14px;
    z-index: 60;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    max-width: calc(100vw - 24px);
    overflow: hidden;

    min-height: 50px;
    padding: 10px 14px;

    border: 1px solid rgba(96, 165, 250, 0.55);
    border-radius: 16px;

    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;

    font-weight: 700;
    cursor: pointer;

    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  }

  .mobile-build-btn span {
    flex: 0 0 auto;
    font-size: 15px;
  }

  .mobile-build-btn strong {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    opacity: 0.92;
    white-space: nowrap;
  }

  .mobile-build-btn.has-parts {
    border-color: rgba(134, 239, 172, 0.65);
    background: linear-gradient(135deg, #15803d, #166534);
  }

  body {
    padding-bottom: 78px;
  }
}

body.home-mode .build-header {
  align-items: stretch;
  flex-direction: column;
}

body.home-mode .build-header-actions {
  justify-content: flex-start;
}

body.home-mode .build-card {
  max-height: none;
  overflow: visible;
}

body.home-mode .build-body {
  overflow: visible;
  padding-right: 0;
}

body.home-mode .build-card {
  margin-bottom: 0;
}

body.home-mode .controls,
body.home-mode .product-grid-card,
body.home-mode .stats,
body.home-mode .product-detail {
  display: none;
}

.product-grid-card,
.product-detail,
.stats {
  background: rgba(16, 23, 34, 0.94);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.15;
}

.section-header p {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.5;
  margin: 8px 0 0;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.sort-control select {
  min-width: 170px;
}

@media (max-width: 700px) {
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .sort-control {
    justify-content: space-between;
    width: 100%;
  }

  .sort-control select {
    min-width: 0;
    width: 100%;
  }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.product-title {
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.25;
}

.product-card .product-title {
  display: -webkit-box;
  line-clamp: 4;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: rgba(11, 17, 27, 0.82);
  cursor: pointer;
  transition: 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(15, 23, 42, 0.96);
}

.product-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.favorite-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.favorite-btn:hover {
  color: var(--text);
}

.product-card-title {
  display: -webkit-box;
  min-height: 39px;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card-meta {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.meta-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-card-actions {
  display: grid;
  grid-template-columns: minmax(74px, 0.9fr) minmax(105px, 1.1fr);
  gap: 8px;
}

.product-card-actions .secondary-btn,
.product-card-actions .add-build-btn {
  padding: 9px 8px;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}

.product-card-actions button {
  width: 100%;
}

.toast-container {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: grid;
  gap: 6px;
  pointer-events: none;
  justify-items: center;
}

.toast {
  width: fit-content;
  max-width: min(360px, calc(100vw - 24px));
  padding: 10px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(16, 23, 34, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(22, 101, 52, 0.92);
  color: #dcfce7;
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(127, 29, 29, 0.92);
  color: #fee2e2;
}

.toast-info {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 64, 175, 0.92);
  color: #dbeafe;
}

@media (max-width: 600px) {
  .toast-container {
    top: 8px;
    left: 10px;
    right: 10px;
    transform: none;
    gap: 6px;
  }

  .toast {
    width: 100%;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
    transform: none;
  }
}

.empty-card {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
}

.loading-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-top-color: #93c5fd;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

.error-card {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1050px) {
  .page-layout,
  body.home-mode .page-layout {
    max-width: none;
    grid-template-columns: 1fr;
  }

  .component-sidebar {
    position: static;
    order: 0;
  }

  .catalog-column {
    order: 1;
  }

  .build-sidebar {
    position: static;
    max-height: none;
    order: 2;
  }

  body.home-mode .component-sidebar,
  body.home-mode .build-sidebar {
    grid-column: auto;
  }

  .build-card {
    max-height: none;
    overflow: visible;
  }

  .build-body {
    overflow: visible;
    padding-right: 0;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .component-nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }

  .component-nav .tab {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-control {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .sort-control select {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
  }
}

@media (max-width: 820px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card-actions {
    grid-template-columns: 1fr;
  }
}

.product-detail-card {
  background: rgba(16, 23, 34, 0.94);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.product-detail-header {
  margin-top: 16px;
  margin-bottom: 18px;
}

.product-detail-header h2 {
  font-family: var(--font-brand);
  font-weight: 700;
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.product-detail-header p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.5;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.copy-product-link-btn {
  min-height: 38px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.product-detail-grid-main {
  grid-template-columns: 1fr;
}

.product-detail-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.specs-panel {
  position: sticky;
  top: 18px;
}

.sidebar-specs-panel {
  position: static;
  padding: 0;
  background: transparent;
  border: 0;
}

.mobile-specs-panel {
  display: none;
}

.offers-panel {
  min-width: 0;
}

.product-detail-panel {
  background: rgba(11, 17, 27, 0.78);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px;
}

.product-detail-panel h3 {
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.price-history-panel {
  min-width: 0;
}

.price-history-content {
  min-width: 0;
}

.price-history-chart {
  display: block;
  width: 100%;
  min-height: 220px;
  margin-top: 12px;
}

.price-history-grid line {
  stroke: rgba(148, 163, 184, 0.16);
  stroke-width: 1;
}

.price-history-grid text,
.price-history-axis-label {
  fill: var(--muted);
  font-size: 12px;
  font-family: var(--font-ui);
  font-weight: 500;
}

.price-history-line {
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price-history-point {
  stroke: #0b111b;
  stroke-width: 2;
}

.price-history-stats,
.price-history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.price-history-stats {
  margin-bottom: 2px;
}

.price-history-legend {
  margin-top: 10px;
}

.price-history-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.price-history-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.offer-list {
  display: grid;
  gap: 10px;
}

.offer-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  grid-template-areas:
    "store name price"
    "store actions actions";
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(16, 23, 34, 0.75);
}

.offer-card .store-badge {
  grid-area: store;
  align-self: start;
  width: fit-content;
}

.offer-card > div:not(.price) {
  grid-area: name;
  min-width: 0;
}

.offer-card strong {
  font-weight: 700;
  line-height: 1.35;
}

.offer-card .price {
  grid-area: price;
  text-align: right;
  white-space: nowrap;
  align-self: start;
}

.offer-card .open-link {
  grid-area: actions;
  justify-self: start;
}

.offer-card .add-build-btn {
  grid-area: actions;
  justify-self: end;
  min-width: 115px;
}

.spec-list {
  display: grid;
  gap: 8px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 8px;
}

.spec-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.spec-label {
  color: var(--muted);
  font-weight: 400;
}

.spec-value {
  font-weight: 700;
  text-align: right;
}

@media (max-width: 1100px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .specs-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  body.product-detail-mode .hero {
    display: none;
  }

  body.product-detail-mode .component-sidebar,
  body.product-detail-mode .build-sidebar {
    display: none;
  }

  .mobile-specs-panel {
    display: block;
  }

  body.product-detail-mode main,
  body.product-detail-mode .page-layout {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
  }

  body.product-detail-mode .page-layout {
    display: block;
  }

  body.product-detail-mode .catalog-column {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.product-detail-mode main {
    margin-top: 12px;
  }

  .product-detail {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    min-width: 0;
    overflow: hidden;
    padding: 14px;
    border-radius: 16px;
  }

  #productDetailContent {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .product-detail-header {
    margin-top: 12px;
  }

  .product-detail-header h2 {
    font-size: 25px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .product-detail-header p {
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .product-detail-grid,
  .product-detail-main,
  .product-detail-panel {
    min-width: 0;
  }

  .product-detail-panel,
  .offer-card {
    max-width: calc(100vw - 52px);
    overflow: hidden;
  }

  .spec-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: start;
  }

  .spec-value {
    min-width: 0;
    max-width: 100%;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .price-history-content {
    overflow-x: hidden;
    padding-bottom: 4px;
  }

  .price-history-chart {
    width: 100%;
    max-width: 100%;
    min-height: 220px;
  }

  .price-history-grid text,
  .price-history-axis-label {
    font-size: 15px;
  }

  .price-history-stats,
  .price-history-legend {
    display: grid;
    gap: 8px;
  }

  .offer-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .offer-card > * {
    width: 100%;
    min-width: 0;
  }

  .offer-card .store-badge {
    width: fit-content;
  }

  .offer-card > div:not(.price) {
    width: 100%;
    max-width: calc(100vw - 120px);
  }

  .offer-card strong {
    display: block;
    max-width: calc(100vw - 120px);
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
  }

  .offer-card .details {
    margin-top: 6px;
    max-width: calc(100vw - 120px);
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .offer-card .price {
    width: 100%;
    text-align: left;
    font-size: 18px;
    white-space: normal;
  }

  .offer-card .open-link,
  .offer-card .add-build-btn {
    width: 100%;
    justify-content: center;
    justify-self: stretch;
  }

  .sidebar-beta-note {
    overflow-wrap: anywhere;
  }
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 900px;
}

th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid rgba(36, 48, 68, 0.72);
  text-align: left;
  vertical-align: middle;
}

th {
  background: rgba(21, 30, 43, 0.96);
  color: #cbd5e1;
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tr {
  transition: 0.12s ease;
}

tr:hover {
  background: rgba(29, 42, 68, 0.72);
}

.main-row {
  cursor: pointer;
}

.main-row:hover {
  background: rgba(37, 99, 235, 0.12);
}

.main-row .price {
  color: var(--green);
}

.offer-row:first-of-type .price {
  color: var(--green);
}

.offer-row {
  background: rgba(13, 20, 32, 0.9);
}

.offer-row td {
  color: #cbd5e1;
  font-size: 14px;
}

.offer-name {
  padding-left: 28px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store-logo-badge {
  width: 92px;
  height: 32px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.78);
}

.product-card .store-logo-badge,
.offer-card .store-logo-badge,
.product-detail-header .store-logo-badge {
  width: 92px;
}

.product-detail-header .store-badge {
  margin: 0 3px;
  vertical-align: middle;
}

.store-logo-badge[data-store="anhoch"],
.store-logo-badge[data-store="neksio"] {
  background: #f8fafc;
}

.store-logo-badge img {
  display: block;
  max-width: 100%;
  max-height: 22px;
  object-fit: contain;
}

.store-logo-badge .store-badge-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.price {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--green);
}

.empty {
  text-align: center;
  padding: 30px;
  color: var(--muted);
}

.subtext {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.15s ease;
}

.open-link-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  background: currentColor;
  mask: url("./assets/external-link.svg") center / contain no-repeat;
  -webkit-mask: url("./assets/external-link.svg") center / contain no-repeat;
}

.open-link:hover {
  background: #1d2a44;
  border-color: #3b82f6;
  color: white;
  text-decoration: none;
}

.no-link {
  color: var(--muted-2);
  font-size: 13px;
  white-space: nowrap;
}

.details {
  margin-top: 6px;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.page-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

@media (min-width: 1850px) {
  main {
    max-width: 1850px;
  }

  body:not(.home-mode) .page-layout {
    grid-template-columns: 320px minmax(0, 1fr) 430px;
  }
}

.component-sidebar {
  position: sticky;
  top: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: rgba(16, 23, 34, 0.78);
  padding: 16px;
  box-shadow: var(--shadow);
}

.component-sidebar h2 {
  margin: 0 0 12px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-filters #resetFiltersBtn {
  margin-bottom: 15px;
}

.sidebar-beta-note {
  margin-top: 24px;
  padding-top: 12px;
  position: relative;
}

.component-nav {
  display: grid;
  gap: 10px;
}

.component-nav .tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border-radius: 12px;
  padding: 13px 14px;
  font-weight: 600;
}

.component-nav .component-icon {
  width: 19px;
  height: 19px;
}

.component-nav .tab.active {
  background: var(--blue-soft);
  border-color: rgba(96, 165, 250, 0.55);
  color: white;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.search-row input {
  width: 100%;
}

.filter-toggle-btn {
  white-space: nowrap;
}

.filters-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: rgba(10, 15, 24, 0.42);
}

.compatible-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 900px) {
  main {
    margin-top: 16px;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .filters input {
    grid-column: 1 / -1;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .build-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .build-card:has(.build-body[hidden]) .build-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .build-card:has(.build-body[hidden]) .build-header h2 {
    font-size: 20px;
    white-space: nowrap;
  }

  .build-card:has(.build-body[hidden]) .build-header-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    justify-content: stretch;
    width: 100%;
    min-width: 0;
  }

  .build-card:has(.build-body[hidden]) .secondary-btn,
  .build-card:has(.build-body[hidden]) .compat-filter-toggle {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .build-card:has(.build-body[hidden]) .secondary-btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  .build-card:has(.build-body[hidden]) .compat-filter-toggle {
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 28px 16px 22px;
  }

  main {
    padding: 0 12px;
  }

  .controls,
  .build-card,
  .table-card,
  .stat-card {
    border-radius: 16px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card span {
    font-size: 18px;
  }

  .stat-card p {
    font-size: 11px;
  }

  .stat-card:last-child {
    grid-column: 1 / -1;
  }

  .stat-card:last-child span {
    font-size: 20px;
  }

  .build-grid {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 12px;
  }
}

#lastUpdated {
  white-space: normal;
  line-height: 1.2;
}

.build-table {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.build-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 130px 180px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(11, 17, 27, 0.78);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}

.build-row.selected {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.055);
}

.build-row.active-choice {
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.18);
}

.build-row.active-choice .build-component {
  color: #93c5fd;
}

.build-row.active-choice .choose-part-btn {
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
}

.build-sidebar .build-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  padding: 12px;
}

.build-sidebar .build-component {
  grid-column: 1 / -1;
  font-size: 0.7rem;
}

.build-sidebar .build-selection {
  grid-column: 1;
  min-width: 0;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.28;
}

.build-sidebar .build-price {
  grid-column: 2;
  text-align: right;
  white-space: nowrap;
}

.build-sidebar .build-action {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
}

.build-sidebar .choose-part-btn {
  grid-column: 1;
}

.build-sidebar .remove-part-btn {
  grid-column: 3;
}

.build-sidebar .build-row.empty-build-row {
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 6px 12px;
  padding: 12px 14px;
}

.build-sidebar .build-row.empty-build-row .build-component {
  grid-column: 1;
}

.build-sidebar .build-row.empty-build-row .build-selection {
  grid-column: 1;
  font-size: 13px;
}

.build-sidebar .build-row.empty-build-row .build-price {
  display: none;
}

.build-sidebar .build-row.empty-build-row .build-action {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.build-sidebar .build-row.empty-build-row .choose-part-btn {
  justify-self: end;
}

.build-sidebar .build-row.multi-build-row {
  align-items: start;
  gap: 8px 12px;
}

.build-sidebar .build-row.multi-build-row .build-selection {
  white-space: normal;
}

.build-sidebar .build-row.multi-build-row .build-price {
  padding-top: 20px;
}

@media (min-width: 1051px) {
  body.home-mode .component-sidebar h2 {
    margin-bottom: 14px;
  }

  body.home-mode .component-nav {
    gap: 9px;
  }

  body.home-mode .component-nav .tab {
    min-height: 55px;
    font-size: 1.09rem;
    padding: 15px 16px;
  }

  body.home-mode .build-card {
    padding: 20px;
  }

  body.home-mode .build-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    margin-bottom: 18px;
  }

  body.home-mode .build-header > div:first-child {
    display: block;
  }

  body.home-mode .build-header h2,
  body.home-mode .build-header p,
  body.home-mode .build-header-actions {
    grid-column: auto;
    grid-row: auto;
  }

  body.home-mode .build-header-actions {
    justify-content: flex-end;
  }

  body.home-mode .build-table {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    margin-top: 14px;
  }

  body.home-mode .build-sidebar .build-row,
  body.home-mode .build-sidebar .build-row.empty-build-row {
    grid-template-columns: 150px minmax(0, 1fr) 128px 138px;
    gap: 14px;
    min-height: 74px;
    padding: 12px 16px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: rgba(11, 17, 27, 0.48);
  }

  body.home-mode .build-sidebar .build-row:last-child {
    border-bottom: 0;
  }

  body.home-mode .build-sidebar .build-row.selected {
    background: rgba(34, 197, 94, 0.045);
  }

  body.home-mode .build-sidebar .build-component,
  body.home-mode .build-sidebar .build-row.empty-build-row .build-component {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    font-size: 0.72rem;
  }

  body.home-mode .build-sidebar .build-selection,
  body.home-mode .build-sidebar .build-row.empty-build-row .build-selection {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: 0.98rem;
    white-space: nowrap;
  }

  body.home-mode .build-sidebar .build-price {
    display: block;
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    text-align: right;
  }

  body.home-mode .build-sidebar .build-action,
  body.home-mode .build-sidebar .build-row.empty-build-row .build-action,
  body.home-mode .build-sidebar .build-row.selected .build-action {
    grid-column: 4;
    grid-row: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin: 0;
  }

  body.home-mode .build-sidebar .build-row.empty-build-row .choose-part-btn {
    justify-self: end;
  }
}

.build-sidebar .choose-part-btn,
.build-sidebar .remove-part-btn {
  width: 100%;
}

.build-sidebar .build-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 8px 12px;
}

.build-sidebar .build-header > div:first-child {
  display: contents;
  min-width: 0;
}

.build-sidebar .build-header h2 {
  grid-column: 1;
  grid-row: 1;
}

.build-sidebar .build-header p {
  grid-column: 1 / -1;
  grid-row: 2;
}

.build-sidebar .build-header-actions {
  grid-column: 2;
  grid-row: 1;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.clear-build-btn {
  background: rgba(15, 23, 42, 0.2);
  color: var(--muted);
  border-color: rgba(148, 163, 184, 0.22);
}

.clear-build-btn:hover {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.34);
}

.build-sidebar .choose-part-btn,
.build-sidebar .remove-part-btn {
  flex: 1;
}

.build-component {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
}

.build-component .component-icon {
  width: 16px;
  height: 16px;
}

.build-count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.35);
  font-size: 0.68rem;
  line-height: 1;
}

.build-selection {
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.28;
}

.build-selection.is-clickable {
  cursor: pointer;
  color: var(--text);
  transition: color 0.18s ease;
}

.build-selection.is-clickable:hover {
  color: #bfdbfe;
}

.build-selection.is-clickable:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.75);
  outline-offset: 3px;
  border-radius: 6px;
}

.build-selection-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.build-selection-summary {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.15);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.28);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.2;
}

.build-selection-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.55);
}

.build-selection-item-index {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.13);
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 900;
}

.build-selection-item-name {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.build-selection-item-price {
  grid-column: 2;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.build-price {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--green);
  white-space: nowrap;
  text-align: right;
}

.build-action {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.choose-part-btn,
.remove-part-btn {
  border: 1px solid var(--border);
  background: #151e2b;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.icon-action-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 12px;
}

.icon-action-btn .component-icon {
  width: 19px;
  height: 19px;
}

.choose-part-btn.icon-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-width: 78px;
  padding: 0 13px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(96, 165, 250, 0.62);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.choose-part-btn.icon-action-btn .sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  border: 0;
  font-size: 0.86rem;
}

.build-sidebar .build-row.selected .build-action {
  grid-template-columns: auto minmax(0, 1fr) 40px;
}

.choose-part-btn.icon-action-btn.edit-part-btn {
  gap: 7px;
  min-width: 88px;
  padding: 0 12px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: none;
}

.choose-part-btn.icon-action-btn.edit-part-btn .sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  border: 0;
  font-size: 0.82rem;
}

.remove-part-btn.icon-action-btn {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.34);
}

.choose-part-btn:hover,
.remove-part-btn:hover {
  background: #1d2a44;
  border-color: #3b82f6;
}

.choose-part-btn.icon-action-btn:hover {
  color: white;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.3);
}

.choose-part-btn.icon-action-btn.edit-part-btn:hover {
  background: rgba(37, 99, 235, 0.28);
  box-shadow: none;
}

.remove-part-btn.icon-action-btn:hover {
  color: white;
  background: rgba(185, 28, 28, 0.35);
  border-color: rgba(252, 165, 165, 0.65);
}

.build-sidebar .icon-action-btn {
  width: 40px;
  min-width: 40px;
  flex: 0 0 40px;
}

.build-sidebar .choose-part-btn.icon-action-btn {
  width: auto;
  min-width: 78px;
  flex: 0 0 auto;
}

.build-sidebar .choose-part-btn.icon-action-btn.edit-part-btn {
  min-width: 88px;
}

.remove-part-btn {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.total-row {
  background: rgba(59, 130, 246, 0.09);
  border-color: rgba(96, 165, 250, 0.26);
}

.total-row .build-selection {
  color: var(--muted);
}

.total-row .build-price {
  font-size: 18px;
  font-weight: 800;
}

.build-share-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.share-build-btn {
  min-height: 40px;
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
}

.share-build-btn:hover {
  color: white;
  background: rgba(37, 99, 235, 0.26);
  border-color: rgba(96, 165, 250, 0.7);
}

@media (max-width: 760px) {
  .build-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .build-price {
    text-align: left;
  }

  .build-action {
    justify-content: flex-start;
  }
}

.build-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.build-body {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.build-body::-webkit-scrollbar {
  width: 8px;
}

.build-body::-webkit-scrollbar-track {
  background: transparent;
}

.build-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}

.build-body::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.45);
}

.build-body[hidden] {
  display: none;
}
.build-card:has(.build-body[hidden]) {
  padding-bottom: 18px;
}

.compat-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 8px;
  width: fit-content;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #456897;
  border-radius: 12px;
  background: #111820;
  color: #eaf2ff;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.build-compat-filter {
  width: auto;
  min-height: 36px;
  justify-content: center;
  margin-bottom: 0;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(96, 165, 250, 0.35);
}

.compat-filter-toggle input {
  width: auto;
  padding: 0;
  margin: 0;
  cursor: pointer;
  accent-color: var(--blue);
}

.currency-toggle {
  display: inline-flex;
  padding: 4px;
  background: rgba(11, 17, 27, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  flex-shrink: 0;
}

.currency-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.currency-btn:hover {
  color: var(--text);
}

.currency-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

@media (max-width: 600px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.home-title {
  all: unset;
  cursor: pointer;
}

.home-title:hover {
  color: #93c5fd;
}

@media (max-width: 760px) {
  .table-card {
    overflow-x: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  table {
    min-width: 0;
    border-spacing: 0 10px;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tr.main-row,
  tr.offer-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
    background: rgba(16, 23, 34, 0.94);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
  }

  tr.offer-row {
    margin-left: 12px;
    background: rgba(13, 20, 32, 0.94);
    border-color: rgba(96, 165, 250, 0.18);
  }

  tr.hidden {
    display: none;
  }

  th,
  td {
    display: block;
    padding: 0;
    border-bottom: 0;
  }

  td:first-child {
    order: 1;
  }

  td:nth-child(2) {
    order: 2;
  }

  td:nth-child(3) {
    order: 3;
    font-size: 18px;
  }

  td:nth-child(4) {
    order: 4;
    color: var(--muted);
    font-size: 13px;
  }

  td:nth-child(5) {
    order: 5;
    display: inline-flex;
    width: auto;
  }

  td:nth-child(5) {
    margin-right: 8px;
  }

  td:nth-child(5) .open-link,
  td:nth-child(5) .add-build-btn {
    display: inline-flex;
    justify-content: center;
    width: auto;
    min-width: 105px;
    min-height: 36px;
    padding: 8px 12px;
  }

  tr.offer-row {
    padding: 11px;
    gap: 6px;
  }

  tr.offer-row .store-badge {
    font-size: 11px;
    padding: 5px 9px;
  }

  tr.offer-row .price {
    font-size: 15px;
  }

  .open-link,
  .add-build-btn {
    min-height: 36px;
    align-items: center;
  }

  .offer-name {
    padding-left: 0;
  }

  .subtext {
    font-size: 12px;
    line-height: 1.35;
  }

  .details {
    font-size: 12px;
    line-height: 1.4;
  }

  .store-badge {
    width: fit-content;
  }

  .offers-cell {
    padding-top: 2px;
  }

  tr.main-row,
  tr.offer-row {
    grid-template-columns: 1fr auto auto;
  }

  td:first-child,
  td:nth-child(2),
  td:nth-child(3),
  td:nth-child(4) {
    grid-column: 1 / -1;
  }

  td:nth-child(5) {
    grid-column: auto;
  }
}

.build-card:has(.build-body[hidden]) .build-header {
  margin-bottom: 0;
}

.build-card:has(.build-body[hidden]) {
  padding: 14px;
}

.build-card:has(.build-body[hidden]) .build-header p {
  display: none;
}

.product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-actions .secondary-btn,
.product-actions .add-build-btn {
  min-height: 36px;
}

@media (max-width: 760px) {
  .product-actions {
    width: 100%;
  }

  .product-actions .secondary-btn,
  .product-actions .add-build-btn {
    flex: 1;
    justify-content: center;
  }
}

.back-to-top-btn {
  display: none;
}

@media (max-width: 760px) {
  .back-to-top-btn {
    position: fixed;
    right: 16px;
    bottom: 82px;
    z-index: 50;

    display: grid;
    place-items: center;

    width: 46px;
    height: 46px;
    border: 1px solid rgba(96, 165, 250, 0.55);
    border-radius: 999px;

    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;

    font-size: 22px;
    font-weight: 700;
    cursor: pointer;

    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);

    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: 0.18s ease;
  }

  .back-to-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .back-to-top-btn:active {
    transform: translateY(1px) scale(0.96);
  }
}

.mobile-build-btn {
  display: none;
}

@media (max-width: 760px) {
  .mobile-build-btn {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 14px;
    z-index: 60;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    min-height: 50px;
    padding: 10px 14px;

    border: 1px solid rgba(96, 165, 250, 0.55);
    border-radius: 16px;

    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;

    font-weight: 700;
    cursor: pointer;

    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  }

  .mobile-build-btn span {
    font-size: 15px;
  }

  .mobile-build-btn strong {
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    opacity: 0.92;
    white-space: nowrap;
  }

  .mobile-build-btn.has-parts {
    border-color: rgba(134, 239, 172, 0.65);
    background: linear-gradient(135deg, #15803d, #166534);
  }

  body {
    padding-bottom: 78px;
  }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.language-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
}

.language-btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.language-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

.beta-note {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--yellow);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.site-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.home-title {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.beta-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.14);
  color: #facc15;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body.home-mode .mobile-build-btn {
  display: none;
}

body.home-mode .sidebar-beta-note {
  display: none;
}

@media (max-width: 760px) {
  body.home-mode {
    padding-bottom: 0;
  }
}

@media (max-width: 600px) {
  .search-row {
    grid-template-columns: 1fr;
  }

  .filter-toggle-btn {
    width: 100%;
  }

  .filters-panel {
    display: grid;
    gap: 10px;
  }
}

/* Final responsive layout overrides */

@media (max-width: 1050px) {
  main {
    max-width: 100%;
    padding: 0 14px;
  }

  .page-layout,
  body.home-mode .page-layout {
    max-width: none;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    justify-content: stretch;
  }

  .component-sidebar,
  body.home-mode .component-sidebar {
    grid-column: auto;
    position: static;
    order: 0;
    width: 100%;
  }

  .catalog-column,
  body.home-mode .catalog-column {
    grid-column: auto;
    order: 1;
    min-width: 0;
  }

  body.home-mode .catalog-column {
    display: none;
  }

  .build-sidebar,
  body.home-mode .build-sidebar {
    grid-column: auto;
    position: static;
    max-height: none;
    order: 2;
    width: 100%;
  }

  body.home-mode .build-sidebar {
    order: 1;
  }

  .build-card,
  body.home-mode .build-card {
    max-height: none;
    overflow: visible;
    width: 100%;
  }

  .build-body,
  body.home-mode .build-body {
    overflow: visible;
    padding-right: 0;
  }

  .component-nav {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 4px;
    margin-bottom: 0;
    scrollbar-width: thin;
  }

  .component-nav .tab {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .hero {
    padding: 16px 12px 14px;
  }

  .hero-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .home-title {
    gap: 0.5rem;
  }

  .site-logo {
    width: 42px;
    height: 42px;
  }

  .hero h1 {
    font-size: clamp(28px, 9vw, 38px);
    letter-spacing: -0.045em;
  }

  .hero p {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
  }

  main {
    margin-top: 14px;
    padding: 0 12px;
  }

  .component-sidebar,
  .build-card,
  .controls,
  .product-grid-card,
  .product-detail,
  .stats {
    border-radius: 16px;
  }

  .component-sidebar {
    padding: 12px;
  }

  .build-header {
    align-items: stretch;
    flex-direction: column;
  }

  .build-header-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .build-header-actions .secondary-btn {
    width: 100%;
  }

  .build-sidebar .build-row {
    grid-template-columns: 1fr;
  }

  .build-sidebar .build-selection,
  .build-sidebar .build-price,
  .build-sidebar .build-action {
    grid-column: 1;
  }

  .build-sidebar .build-price {
    text-align: left;
  }

  .build-sidebar .build-action {
    grid-template-columns: 1fr;
  }

  .build-sidebar .build-row.empty-build-row {
    grid-template-columns: 1fr;
  }

  .build-sidebar .build-row.empty-build-row .build-component,
  .build-sidebar .build-row.empty-build-row .build-selection,
  .build-sidebar .build-row.empty-build-row .build-action {
    grid-column: 1;
    grid-row: auto;
  }

  .build-sidebar .build-row.empty-build-row .build-price {
    display: none;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .filter-toggle-btn {
    width: 100%;
  }

  .filters,
  .filters-panel {
    grid-template-columns: 1fr;
  }

  .dynamic-filters {
    display: grid;
    gap: 10px;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .sort-control {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .sort-control select {
    width: 100%;
    min-width: 0;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-build-btn {
    display: flex;
  }

  body.home-mode .mobile-build-btn {
    display: none;
  }

  body.product-detail-mode .mobile-build-btn {
    display: none;
  }

  body.home-mode {
    padding-bottom: 0;
  }

  body.product-detail-mode {
    padding-bottom: 0;
  }
}

/* iPhone SE / tiny mobile hard fixes */
@media (max-width: 430px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body {
    position: static;
  }

  main {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 10px 18px;
  }

  .hero {
    padding: 22px 10px 18px;
  }

  .hero-inner,
  .page-layout,
  body.home-mode .page-layout {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .page-layout,
  body.home-mode .page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    justify-content: stretch;
  }

  .component-sidebar,
  .catalog-column,
  .build-sidebar,
  .build-card,
  .controls,
  .product-grid-card,
  .product-detail,
  .stats {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .component-sidebar,
  .build-sidebar,
  body.home-mode .component-sidebar,
  body.home-mode .build-sidebar {
    grid-column: auto;
    position: static;
    max-height: none;
  }

  .build-card,
  body.home-mode .build-card {
    max-height: none;
    overflow: visible;
  }

  .build-body,
  body.home-mode .build-body {
    max-height: none;
    overflow: hidden;
    padding-right: 0;
  }

  .build-sidebar .choose-part-btn.icon-action-btn,
  body.home-mode .build-sidebar .build-row.empty-build-row .icon-action-btn {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 0;
    gap: 0;
  }

  .build-sidebar .choose-part-btn.icon-action-btn [data-i18n],
  .build-sidebar .choose-part-btn.icon-action-btn .sr-only {
    display: none;
  }

  .home-title {
    max-width: 100%;
    min-width: 0;
  }

  .site-logo {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
  }

  .hero h1 {
    max-width: 100%;
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.045em;
  }

  .hero p {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.5;
  }

  .hero-actions {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .language-toggle,
  .currency-toggle {
    max-width: 100%;
  }

  .component-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    max-width: 100%;
    margin-bottom: 0;
    padding-bottom: 0;
    gap: 8px;
  }

  .component-nav .tab {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: flex-start;
    padding: 8px 9px;
    border-radius: 11px;
    font-size: 0.8rem;
    line-height: 1.15;
    white-space: normal;
  }

  .component-nav .tab span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .build-header,
  body.home-mode .build-header {
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .build-header > div {
    min-width: 0;
  }

  .build-header h2,
  .build-header p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .build-header-actions,
  body.home-mode .build-header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .secondary-btn,
  .add-build-btn,
  .choose-part-btn,
  .remove-part-btn,
  .open-link {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .build-header-actions .secondary-btn {
    width: 100%;
  }

  .beta-note {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .sidebar-filters #resetFiltersBtn {
    margin-bottom: 15px;
  }

  .build-sidebar .build-row,
  .build-sidebar .build-row.empty-build-row {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    min-width: 0;
  }

  .build-sidebar .build-component,
  .build-sidebar .build-selection,
  .build-sidebar .build-price,
  .build-sidebar .build-action,
  .build-sidebar .build-row.empty-build-row .build-component,
  .build-sidebar .build-row.empty-build-row .build-selection,
  .build-sidebar .build-row.empty-build-row .build-action {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
    max-width: 100%;
  }

  .build-sidebar .build-selection {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .build-sidebar .build-price {
    text-align: left;
    white-space: normal;
  }

  .build-sidebar .build-action {
    grid-template-columns: minmax(0, 1fr);
  }

  .build-sidebar .build-row.selected .build-action {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .choose-part-btn.icon-action-btn.edit-part-btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
    gap: 0;
  }

  .choose-part-btn.icon-action-btn.edit-part-btn .sr-only {
    display: none;
  }

  .build-sidebar .build-row.empty-build-row .build-price {
    display: none;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

/* ================================
   Sidebar desktop filters
================================ */

.sidebar-filters {
  display: none;
}

body:not(.home-mode) .sidebar-filters {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.sidebar-filters h3 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-filters select,
.sidebar-filters .secondary-btn,
.sidebar-filters .compat-filter-toggle {
  width: 100%;
}

.sidebar-filters .compat-filter-toggle {
  min-height: auto;
  padding: 10px 12px;
  justify-content: flex-start;
  white-space: normal;
  line-height: 1.3;
}

.sidebar-filter-content {
  display: grid;
  gap: 12px;
}

.sidebar-filters .dynamic-filters {
  display: grid;
  gap: 12px;
}

.sidebar-filters .dynamic-filter {
  width: 100%;
}

.mobile-filters-toggle {
  display: none;
}

body.home-mode .sidebar-filters {
  display: none;
}

body.product-detail-mode .sidebar-filters,
body.product-detail-mode .sidebar-beta-note {
  display: none !important;
}

body.product-detail-mode .product-detail-sidebar-specs {
  display: grid !important;
}

@media (max-width: 760px) {
  body:not(.home-mode) .sidebar-filters {
    display: block;
    margin-top: 12px;
    padding-top: 12px;
  }

  .sidebar-filters h3 {
    display: none;
  }

  .mobile-filters-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #151e2b;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-filters-toggle [data-i18n="filters"] {
    flex: 1;
    text-align: left;
  }

  .mobile-filters-chevron {
    color: var(--muted);
    font-size: 13px;
  }

  .sidebar-filter-content {
    margin-top: 12px;
  }

  .sidebar-filters.is-collapsed .sidebar-filter-content {
    display: none;
  }

  .active-filters-bar {
    gap: 8px;
    margin: 12px 0 14px;
    padding: 10px;
  }

  .active-filters-label {
    flex-basis: 100%;
  }

  .filter-chip,
  .clear-filter-chips-btn {
    min-height: 40px;
    max-width: 100%;
  }

  .clear-filter-chips-btn {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  main {
    width: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .page-layout,
  body.home-mode .page-layout {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .component-sidebar,
  .catalog-column,
  .build-sidebar,
  .build-card,
  .controls,
  .product-grid-card,
  .product-detail,
  .stats {
    width: min(100%, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }

  body.home-mode .component-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  body.home-mode .component-nav .tab {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  body.home-mode .component-nav .tab span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.home-mode .build-header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  .build-sidebar .build-header {
    display: flex;
  }

  .build-sidebar .build-header > div:first-child {
    display: block;
  }

  .build-sidebar .build-header h2,
  .build-sidebar .build-header p,
  .build-sidebar .build-header-actions {
    grid-column: auto;
    grid-row: auto;
  }

  body.home-mode .build-sidebar,
  body.home-mode .build-card,
  body.home-mode .build-body {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .build-sidebar .build-action {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .build-sidebar .remove-part-btn {
    justify-self: end;
  }

  body.home-mode .build-sidebar .build-row.empty-build-row {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 4px 10px;
    align-items: center;
    min-height: 72px;
    padding: 10px 12px;
  }

  body.home-mode .build-sidebar .build-row.empty-build-row .build-component,
  body.home-mode .build-sidebar .build-row.empty-build-row .build-selection {
    grid-column: 1;
    grid-row: auto;
  }

  body.home-mode .build-sidebar .build-row.empty-build-row .build-price {
    display: none;
  }

  body.home-mode .build-sidebar .build-row.empty-build-row .build-action {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0;
  }

  body.home-mode .build-sidebar .build-row.empty-build-row .choose-part-btn {
    justify-self: end;
  }

  body.home-mode .build-sidebar .build-row.empty-build-row .icon-action-btn {
    width: auto;
    min-width: 78px;
    max-width: none;
    flex: 0 0 auto;
  }

  .product-grid-card,
  .product-card,
  .product-card-actions,
  .product-card-actions button {
    min-width: 0;
    max-width: 100%;
  }

  .product-card-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-card-actions .secondary-btn,
  .product-card-actions .add-build-btn {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body:not(.home-mode) .component-sidebar {
    gap: 10px;
  }

  body:not(.home-mode) .sidebar-filters {
    margin-top: 12px;
    margin-bottom: 14px;
    padding-top: 12px;
  }

  body:not(.home-mode) .sidebar-beta-note {
    margin-top: 0;
    padding-top: 0;
  }

  body:not(.home-mode) .controls {
    padding: 14px;
    margin-bottom: 12px;
  }

  body:not(.home-mode) .product-grid-card {
    padding: 14px;
  }

  body:not(.home-mode) .section-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  body:not(.home-mode) .section-header h2 {
    margin: 0;
    font-size: 1.42rem;
    line-height: 1.12;
  }

  body:not(.home-mode) .section-header p {
    margin: 6px 0 0;
    font-size: 0.94rem;
    line-height: 1.38;
  }

  body:not(.home-mode) .sort-control {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.92rem;
  }

  body:not(.home-mode) .sort-control select {
    width: min(62%, 210px);
    min-width: 0;
    padding: 10px 12px;
  }

  body:not(.home-mode) .active-filters-bar {
    margin-top: 0;
    margin-bottom: 10px;
    padding: 9px;
  }
}

@media (max-width: 760px) {
  body.home-mode .build-sidebar .build-row.empty-build-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home-mode .build-sidebar .build-row.empty-build-row .build-action {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }

  .build-sidebar .choose-part-btn.icon-action-btn,
  body.home-mode .build-sidebar .build-row.empty-build-row .icon-action-btn {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 0;
    gap: 0;
    overflow: hidden;
  }

  .build-sidebar .choose-part-btn.icon-action-btn [data-i18n],
  .build-sidebar .choose-part-btn.icon-action-btn .sr-only {
    display: none;
  }
}


@media (max-width: 760px) {
  .build-sidebar .build-row.selected .build-action,
  .build-sidebar .build-action {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 8px;
  }

  .build-sidebar .choose-part-btn,
  .build-sidebar .remove-part-btn,
  .build-sidebar .choose-part-btn.icon-action-btn,
  .build-sidebar .remove-part-btn.icon-action-btn {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 40px;
    padding: 0;
    flex: 0 0 44px;
  }

  .build-sidebar .choose-part-btn {
    grid-column: auto;
  }

  .build-sidebar .remove-part-btn {
    grid-column: auto;
    justify-self: auto;
  }

  .build-sidebar .build-row.selected .remove-part-btn {
    grid-column: auto;
    justify-self: auto;
  }
}

.build-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.buy-build-btn {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.buy-build-btn:hover {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(34, 197, 94, 0.18);
  color: #dcfce7;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(10px);
}

.buy-build-modal {
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  background: rgba(16, 23, 34, 0.98);
  box-shadow: var(--shadow);
  padding: 18px;
}

.buy-build-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.buy-build-modal-header h2 {
  margin: 0;
  font-family: var(--font-brand);
  letter-spacing: -0.03em;
}

.buy-build-modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.buy-build-items {
  display: grid;
  gap: 10px;
}

.buy-build-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(11, 17, 27, 0.78);
}

.buy-build-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.buy-build-item-slot {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.buy-build-item-name {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.buy-build-item-meta {
  color: var(--muted);
  font-size: 13px;
}

.buy-build-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
}

.buy-build-summary strong {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.buy-build-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.buy-build-primary {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

@media (max-width: 600px) {
  .build-footer-actions {
    grid-template-columns: 1fr;
  }

  .buy-build-item {
    grid-template-columns: 1fr;
  }

  .buy-build-item .open-link {
    width: 100%;
  }

  .buy-build-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .buy-build-modal {
    padding: 14px;
    border-radius: 18px;
  }
}