:root {
  --bg: #080908;
  --bg-soft: #11130f;
  --panel: #171913;
  --panel-strong: #20231a;
  --paper: #f5f2e9;
  --paper-2: #ebe4d2;
  --text: #f8f5ed;
  --ink: #161713;
  --muted: #a7a79b;
  --muted-dark: #626357;
  --line: rgba(245, 242, 233, 0.14);
  --line-dark: rgba(22, 23, 19, 0.16);
  --gold: #b3953f;
  --gold-bright: #d7bc67;
  --gold-soft: rgba(179, 149, 63, 0.16);
  --cyan: #6db4b0;
  --green: #7ebe75;
  --red: #d87b72;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  font-family:
    Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

body.drawer-open,
body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 12px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 9, 8, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--gold);
  background:
    linear-gradient(90deg, transparent 46%, var(--gold) 46% 54%, transparent 54%),
    linear-gradient(0deg, transparent 46%, var(--gold) 46% 54%, transparent 54%),
    #10110d;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  color: var(--paper);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.nav-links a {
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.primary-action,
.button,
.icon-button,
.category-pill,
.compact-action {
  border: 0;
  border-radius: 10px;
  min-height: 40px;
}

.primary-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  font-weight: 700;
  line-height: 1.1;
  white-space: normal;
}

.primary-action,
.button-gold {
  background: var(--gold);
  color: #10110d;
}

.primary-action:hover,
.button-gold:hover {
  background: var(--gold-bright);
}

.button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
}

.button-ghost:hover {
  border-color: var(--gold);
  background: rgba(179, 149, 63, 0.12);
}

.button-muted {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.button-muted:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.hero {
  position: relative;
  min-height: 78svh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 88px 32px 78px;
  border-bottom: 1px solid var(--line);
}

.hero-image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 8, 0.96) 0%, rgba(8, 9, 8, 0.86) 38%, rgba(8, 9, 8, 0.48) 70%, rgba(8, 9, 8, 0.62) 100%),
    linear-gradient(0deg, rgba(8, 9, 8, 0.88) 0%, rgba(8, 9, 8, 0.12) 52%, rgba(8, 9, 8, 0.34) 100%),
    url("./assets/hero-rep-tech.png") center right / cover no-repeat;
  transform: scale(1.01);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin-left: max(0px, calc((100vw - 1180px) / 2));
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  color: var(--paper);
  font-size: 4.8rem;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 2.2rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-lead {
  width: min(660px, 100%);
  margin-bottom: 30px;
  color: rgba(248, 245, 237, 0.82);
  font-size: 1.16rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 42px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 14px;
  margin: 0;
}

.hero-metrics div {
  min-height: 88px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(12, 13, 10, 0.6);
}

.hero-metrics dt {
  margin-bottom: 6px;
  color: var(--gold-bright);
  font-size: 1.55rem;
  font-weight: 800;
}

.hero-metrics dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.section {
  padding: 82px 32px;
}

.intro-section {
  background: var(--paper);
  color: var(--ink);
}

.catalog-section,
.compare-section {
  background: var(--bg);
}

.section-heading {
  width: min(1180px, 100%);
  margin: 0 auto 28px;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

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

.workflow-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.workflow-grid article {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: #fffaf0;
}

.workflow-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 28px;
  margin-bottom: 24px;
  border: 1px solid rgba(179, 149, 63, 0.42);
  border-radius: 999px;
  color: #6c571d;
  font-size: 0.78rem;
  font-weight: 800;
}

.workflow-grid p {
  margin-bottom: 0;
  color: var(--muted-dark);
  line-height: 1.5;
}

.catalog-layout {
  width: min(1420px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.filters {
  padding: 16px;
}

.filter-block {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-categories {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.filter-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.filter-block label,
.form-grid label,
.modal-panel > label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f100d;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(179, 149, 63, 0.16);
}

.filter-summary {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: var(--gold-soft);
}

.filter-summary strong {
  display: block;
  color: var(--gold-bright);
  font-size: 1.6rem;
}

.filter-summary span {
  color: var(--muted);
  font-size: 0.86rem;
}

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

.category-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 0;
}

.category-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.category-pill:hover,
.category-pill.is-active {
  border-color: var(--gold);
  background: var(--panel-strong);
}

.category-pill strong {
  font-size: 0.92rem;
}

.category-pill span {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 440px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0)),
    var(--panel);
  overflow: hidden;
}

.product-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.product-code {
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-card h3 {
  margin: 5px 0 6px;
  color: var(--paper);
  font-size: 1.22rem;
}

.product-purpose {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.status-chip {
  align-self: start;
  min-width: 96px;
  padding: 7px 9px;
  border-radius: 999px;
  color: #11130f;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.status-chip.available {
  background: var(--green);
}

.status-chip.request {
  background: var(--gold-bright);
}

.status-chip.agreement {
  background: var(--cyan);
}

.spec-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 16px 18px;
}

.spec-list div {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 26px;
}

.spec-list dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.spec-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.35;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px 16px;
}

.price-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.price-value {
  color: var(--paper);
  font-size: 1.32rem;
  font-weight: 900;
}

.privacy-note {
  color: var(--cyan);
  font-size: 0.8rem;
  text-align: right;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.compact-action {
  min-height: 48px;
  padding: 9px 8px;
  background: #10110d;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.compact-action:hover,
.compact-action.is-active {
  color: #10110d;
  background: var(--gold);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 38px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.mini-tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.74rem;
}

.compare-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.compare-empty {
  padding: 28px;
  color: var(--muted);
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  color: var(--gold-bright);
  font-size: 0.84rem;
}

.compare-table td {
  color: var(--text);
  line-height: 1.42;
}

.detail-drawer,
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.detail-drawer.is-open,
.modal.is-open {
  display: block;
}

.drawer-backdrop,
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100%);
  height: 100%;
  overflow: auto;
  padding: 28px;
  border-left: 1px solid var(--line);
  background: #10110d;
  box-shadow: var(--shadow);
}

.drawer-close,
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: #0f100d;
  color: var(--text);
  font-size: 1.4rem;
}

.icon-button:hover {
  border-color: var(--gold);
}

.drawer-kicker {
  margin-bottom: 8px;
  color: var(--gold-bright);
  font-size: 0.8rem;
  font-weight: 800;
}

.drawer-panel h2 {
  margin-right: 48px;
  margin-bottom: 12px;
}

.drawer-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.drawer-specs {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.drawer-specs div {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.drawer-specs dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.drawer-specs dd {
  margin: 0;
  color: var(--text);
  line-height: 1.42;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-panel {
  position: relative;
  width: min(680px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  margin: 14px auto;
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10110d;
  box-shadow: var(--shadow);
}

.modal-panel h2 {
  margin: 0 48px 22px 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label,
.modal-panel > label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.rfq-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 18px;
}

.form-submit {
  width: 100%;
}

.form-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--cyan);
  font-weight: 800;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #070807;
  font-size: 0.85rem;
}

.admin-body {
  min-height: 100svh;
  background:
    linear-gradient(90deg, rgba(8, 9, 8, 0.96), rgba(8, 9, 8, 0.72)),
    url("./assets/hero-rep-tech.png") center / cover no-repeat fixed;
}

.admin-shell {
  min-height: 100svh;
  padding: 32px;
}

.admin-login {
  min-height: calc(100svh - 64px);
  display: grid;
  align-content: center;
  gap: 28px;
  width: min(620px, 100%);
  margin: 0 auto;
}

.admin-login-card,
.admin-editor,
.admin-products {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 17, 13, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.admin-login-card {
  padding: 30px;
}

.admin-login-card h1,
.admin-workspace-header h1 {
  margin-bottom: 16px;
  font-size: 2.45rem;
  line-height: 1.04;
}

.admin-login-card p {
  color: var(--muted);
  line-height: 1.55;
}

.admin-form,
.admin-editor {
  display: grid;
  gap: 14px;
}

.admin-form label,
.admin-editor label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.admin-workspace {
  width: min(1380px, 100%);
  margin: 0 auto;
}

.admin-workspace-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

.admin-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.admin-editor {
  padding: 24px;
}

.admin-editor-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.admin-editor h2,
.admin-products h2 {
  margin-bottom: 18px;
  font-size: 1.55rem;
}

.admin-products {
  position: sticky;
  top: 32px;
  padding: 20px;
}

.admin-products-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

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

.admin-product-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f100d;
}

.admin-product-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--gold-bright);
  font-size: 0.74rem;
  font-weight: 800;
}

.admin-product-item h3 {
  margin-bottom: 5px;
}

.admin-product-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-product-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.admin-product-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-product-meta strong {
  color: var(--paper);
}

.admin-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .catalog-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 10px 18px;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-self: start;
    order: 3;
  }

  .brand {
    min-width: 0;
  }

  .hero {
    min-height: 72svh;
    padding: 70px 20px 58px;
  }

  h1 {
    font-size: 3.25rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .hero-metrics,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .filter-block {
    margin-bottom: 0;
  }

  .filter-categories {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .filter-summary {
    margin-top: 0;
  }

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

  .section-heading-row {
    align-items: start;
    flex-direction: column;
  }

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

  .admin-workspace-header,
  .admin-workspace-grid {
    grid-template-columns: 1fr;
  }

  .admin-workspace-header {
    align-items: start;
    flex-direction: column;
  }

  .admin-products {
    position: static;
  }
}

@media (max-width: 640px) {
  .topbar {
    gap: 10px;
  }

  .brand-copy span,
  .nav-links {
    display: none;
  }

  .primary-action {
    min-height: 38px;
    max-width: 152px;
    padding: 9px 10px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 70svh;
  }

  .hero-image {
    background:
      linear-gradient(90deg, rgba(8, 9, 8, 0.96) 0%, rgba(8, 9, 8, 0.72) 68%, rgba(8, 9, 8, 0.66) 100%),
      linear-gradient(0deg, rgba(8, 9, 8, 0.9) 0%, rgba(8, 9, 8, 0.18) 62%, rgba(8, 9, 8, 0.42) 100%),
      url("./assets/hero-rep-tech.png") center right / cover no-repeat;
  }

  h1 {
    font-size: 2.55rem;
    line-height: 1;
  }

  h2 {
    font-size: 1.55rem;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-actions,
  .section-actions,
  .drawer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .section,
  .footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .filters,
  .category-strip,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .product-card-header,
  .price-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .privacy-note {
    text-align: left;
  }

  .spec-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

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

  .drawer-panel {
    padding: 22px 18px;
  }

  .modal-panel {
    padding: 24px 18px;
  }

  .admin-shell {
    padding: 18px;
  }

  .admin-login {
    min-height: calc(100svh - 36px);
  }

  .admin-login-card,
  .admin-editor,
  .admin-products {
    padding: 18px;
  }

  .admin-login-card h1,
  .admin-workspace-header h1 {
    font-size: 2rem;
  }

  .admin-header-actions,
  .admin-product-item,
  .admin-editor-actions {
    grid-template-columns: 1fr;
  }

  .admin-header-actions {
    flex-direction: column;
    width: 100%;
  }

  .admin-product-meta {
    justify-items: start;
  }

  .admin-product-actions {
    justify-content: flex-start;
  }
}
