/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 12vw, 130px) 0 clamp(48px, 8vw, 80px);
  border-bottom: 1px solid var(--ink-700);
}
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 20%, black 10%, transparent 75%);
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  top: -180px; right: -120px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, var(--teal-glow), transparent 65%);
  pointer-events: none;
  filter: blur(10px);
}
.hero-inner {
  position: relative;
  display: grid;
  gap: 40px;
}
.hero-copy h1 {
  font-size: clamp(38px, 6.4vw, 68px);
  max-width: 14ch;
}
.hero-copy h1 .accent { color: var(--teal-400); }
.hero-copy .lede {
  font-size: clamp(16px, 2vw, 18.5px);
  max-width: 46ch;
  color: var(--paper-200);
}
.hero-cta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 28px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ink-700);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 40px;
}
.hero-stat {
  background: var(--ink-900);
  padding: 18px 16px;
}
.hero-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  color: var(--teal-400);
}
.hero-stat span { font-size: 12.5px; color: var(--paper-300); }

@media (min-width: 980px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}

/* ---- Hero signature: build ticket card ---- */
.hero-visual { display: flex; justify-content: center; }
.build-ticket {
  width: 100%;
  max-width: 380px;
  padding: 22px;
  font-family: var(--font-mono);
  background: linear-gradient(165deg, var(--ink-800), var(--ink-900));
  position: relative;
}
.build-ticket::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(31,199,189,0.4), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.build-ticket-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 12px; letter-spacing: .08em; color: var(--paper-300); }
.build-ticket-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 9px 0; border-bottom: 1px dashed var(--ink-700); color: var(--paper-100); }
.build-ticket-row span:first-child { color: var(--paper-300); }
.build-ticket-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 11px; color: var(--paper-300); letter-spacing: .08em; }
.progress-track { width: 130px; height: 5px; background: var(--ink-700); border-radius: 4px; overflow: hidden; }
.progress-fill { width: 72%; height: 100%; background: linear-gradient(90deg, var(--teal-600), var(--teal-400)); border-radius: 4px; }

/* ---- Section headers ---- */
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 32px;
}
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 6px; }
.section-head .lede { margin: 0; max-width: 52ch; }

/* ---- Category tiles (home) ---- */
.cat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
.cat-tile {
  position: relative;
  padding: 22px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-700);
  background: linear-gradient(150deg, var(--ink-800), var(--ink-900));
  min-height: 132px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color .15s ease, transform .15s ease;
}
.cat-tile:hover { border-color: var(--teal-500); transform: translateY(-2px); }
.cat-tile .tag { font-family: var(--font-mono); font-size: 11px; color: var(--paper-300); text-transform: uppercase; letter-spacing: .08em; }
.cat-tile h3 { font-size: 19px; margin: 0; }
.cat-tile .go { color: var(--teal-400); font-size: 13px; font-weight: 600; }

@media (min-width: 720px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Product grid & cards ---- */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--ink-600);
  color: var(--paper-200);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--teal-500); }
.filter-chip.active { background: var(--teal-500); border-color: var(--teal-500); color: var(--ink-950); font-weight: 600; }

.product-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--ink-600); }
.product-media {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--ink-900);
  overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.fav-toggle {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(10,13,15,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  color: var(--paper-100);
  border: 1px solid rgba(255,255,255,0.12);
}
.fav-toggle svg { width: 17px; height: 17px; }
.fav-toggle.active { color: var(--teal-400); }
.fav-toggle.active svg { fill: var(--teal-400); }
.product-media .pill { position: absolute; bottom: 10px; left: 10px; }

.product-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-cat { font-family: var(--font-mono); font-size: 11px; color: var(--paper-300); text-transform: uppercase; letter-spacing: .06em; }
.product-name { font-size: 15.5px; font-weight: 600; margin: 0; line-height: 1.3; }
.product-specs { font-family: var(--font-mono); font-size: 12px; color: var(--paper-300); margin: 0; }
.product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--paper-050); }
.price small { font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--paper-300); }

.card-link { position: absolute; inset: 0; }

/* ---- Empty states ---- */
.empty-state {
  text-align: center;
  padding: 72px 20px;
  border: 1px dashed var(--ink-600);
  border-radius: var(--radius-lg);
}
.empty-state svg { width: 40px; height: 40px; color: var(--ink-500); margin: 0 auto 16px; }
.empty-state h3 { margin-bottom: 8px; }

/* ---- Product detail ---- */
.pd-grid { display: grid; gap: 36px; }
@media (min-width: 940px) { .pd-grid { grid-template-columns: 1fr 1fr; } }
.pd-gallery-main {
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--ink-700);
  background: var(--ink-900);
  margin-bottom: 10px;
}
.pd-gallery-main img, .pd-gallery-main video { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 8px; }
.pd-thumb {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--ink-700);
  cursor: pointer;
  opacity: .6;
}
.pd-thumb.active { opacity: 1; border-color: var(--teal-500); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pd-price-row { display: flex; align-items: baseline; gap: 10px; margin: 14px 0; }
.pd-price { font-family: var(--font-display); font-size: 34px; font-weight: 700; }

.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.spec-table tr { border-bottom: 1px solid var(--ink-800); }
.spec-table td { padding: 11px 0; font-size: 14px; }
.spec-table td:first-child { color: var(--paper-300); font-family: var(--font-mono); font-size: 12.5px; width: 40%; text-transform: uppercase; letter-spacing: .04em; }
.spec-table td:last-child { color: var(--paper-050); font-weight: 500; text-align: right; }

.qty-row { display: flex; align-items: center; gap: 14px; margin: 20px 0; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--ink-600); border-radius: var(--radius-sm); }
.qty-stepper button { width: 38px; height: 38px; background: transparent; border: 0; color: var(--paper-100); font-size: 18px; cursor: pointer; }
.qty-stepper button:hover { color: var(--teal-400); }
.qty-stepper input { width: 44px; text-align: center; background: transparent; border: 0; color: var(--paper-050); font-family: var(--font-mono); font-size: 15px; }

.pd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

.tabs { margin-top: 48px; }
.tab-list { display: flex; gap: 4px; border-bottom: 1px solid var(--ink-700); margin-bottom: 24px; overflow-x: auto; }
.tab-btn {
  padding: 12px 18px; font-size: 14.5px; font-weight: 600;
  color: var(--paper-300); background: transparent; border: 0; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab-btn.active { color: var(--teal-400); border-color: var(--teal-400); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Forms ---- */
.form-grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--paper-200); }
.field .hint { font-size: 12.5px; color: var(--paper-300); margin-top: -3px; }
.field input, .field select, .field textarea {
  background: var(--ink-800);
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--paper-050);
  font-family: var(--font-body);
  font-size: 14.5px;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(31,199,189,0.15);
}
.field textarea { resize: vertical; min-height: 100px; }
.field-check { display: flex; align-items: center; gap: 10px; }

.select-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.select-card {
  border: 1px solid var(--ink-600);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  background: var(--ink-800);
}
.select-card:hover { border-color: var(--ink-500); }
.select-card.active { border-color: var(--teal-500); box-shadow: 0 0 0 1px var(--teal-500); background: rgba(31,199,189,0.06); }
.select-card .name { font-weight: 600; font-size: 14px; }
.select-card .meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--paper-300); margin-top: 4px; }
.select-card .add-price { font-family: var(--font-mono); font-size: 12px; color: var(--teal-400); margin-top: 6px; }

/* ---- Build summary sidebar ---- */
.build-summary { position: sticky; top: 96px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 9px 0; border-bottom: 1px solid var(--ink-800); }
.summary-row .n { color: var(--paper-300); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 6px; }
.summary-total b { font-family: var(--font-display); font-size: 24px; }

/* ---- Steps indicator ---- */
.step-track { display: flex; gap: 6px; margin-bottom: 32px; }
.step-track .seg { flex: 1; height: 3px; background: var(--ink-700); border-radius: 2px; }
.step-track .seg.done { background: var(--teal-500); }

/* ---- Process / how it works ---- */
.process-grid { display: grid; gap: 20px; }
@media (min-width: 780px) { .process-grid { grid-template-columns: repeat(4, 1fr); } }
.process-step { padding: 22px; position: relative; }
.process-step .num { font-family: var(--font-mono); color: var(--teal-500); font-size: 13px; }
.process-step h3 { font-size: 17px; margin: 10px 0 6px; }
.process-step p { font-size: 14px; margin: 0; }

/* ---- Testimonials / trust ---- */
.trust-strip {
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: center;
  padding: 28px 0; opacity: 0.85;
}
.trust-strip span { font-family: var(--font-mono); font-size: 12.5px; color: var(--paper-300); text-transform: uppercase; letter-spacing: .06em; }

.quote-grid { display: grid; gap: 18px; }
@media (min-width: 780px) { .quote-grid { grid-template-columns: repeat(3, 1fr); } }
.quote-card { padding: 22px; }
.quote-card p { font-size: 14.5px; color: var(--paper-100); }
.quote-name { font-family: var(--font-mono); font-size: 12.5px; color: var(--teal-400); }

/* ---- CTA band ---- */
.cta-band {
  border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 56px);
  background: linear-gradient(135deg, var(--ink-800), var(--ink-900));
  border: 1px solid var(--ink-700);
  text-align: center;
}
.cta-band h2 { font-size: clamp(24px, 4vw, 36px); max-width: 22ch; margin: 0 auto 12px; }
.cta-band .lede { max-width: 44ch; margin: 0 auto 26px; }
.cta-band-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---- Breadcrumb ---- */
.breadcrumb { font-family: var(--font-mono); font-size: 12.5px; color: var(--paper-300); margin-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--teal-400); }

/* ---- Page header (inner pages) ---- */
.page-head { padding: 44px 0 20px; border-bottom: 1px solid var(--ink-700); }
.page-head h1 { font-size: clamp(28px, 4.4vw, 44px); }

/* ---- Contact ---- */
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card { padding: 22px; display: flex; gap: 14px; align-items: flex-start; }
.contact-card svg { width: 20px; height: 20px; color: var(--teal-400); flex-shrink: 0; margin-top: 2px; }
.contact-card h4 { font-size: 15px; margin: 0 0 4px; }
.contact-card p { margin: 0; font-size: 14px; }

/* ---- Builds We've Made showcase ---- */
.build-entry {
  display: grid; gap: 24px;
  padding: 26px;
  margin-bottom: 20px;
}
@media (min-width: 800px) { .build-entry { grid-template-columns: 360px 1fr; } }
.build-gallery { position: relative; }
.build-gallery-main {
  border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/3; background: var(--ink-900);
  position: relative;
}
.build-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.build-gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(10,13,15,0.65); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.build-gallery-nav.prev { left: 10px; }
.build-gallery-nav.next { right: 10px; }
.build-gallery-nav svg { width: 16px; height: 16px; }
.build-gallery-nav:hover { background: rgba(31,199,189,0.85); border-color: transparent; color: var(--ink-950); }
.build-gallery-counter {
  position: absolute; bottom: 10px; right: 10px;
  font-family: var(--font-mono); font-size: 11px;
  background: rgba(10,13,15,0.65); color: #fff;
  padding: 3px 9px; border-radius: 100px;
}
.build-gallery-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.build-gallery-dots button {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-600);
  border: 0; padding: 0; cursor: pointer;
}
.build-gallery-dots button.active { background: var(--teal-400); width: 16px; border-radius: 4px; }
.build-gallery-thumbs { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.build-gallery-thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; flex-shrink: 0; cursor: pointer; opacity: .55; border: 1px solid var(--ink-700); }
.build-gallery-thumbs img.active { opacity: 1; border-color: var(--teal-500); }
.build-entry-date { font-family: var(--font-mono); font-size: 11.5px; color: var(--paper-300); text-transform: uppercase; letter-spacing: .06em; }
.build-entry h3 { font-size: 20px; margin: 6px 0 14px; }
.build-entry-block { margin-bottom: 14px; }
.build-entry-block .label { font-family: var(--font-mono); font-size: 11px; color: var(--teal-400); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; display: block; }
.build-entry-block p { margin: 0; font-size: 14px; }
.build-feedback {
  border-left: 2px solid var(--teal-500);
  padding-left: 14px;
  font-style: italic;
  color: var(--paper-100);
}
.build-specs-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.build-specs-row span { font-family: var(--font-mono); font-size: 11.5px; background: var(--ink-900); border: 1px solid var(--ink-700); padding: 4px 10px; border-radius: 100px; color: var(--paper-200); }

/* ---- Customer info gate modal ---- */
.gate-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s ease;
}
.gate-overlay.open { opacity: 1; }
.gate-modal {
  width: 100%; max-width: 400px;
  padding: 26px;
  transform: translateY(10px);
  transition: transform .2s ease;
}
.gate-overlay.open .gate-modal { transform: translateY(0); }
.gate-modal h3 { font-size: 19px; margin-bottom: 4px; }
.gate-actions { display: flex; justify-content: flex-end; gap: 10px; }
.gate-identity {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--paper-300);
  padding: 10px 14px; border: 1px solid var(--ink-700); border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.gate-identity button { background: none; border: 0; color: var(--teal-400); cursor: pointer; font-size: 12.5px; }

/* ---- Checkout list items ---- */
.checkout-item {
  display: flex; gap: 14px; align-items: center;
  padding: 16px; margin-bottom: 12px;
}
.checkout-item img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; background: var(--ink-900); }
.checkout-item .ci-info { flex: 1; min-width: 0; }
.checkout-item .ci-name { font-weight: 600; font-size: 14.5px; margin-bottom: 3px; }
.checkout-item .ci-note { font-size: 12.5px; color: var(--paper-300); }
.checkout-item .ci-price { font-family: var(--font-mono); font-size: 13px; color: var(--teal-400); margin-top: 4px; }
.checkout-item .ci-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ci-remove { font-size: 12px; color: var(--paper-300); background: none; border: 0; cursor: pointer; }
.ci-remove:hover { color: var(--red); }

/* ---- Custom build component groups ---- */
.cb-group { margin-bottom: 30px; }
.cb-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cb-group-head h4 { font-size: 15px; margin: 0; }
.cb-group-head .clear-group { font-size: 12.5px; color: var(--paper-300); background: none; border: 0; cursor: pointer; }
.cb-group-head .clear-group:hover { color: var(--teal-400); }

/* ---- Skeleton loader ---- */
.skel { background: linear-gradient(90deg, var(--ink-800) 25%, var(--ink-700) 37%, var(--ink-800) 63%); background-size: 400% 100%; animation: skel-shine 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes skel-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
