/* FPV Part Picker: Main Stylesheet */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --nav-bg:        #1a1f3c;
  --nav-text:      #cdd3f0;
  --nav-text-dim:  #7884bb;
  --nav-border:    #252c52;
  --nav-hover:     #252c52;

  --bg:            #f2f4f9;
  --surface:       #ffffff;
  --surface-2:     #f8f9fc;
  --border:        #e0e5f0;
  --border-dark:   #c8d0e4;

  --text:          #1a1f3c;
  --text-2:        #4a5270;
  --text-3:        #8b95b8;

  --accent:        #e85d04;
  --accent-hover:  #c44d00;
  --accent-light:  #fff3ec;

  --blue:          #2563eb;
  --blue-light:    #eff6ff;

  --green:         #16a34a;
  --green-bg:      #f0fdf4;

  --red:           #dc2626;
  --red-bg:        #fef2f2;
  --red-border:    #fca5a5;

  --amber:         #d97706;
  --amber-bg:      #fffbeb;
  --amber-border:  #fcd34d;

  --sky:           #0ea5e9;
  --sky-bg:        #f0f9ff;
  --sky-border:    #bae6fd;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:     0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.18);

  --radius:        8px;
  --radius-sm:     4px;
  --radius-lg:     12px;
}

/* ── Navigation ────────────────────────────────────────────────────────────── */
.nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 8px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.3px;
  margin-right: 8px;
  flex-shrink: 0;
}
.nav__logo svg { width: 32px; height: 32px; flex-shrink: 0; }
.nav__logo:hover { text-decoration: none; opacity: .9; }
.nav__logo-wordmark { color: #fff; }
.nav__logo-sub { color: var(--accent); font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; display: block; line-height: 1; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav__link {
  color: var(--nav-text);
  font-size: .875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav__link:hover { background: var(--nav-hover); color: #fff; text-decoration: none; }
.nav__link--active { color: #fff; background: var(--nav-hover); }
.nav__link--cta {
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  margin-left: 4px;
}
.nav__link--cta:hover { background: var(--accent-hover); text-decoration: none; }

.nav__search-btn {
  margin-left: auto;
  color: var(--nav-text-dim);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
}
.nav__search-btn:hover { background: var(--nav-hover); color: var(--nav-text); }
.nav__search-btn svg { width: 18px; height: 18px; }

/* ── Page Layout ───────────────────────────────────────────────────────────── */
.page { max-width: 1280px; margin: 0 auto; padding: 0 24px 48px; }
.page--narrow { max-width: 960px; }

/* ── Hero (Index) ──────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a1f3c 0%, #2d3561 60%, #1a1f3c 100%);
  color: #fff;
  padding: 72px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(232,93,4,.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(37,99,235,.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero__inner { max-width: 720px; margin: 0 auto; position: relative; }
.hero__eyebrow {
  display: inline-block;
  background: rgba(232,93,4,.2);
  border: 1px solid rgba(232,93,4,.4);
  color: #ff8c42;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.hero__title span { color: var(--accent); }
.hero__sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 36px;
  line-height: 1.6;
}
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  transition: all .15s;
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
  text-decoration: none !important;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary-lg { padding: 13px 28px; font-size: 1rem; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn--ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-dark); }
.btn--secondary:hover { background: var(--bg); }
.btn--buy { background: var(--green); color: #fff; padding: 6px 16px; font-size: .82rem; border-radius: var(--radius-sm); }
.btn--buy:hover { background: #15803d; }
.btn--buy-disabled {
  background: var(--surface-2);
  border-color: var(--border-dark);
  color: var(--text-3);
  cursor: default;
  font-size: .78rem;
  padding: 6px 12px;
  pointer-events: none;
}
.btn--add { background: var(--accent-light); color: var(--accent); border: 2px dashed rgba(232,93,4,.4); font-weight: 600; font-size: .82rem; padding: 8px 16px; border-radius: var(--radius-sm); }
.btn--add:hover { background: #ffe8d6; border-color: var(--accent); }
.btn--remove { color: var(--text-3); padding: 4px; border-radius: var(--radius-sm); display: flex; align-items: center; }
.btn--remove:hover { color: var(--red); background: var(--red-bg); }
.btn--remove svg { width: 16px; height: 16px; }
.btn--icon { padding: 6px 10px; }
.btn--sm { padding: 5px 12px; font-size: .8rem; }

/* ── Section headings ──────────────────────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 40px 0 16px;
}
.section-head h2 { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.section-head a { font-size: .85rem; color: var(--text-3); }

/* ── Category Cards (index) ────────────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  display: block;
}
.cat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  text-decoration: none;
}
.cat-card__icon {
  width: 40px; height: 40px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--accent);
}
.cat-card__icon svg { width: 22px; height: 22px; }
.cat-card__label { font-size: .85rem; font-weight: 600; color: var(--text); }
.cat-card__count { font-size: .75rem; color: var(--text-3); margin-top: 2px; }

/* ── How It Works (index) ──────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
.step__num {
  width: 36px; height: 36px;
  background: var(--nav-bg);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 14px;
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: .875rem; color: var(--text-2); line-height: 1.6; }

/* ── Builder Page ──────────────────────────────────────────────────────────── */
.builder-header {
  padding: 28px 0 0;
  margin-bottom: 20px;
}
.builder-header h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.builder-header p { color: var(--text-2); font-size: .9rem; }
.builder-help {
  margin-top: 10px;
  background: var(--accent-light);
  border: 1px solid rgba(232,93,4,.24);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  font-weight: 600;
}

.build-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.build-bar__url {
  flex: 1;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: .8rem;
  color: var(--text-2);
  font-family: 'SF Mono', 'Fira Code', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.build-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 16px 0;
  overflow: hidden;
}
.build-summary__header,
.buy-selected__header {
  background: var(--nav-bg);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.build-summary__header h2,
.buy-selected__header h2 {
  font-size: .95rem;
  font-weight: 800;
}
.build-summary__status {
  background: rgba(255,255,255,.1);
  color: var(--nav-text);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 800;
  padding: 3px 9px;
  white-space: nowrap;
}
.build-summary__status--ok { background: rgba(22,163,74,.18); color: #bbf7d0; border-color: rgba(187,247,208,.35); }
.build-summary__status--warning { background: rgba(217,119,6,.2); color: #fde68a; border-color: rgba(253,230,138,.36); }
.build-summary__status--error { background: rgba(220,38,38,.22); color: #fecaca; border-color: rgba(254,202,202,.4); }
.build-summary__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.summary-stat {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.summary-stat:last-child { border-right: none; }
.summary-stat__label {
  display: block;
  color: var(--text-3);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
  margin-bottom: 3px;
  text-transform: uppercase;
}
.summary-stat__value {
  color: var(--text);
  display: block;
  font-size: .98rem;
  overflow-wrap: anywhere;
}

.buy-selected {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-top: 18px;
  overflow: hidden;
}
.buy-selected__header p {
  color: var(--nav-text-dim);
  font-size: .78rem;
}
.buy-selected__list {
  display: grid;
  gap: 0;
}
.buy-selected__empty {
  color: var(--text-3);
  font-size: .86rem;
  padding: 16px;
}
.buy-selected__item {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 13px 16px;
}
.buy-selected__item:first-child { border-top: none; }
.buy-selected__category {
  color: var(--accent);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.buy-selected__name {
  color: var(--text);
  font-size: .9rem;
  font-weight: 700;
}
.buy-selected__meta {
  color: var(--text-3);
  font-size: .78rem;
  margin-top: 1px;
}
.buy-selected__button {
  flex-shrink: 0;
  justify-content: center;
  min-width: 88px;
}

/* ── Compatibility Banner ──────────────────────────────────────────────────── */
.compat-banner {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .875rem;
  line-height: 1.5;
}
.compat-banner--error   { background: var(--red-bg); border: 1px solid var(--red-border); color: var(--red); }
.compat-banner--warning { background: var(--amber-bg); border: 1px solid var(--amber-border); color: var(--amber); }
.compat-banner--notice  { background: var(--sky-bg); border: 1px solid var(--sky-border); color: #0369a1; }
.compat-banner--ok      { background: var(--green-bg); border: 1px solid #bbf7d0; color: var(--green); }
.compat-banner svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.compat-banner__msgs { display: flex; flex-direction: column; gap: 4px; }
.compat-banner__msg { display: flex; align-items: baseline; gap: 6px; }
.compat-banner__msg::before { content: '•'; flex-shrink: 0; }

/* ── Builder Table ─────────────────────────────────────────────────────────── */
.builder-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.builder-table {
  width: 100%;
  border-collapse: collapse;
}
.builder-table th {
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.builder-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: .875rem;
}
.builder-table tbody tr:last-child td { border-bottom: none; }
.builder-table tbody tr:hover td { background: var(--surface-2); }
.builder-table tbody tr.row--error td { background: #fff5f5; }
.builder-table tbody tr.row--warning td { background: #fffbf0; }

.col-component { width: 130px; font-weight: 600; font-size: .82rem; color: var(--text-2); }
.col-selection { }
.col-price { width: 90px; text-align: right; font-weight: 700; white-space: nowrap; }
.col-where  { width: 90px; text-align: right; }
.col-actions { width: 80px; text-align: right; }

.part-row__name { font-weight: 600; color: var(--text); }
.part-row__specs { font-size: .78rem; color: var(--text-3); margin-top: 2px; }
.part-row__compat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  margin-top: 3px;
}
.part-row__compat--error   { background: var(--red-bg); color: var(--red); }
.part-row__compat--warning { background: var(--amber-bg); color: var(--amber); }
.part-row__compat svg { width: 10px; height: 10px; }

.table-total-row td {
  border-top: 2px solid var(--border-dark);
  border-bottom: none;
  padding: 14px 16px;
  font-weight: 700;
}
.total-label { color: var(--text-2); font-size: .875rem; }
.total-price { font-size: 1.2rem; color: var(--text); }

/* ── Part Selection Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 28, .55);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(860px, 100vw);
  background: var(--surface);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}
.modal.is-open { transform: translateX(0); }

.modal__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.modal__title { font-size: 1.1rem; font-weight: 700; }
.modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: all .15s;
}
.modal__close:hover { background: var(--bg); color: var(--text); }
.modal__close svg { width: 18px; height: 18px; }

.modal__toolbar {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
  background: var(--surface-2);
}
.search-box {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 7px 12px;
}
.search-box svg { width: 15px; height: 15px; color: var(--text-3); flex-shrink: 0; }
.search-box input {
  border: none;
  background: none;
  outline: none;
  font: inherit;
  font-size: .875rem;
  color: var(--text);
  width: 100%;
}
.search-box input::placeholder { color: var(--text-3); }

.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-dark);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: all .12s;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.modal__count { font-size: .8rem; color: var(--text-3); margin-left: auto; white-space: nowrap; }

.modal__body {
  flex: 1;
  overflow-y: auto;
}

/* Modal Parts Table */
.parts-table {
  width: 100%;
  border-collapse: collapse;
}
.parts-table th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 12px;
  white-space: nowrap;
  z-index: 1;
}
.parts-table th.sortable { cursor: pointer; user-select: none; }
.parts-table th.sortable:hover { color: var(--text); }
.sort-arrow { display: inline-block; margin-left: 4px; opacity: .5; }
.parts-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
  vertical-align: middle;
}
.parts-table tbody tr:hover td { background: var(--surface-2); }
.parts-table tbody tr.compat-error td { background: #fff8f8; }
.parts-table tbody tr.compat-warning td { background: #fffbf0; }

.part-name-cell { display: flex; align-items: center; gap: 10px; }
.part-thumb {
  width: 40px; height: 40px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-3);
  font-size: .65rem;
  text-align: center;
  line-height: 1.2;
}
.part-name { font-weight: 600; color: var(--text); }
.part-brand { font-size: .75rem; color: var(--text-3); margin-top: 1px; }
.part-desc { font-size: .75rem; color: var(--text-2); margin-top: 3px; max-width: 280px; }

.compat-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
}
.compat-badge--ok      { background: var(--green-bg); color: var(--green); }
.compat-badge--error   { background: var(--red-bg); color: var(--red); }
.compat-badge--warning { background: var(--amber-bg); color: var(--amber); }

.stock-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
}
.stock-badge--in   { background: var(--green-bg); color: var(--green); }
.stock-badge--out  { background: var(--bg); color: var(--text-3); }

.price-cell { font-weight: 700; white-space: nowrap; }
.price-note { font-size: .72rem; color: var(--text-3); font-weight: 400; }

.col-select-btn { width: 80px; text-align: right; }
.btn--select {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.btn--select:hover { background: var(--accent-hover); }
.btn--selected {
  background: var(--green-bg);
  color: var(--green);
  font-weight: 700;
  font-size: .8rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #bbf7d0;
}

.parts-table .no-results td {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
  font-size: .9rem;
}

/* ── Spec Tags ─────────────────────────────────────────────────────────────── */
.spec-tag {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-2);
  padding: 2px 6px;
  margin: 1px 2px 1px 0;
  white-space: nowrap;
}

/* ── Products Page ─────────────────────────────────────────────────────────── */
.products-header {
  padding: 28px 0 20px;
}
.products-header h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.products-header p { color: var(--text-2); font-size: .9rem; }

.category-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  overflow-x: auto;
  margin-bottom: 20px;
}
.category-tab {
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.category-tab:hover { color: var(--text); background: var(--bg); }
.category-tab.active { background: var(--nav-bg); color: #fff; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card__img {
  height: 140px;
  background: linear-gradient(135deg, var(--bg) 0%, #e8ecf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.product-card__img svg { width: 48px; height: 48px; opacity: .35; }
.product-card__body { padding: 16px; }
.product-card__brand { font-size: .72rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.product-card__name { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.product-card__specs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.product-card__desc { font-size: .78rem; color: var(--text-2); line-height: 1.5; margin-bottom: 14px; }
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}
.product-card__price { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.product-card__price small { font-size: .72rem; font-weight: 400; color: var(--text-3); margin-left: 3px; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--nav-bg);
  color: var(--nav-text-dim);
  padding: 32px 24px;
  margin-top: 48px;
  font-size: .82rem;
  text-align: center;
  border-top: 1px solid var(--nav-border);
}
.footer a { color: var(--nav-text); }
.footer__inner { max-width: 1280px; margin: 0 auto; }
.footer__links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.footer__links a { color: var(--nav-text-dim); transition: color .15s; }
.footer__links a:hover { color: var(--nav-text); text-decoration: none; }
.footer__copy { opacity: .6; }

/* ── Utility ───────────────────────────────────────────────────────────────── */
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: .85em; }
.dash { color: var(--text-3); }
.hidden { display: none !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page { padding: 0 16px 40px; }
  .nav__inner { padding: 0 16px; }
  .nav__links .nav__link:not(.nav__link--cta) { display: none; }
  .modal { width: 100vw; }
  .build-bar { flex-wrap: wrap; }
  .build-summary__header,
  .buy-selected__header {
    align-items: flex-start;
    flex-direction: column;
  }
  .build-summary__grid { grid-template-columns: repeat(2, 1fr); }
  .summary-stat {
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .summary-stat:nth-child(2n) { border-right: none; }
  .summary-stat:last-child { border-bottom: none; }
  .buy-selected__item {
    align-items: flex-start;
    flex-direction: column;
  }
  .col-price, .col-where { display: none; }
  .builder-table th:nth-child(3),
  .builder-table th:nth-child(4) { display: none; }
  .builder-table td:nth-child(3),
  .builder-table td:nth-child(4) { display: none; }
  .steps { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
}
