
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #17212b;
  --muted: #65717d;
  --line: #d8dde3;
  --accent: #f3342f;
  --accent-dark: #d62522;
  --dark: #111820;
  --success: #1f7a4d;
  --warning: #9b6a12;
  --incoming: #285f9b;
  --radius: 18px;
  --shadow: 0 14px 34px rgba(19, 31, 43, 0.09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; }
.container { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216,221,227,.9);
}
.nav-wrap { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; background: white; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 2px; }
nav { display: flex; gap: 24px; }
nav a { text-decoration: none; font-weight: 700; font-size: 14px; }
.hero {
  padding: 84px 0 70px;
  background:
    radial-gradient(circle at 85% 15%, rgba(255,181,21,.18), transparent 28%),
    linear-gradient(145deg, #101820, #202b36);
  color: white;
}
.hero-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 54px; align-items: center; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 800; color: var(--accent); }
.hero .eyebrow { color: #ffb515; }
h1 { font-size: clamp(44px, 7vw, 78px); line-height: .98; letter-spacing: -.055em; margin: 0; max-width: 760px; }
h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.06; letter-spacing: -.04em; margin: 0; }
.hero-copy { color: #c7d0d8; font-size: 19px; line-height: 1.65; max-width: 700px; margin: 24px 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button { padding: 14px 20px; border-radius: 12px; text-decoration: none; font-weight: 800; }
.button.primary { background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { border: 1px solid rgba(255,255,255,.25); color: white; }
.hero-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 24px; }
.hero-card-label { display: block; color: #aeb8c2; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; }
.hero-card div { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.11); }
.hero-card div:last-child { border-bottom: 0; }
.hero-card strong, .hero-card small { display: block; }
.hero-card small { color: #bac4cd; margin-top: 5px; line-height: 1.5; }
.catalog-section { padding: 76px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.result-count { color: var(--muted); font-weight: 700; }
.filters {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr) auto;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.filters label { display: grid; gap: 7px; }
.filters label span { font-size: 12px; font-weight: 800; color: var(--muted); }
input, select, button { font: inherit; }
input, select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 0 12px;
  color: var(--text);
}
.clear-button { align-self: end; min-height: 46px; border: 0; border-radius: 10px; padding: 0 16px; font-weight: 800; cursor: pointer; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(19,31,43,.05);
  display: flex;
  flex-direction: column;
}
.product-image {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(243,52,47,.11), rgba(255,181,21,.10)),
    #eef1f4;
  color: #8b949d;
  font-weight: 900;
  letter-spacing: .08em;
}
.product-content { padding: 20px; display: grid; gap: 12px; height: 100%; }
.product-topline { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.product-card h3 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.sku { font-size: 12px; color: var(--muted); }
.fitment { color: var(--muted); line-height: 1.5; margin: 0; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; }
.meta div { padding: 10px; border-radius: 10px; background: #f6f7f9; }
.meta strong { display: block; margin-bottom: 3px; }
.price-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 4px; }
.price { font-size: 27px; font-weight: 900; letter-spacing: -.04em; }
.status { font-size: 12px; font-weight: 900; padding: 7px 9px; border-radius: 999px; background: #edf5f0; color: var(--success); }
.status.low-stock { background: #fff6e4; color: var(--warning); }
.status.incoming { background: #eaf2fb; color: var(--incoming); }
.view-button { width: 100%; min-height: 44px; border: 0; border-radius: 10px; background: var(--dark); color: white; font-weight: 800; cursor: pointer; }
.empty-state { text-align: center; padding: 54px 20px; }
.info-section { padding: 76px 0; background: white; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.info-grid > p { color: var(--muted); line-height: 1.8; font-size: 18px; }
.contact-section { padding: 70px 0; }
.contact-card { background: var(--dark); color: white; padding: 34px; border-radius: 24px; display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.contact-card p { color: #b8c1ca; }
.contact-links { display: grid; gap: 10px; min-width: 280px; }
.contact-links a, .contact-links span { color: white; text-decoration: none; padding: 12px 14px; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; }
footer { padding: 26px 0; }
.footer-wrap { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }
dialog { width: min(680px, calc(100% - 30px)); border: 0; border-radius: 20px; padding: 0; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
dialog::backdrop { background: rgba(11,17,23,.68); }
.dialog-close { position: absolute; right: 15px; top: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; font-size: 26px; cursor: pointer; }
.dialog-body { padding: 34px; }
.dialog-body h2 { font-size: 36px; padding-right: 40px; }
.dialog-price { font-size: 34px; font-weight: 900; margin: 18px 0; }
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-grid div { padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.dialog-grid strong { display: block; margin-bottom: 4px; }
.dialog-note { color: var(--muted); line-height: 1.6; }
@media (max-width: 1050px) {
  .filters { grid-template-columns: repeat(3, 1fr); }
  .search-field { grid-column: span 2; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  nav { display: none; }
  .hero { padding-top: 58px; }
  .hero-grid, .info-grid { grid-template-columns: 1fr; gap: 34px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .catalog-grid { grid-template-columns: 1fr; }
  .contact-card { align-items: stretch; flex-direction: column; }
  .contact-links { min-width: 0; }
  .footer-wrap, .section-heading { align-items: start; flex-direction: column; }
}
@media (max-width: 480px) {
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .hero-actions { flex-direction: column; }
  .button { text-align: center; }
  .dialog-grid { grid-template-columns: 1fr; }
}


/* Straight-list catalog */
.catalog-table-wrap {
  margin-top: 26px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.catalog-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  table-layout: auto;
}

.catalog-table th {
  position: static;
  background: #f1f3f5;
  color: var(--text);
  text-align: left;
  padding: 16px 14px;
  border-bottom: 2px solid var(--line);
  font-size: 12px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: .045em;
  white-space: normal;
  vertical-align: middle;
}

.catalog-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e8ebee;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.45;
}

.catalog-table tbody tr:hover {
  background: #fafbfc;
}

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

.part-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent-dark);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.part-link:hover {
  text-decoration: underline;
}

.notes-cell {
  min-width: 240px;
  color: var(--muted);
}

.price-column,
.price-cell {
  text-align: right !important;
  white-space: nowrap;
}

.price-cell {
  font-weight: 900;
  font-size: 16px !important;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.pagination button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.pagination button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

#pageInfo {
  min-width: 110px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

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

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

  .catalog-table thead {
    display: none;
  }

  .catalog-table,
  .catalog-table tbody,
  .catalog-table tr,
  .catalog-table td {
    display: block;
    width: 100%;
  }

  .catalog-table tr {
    margin-bottom: 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(19,31,43,.05);
  }

  .catalog-table td {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid #eceff1;
  }

  .catalog-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 900;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
  }

  .catalog-table td:last-child {
    border-bottom: 0;
  }

  .price-cell {
    text-align: left !important;
  }

  .notes-cell {
    min-width: 0;
  }
}


/* Catalog header column sizing */
.catalog-table thead {
  display: table-header-group;
}

.catalog-table th:nth-child(1) { min-width: 90px; }
.catalog-table th:nth-child(2) { min-width: 110px; }
.catalog-table th:nth-child(3) { min-width: 130px; }
.catalog-table th:nth-child(4) { min-width: 190px; }
.catalog-table th:nth-child(5) { min-width: 90px; }
.catalog-table th:nth-child(6) { min-width: 135px; }
.catalog-table th:nth-child(7) { min-width: 105px; }
.catalog-table th:nth-child(8) { min-width: 130px; }
.catalog-table th:nth-child(9) { min-width: 270px; }
.catalog-table th:nth-child(10) { min-width: 95px; }

.catalog-table-wrap {
  max-width: 100%;
}

@media (max-width: 760px) {
  .catalog-table {
    min-width: 0;
  }
}


/* Compact catalog layout */
.catalog-table {
  min-width: 1050px;
  table-layout: fixed;
}

.catalog-table th,
.catalog-table td {
  overflow: hidden;
}

.catalog-table th:nth-child(1),
.catalog-table td:nth-child(1) { width: 8%; }

.catalog-table th:nth-child(2),
.catalog-table td:nth-child(2) { width: 9%; }

.catalog-table th:nth-child(3),
.catalog-table td:nth-child(3) { width: 10%; }

.catalog-table th:nth-child(4),
.catalog-table td:nth-child(4) { width: 17%; }

.catalog-table th:nth-child(5),
.catalog-table td:nth-child(5) { width: 8%; }

.catalog-table th:nth-child(6),
.catalog-table td:nth-child(6) { width: 11%; }

.catalog-table th:nth-child(7),
.catalog-table td:nth-child(7) { width: 9%; }

.catalog-table th:nth-child(8),
.catalog-table td:nth-child(8) { width: 10%; }

.catalog-table th:nth-child(9),
.catalog-table td:nth-child(9) { width: 10%; }

.catalog-table th:nth-child(10),
.catalog-table td:nth-child(10) { width: 8%; }

.catalog-table td:nth-child(6),
.catalog-table td:nth-child(8),
.catalog-table td:nth-child(9) {
  white-space: nowrap;
  text-overflow: ellipsis;
}

.catalog-table .price-cell {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-weight: 900;
  color: var(--text);
}

@media (max-width: 760px) {
  .catalog-table {
    min-width: 0;
    table-layout: auto;
  }

  .catalog-table td:nth-child(6),
  .catalog-table td:nth-child(8),
  .catalog-table td:nth-child(9) {
    white-space: normal;
    text-overflow: clip;
  }
}


/* Quote cart */
.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.cart-header-button {
  border: 0;
  border-radius: 11px;
  min-height: 42px;
  padding: 0 14px;
  background: var(--dark);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.cart-header-button span {
  display: inline-grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  margin-left: 7px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
}

.catalog-table {
  min-width: 1120px;
}

.cart-column {
  text-align: center !important;
}

.add-cart-button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--dark);
  color: white;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.add-cart-button:hover,
.add-cart-button.added {
  background: var(--accent);
}

.dialog-add-button {
  width: 100%;
  margin-top: 22px;
  border: 0;
  cursor: pointer;
}

.dark-button {
  background: var(--dark);
  color: white;
  border: 0;
}

.cart-dialog {
  width: min(1100px, calc(100% - 30px));
  max-height: calc(100vh - 32px);
}

.cart-dialog-body {
  padding: 34px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.cart-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-right: 45px;
  margin-bottom: 24px;
}

.cart-heading h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.text-button {
  border: 0;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.text-button.danger {
  color: var(--accent-dark);
}

.cart-empty {
  padding: 60px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
}

.cart-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cart-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.cart-table th {
  background: #f1f3f5;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

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

.cart-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.quantity-input {
  width: 74px;
  min-height: 38px;
}

.remove-cart-button {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-weight: 800;
  cursor: pointer;
}

.cart-summary {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 20px;
  padding: 22px 4px;
}

.cart-summary span {
  color: var(--muted);
  font-weight: 700;
}

.cart-summary strong {
  font-size: 28px;
}

.customer-form {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafbfc;
}

.customer-form h3 {
  margin: 0 0 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.customer-form label {
  display: grid;
  gap: 7px;
}

.customer-form label span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.full-field {
  margin-top: 15px;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 12px;
  color: var(--text);
  font: inherit;
}

.quote-notice {
  margin-top: 18px;
  padding: 15px;
  border-radius: 12px;
  background: #fff7e8;
  color: #72500f;
  line-height: 1.55;
  font-weight: 700;
}

.cart-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.action-button {
  border: 0;
  cursor: pointer;
}

.email-help {
  margin: 10px 0 0;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .header-actions nav {
    display: none;
  }

  .cart-header-button {
    font-size: 12px;
  }

  .cart-dialog-body {
    padding: 24px 16px;
  }

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

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

  .cart-actions {
    flex-direction: column;
  }

  .cart-actions .button {
    text-align: center;
  }

  .email-help {
    text-align: left;
  }
}


/* Mobile catalog improvements */
@media (max-width: 760px) {
  .catalog-section {
    padding: 52px 0;
  }

  .filters {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .search-field {
    grid-column: auto;
  }

  .catalog-table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .catalog-table {
    min-width: 0 !important;
    width: 100%;
    display: block;
  }

  .catalog-table thead {
    display: none;
  }

  .catalog-table tbody {
    display: grid;
    gap: 14px;
  }

  .catalog-table tr {
    display: block;
    width: 100%;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(19,31,43,.05);
  }

  .catalog-table td {
    display: grid;
    grid-template-columns: minmax(105px, 38%) minmax(0, 1fr);
    gap: 12px;
    width: 100% !important;
    min-width: 0 !important;
    padding: 11px 14px;
    border-bottom: 1px solid #eceff1;
    overflow: visible;
    white-space: normal !important;
    text-overflow: clip !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: left !important;
  }

  .catalog-table td::before {
    content: attr(data-label);
    min-width: 0;
    font-size: 11px;
    font-weight: 900;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
  }

  .catalog-table td:last-child {
    border-bottom: 0;
  }

  .catalog-table .price-cell {
    font-size: 20px !important;
    color: var(--text);
    font-weight: 900;
  }

  .catalog-table td[data-label="Quote"] {
    display: block;
    padding: 14px;
  }

  .catalog-table td[data-label="Quote"]::before {
    display: none;
  }

  .add-cart-button {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
  }

  .part-link {
    font-size: 16px;
    line-height: 1.35;
  }

  .pagination {
    gap: 10px;
    flex-wrap: wrap;
  }

  .pagination button {
    flex: 1 1 120px;
  }

  #pageInfo {
    order: -1;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .catalog-table td {
    grid-template-columns: 96px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .catalog-table td::before {
    font-size: 10px;
  }
}


.mobile-catalog-note {
  display: none;
}

@media (max-width: 760px) {
  .mobile-catalog-note {
    display: block;
    margin: 16px 0 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
  }
}
