:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #657184;
  --line: #dce4e8;
  --panel: #ffffff;
  --paper: #f6f8f5;
  --field: #f0f6f5;
  --teal: #0f766e;
  --teal-dark: #0a4f4b;
  --gold: #f2c94c;
  --coral: #d45b47;
  --steel: #34516d;
  --shadow: 0 18px 45px rgba(24, 33, 47, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

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

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 248, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-shell,
.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--teal-dark);
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--panel);
  color: var(--teal);
  font-weight: 900;
  border-radius: 8px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.site-nav a,
.button,
button,
.select,
.input,
.textarea {
  border-radius: 8px;
}

.site-nav a {
  color: var(--steel);
  padding: 9px 12px;
  font-weight: 700;
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--field);
  color: var(--teal-dark);
}

.button,
button {
  min-height: 42px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.button.primary,
button.primary {
  background: var(--teal);
  color: white;
}

.button.secondary,
button.secondary {
  background: var(--panel);
  color: var(--teal-dark);
  border-color: var(--line);
}

.button.warn {
  background: #fff4ef;
  color: #9d321f;
  border-color: #f0c6ba;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
}

.hero {
  padding: 46px 0 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(330px, 0.78fr);
  gap: 34px;
  align-items: center;
}

.eyebrow {
  color: var(--coral);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.76rem;
}

h1,
h2,
h3 {
  line-height: 1.12;
  margin: 0;
}

h1 {
  font-size: 3.05rem;
  max-width: 760px;
}

h2 {
  font-size: 1.85rem;
}

h3 {
  font-size: 1.1rem;
}

.hero-copy,
.section-copy {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 760px;
}

.search-band {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 740px;
}

.input,
.select,
.textarea {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}

.textarea {
  min-height: 128px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  border-color: var(--teal);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
}

.stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--teal-dark);
}

.stat span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.photo-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 92px;
  gap: 8px;
}

.photo-mosaic img,
.fallback-tile {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.photo-mosaic img:nth-child(1) {
  grid-column: span 4;
  grid-row: span 2;
}

.photo-mosaic img:nth-child(2),
.photo-mosaic img:nth-child(3) {
  grid-column: span 2;
}

.fallback-tile {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  color: var(--teal-dark);
  font-weight: 900;
}

.section {
  padding: 38px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  gap: 14px;
}

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

.group-card,
.part-card,
.detail-panel,
.rfq-panel,
.contact-panel,
.table-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(24, 33, 47, 0.03);
}

.group-card {
  min-height: 152px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.group-card:hover,
.part-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.group-card strong {
  font-size: 1.04rem;
}

.group-meta,
.card-meta,
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--steel);
  padding: 4px 9px;
  font-weight: 800;
  font-size: 0.78rem;
}

.badge.gold {
  background: #fff8d8;
  border-color: #f0dc86;
  color: #705800;
}

.catalog-toolbar {
  position: sticky;
  top: 75px;
  z-index: 10;
  background: rgba(246, 248, 245, 0.96);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  backdrop-filter: blur(12px);
}

.toolbar-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(150px, 0.65fr)) auto;
  gap: 10px;
  align-items: center;
}

.result-count {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

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

.part-card {
  display: grid;
  grid-template-rows: 190px auto;
  overflow: hidden;
}

.part-media {
  position: relative;
  background: linear-gradient(135deg, #eff8f7, #fff8df);
  border-bottom: 1px solid var(--line);
}

.part-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.part-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  font-weight: 900;
  padding: 18px;
  text-align: center;
}

.photo-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(24, 33, 47, 0.82);
  color: white;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 800;
}

.part-content {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.part-title {
  font-size: 1.02rem;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.part-desc {
  color: var(--muted);
  min-height: 44px;
}

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

.spec {
  border-left: 3px solid var(--gold);
  padding-left: 8px;
}

.spec span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.spec strong {
  overflow-wrap: anywhere;
}

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

.breadcrumb {
  padding-top: 26px;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1fr);
  gap: 30px;
  padding: 24px 0 38px;
  align-items: start;
}

.gallery {
  display: grid;
  gap: 10px;
}

.gallery-main {
  aspect-ratio: 4 / 3;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-main img,
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.gallery-thumb {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h1 {
  font-size: 2.25rem;
  overflow-wrap: anywhere;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-table,
.compact-table {
  width: 100%;
  border-collapse: collapse;
}

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

.detail-table th {
  width: 210px;
  color: var(--steel);
  font-size: 0.84rem;
}

.detail-table td {
  overflow-wrap: anywhere;
}

.rfq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
}

.rfq-panel,
.contact-panel {
  padding: 20px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

.rfq-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.rfq-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.site-footer {
  margin-top: 42px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  background: #eef4f1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 30;
}

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

@media (max-width: 980px) {
  .hero,
  .detail-hero,
  .rfq-layout {
    grid-template-columns: 1fr;
  }

  .group-grid,
  .parts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .result-count {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: 2.45rem;
  }
}

@media (max-width: 660px) {
  .nav-shell,
  .section-head,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-shell {
    padding: 12px 0;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a {
    padding-left: 0;
  }

  .search-band,
  .stat-grid,
  .group-grid,
  .parts-grid,
  .toolbar-grid,
  .field-grid,
  .spec-grid {
    grid-template-columns: 1fr;
  }

  .part-card {
    grid-template-rows: 210px auto;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.45rem;
  }
}