:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #8a8f96;
  --line: #e7e9ec;
  --panel: #ffffff;
  --paper: #ffffff;
  --field: #f7f9fb;
  --teal: #1769b7;
  --teal-dark: #0f4d86;
  --gold: #f2c94c;
  --coral: #f0a529;
  --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(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

.nav-shell {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: #9da1a6;
  min-width: max-content;
}

.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: 26px;
  justify-content: flex-start;
}

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

.site-nav a {
  color: #9b9fa5;
  padding: 8px 0;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: transparent;
  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;
}

.storefront-top {
  padding: 30px 0 24px;
}

.storefront-brand {
  color: #a4a7ab;
  font-size: 2rem;
  font-weight: 850;
  margin: 0 0 36px;
}

.storefront-search {
  width: min(1120px, 100%);
  min-height: 74px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 74px;
  align-items: center;
  border: 1px solid #edf0f2;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(24, 33, 47, 0.035);
  overflow: hidden;
}

.storefront-search input {
  border: 0;
  min-height: 72px;
  padding: 0 0 0 62px;
  font: inherit;
  font-size: 1.12rem;
  color: var(--ink);
  background: transparent;
}

.storefront-search input:focus {
  outline: 0;
}

.search-icon-button {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 0;
  background: #fff;
  color: var(--teal);
  border: 0;
}

.search-icon-button svg {
  width: 34px;
  height: 34px;
}

.storefront-meta {
  width: min(820px, 100%);
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  text-align: center;
  color: #a4a7ab;
  font-weight: 760;
}

.storefront-tabs {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 54px);
  color: #9b9fa5;
  font-size: 1.08rem;
  font-weight: 720;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(24, 33, 47, 0.12);
  min-height: 54px;
}

.storefront-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.category-rail {
  border-right: 4px solid #252525;
  border-left: 4px solid #252525;
  min-height: 980px;
  padding: 16px 14px 28px;
  background: #fff;
}

.category-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 56px;
  color: #24272b;
  font-size: 1.02rem;
  font-weight: 650;
}

.category-link:hover {
  color: var(--teal-dark);
}

.category-icon {
  width: 44px;
  height: 44px;
  border: 1px solid #8fc3e9;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: #fbfdff;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 900;
  overflow: hidden;
}

.category-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showcase {
  padding-top: 24px;
}

.showcase-hero {
  width: min(820px, 100%);
  margin: 0 auto;
}

.showcase-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.showcase-thumbs {
  width: min(520px, 100%);
  margin: 8px auto 54px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.showcase-thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
}

.featured-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 0 26px;
  background: #fff;
}

.featured-panel h2 {
  color: #a4a7ab;
  font-size: 1.3rem;
  font-weight: 650;
  text-align: center;
  margin-bottom: 28px;
}

.featured-product {
  display: grid;
  gap: 12px;
  text-align: center;
  color: #8d9298;
}

.featured-product img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
}

.featured-product strong {
  color: #20252b;
  font-size: 1.08rem;
}

.featured-product .button {
  justify-self: center;
  width: 42px;
  min-height: 42px;
  border-radius: 50%;
  padding: 0;
}

.simple-page {
  padding: 56px 0;
}

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

.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;
  }

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

  .category-rail {
    min-height: 0;
    border: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
  }

  .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%;
    gap: 16px;
  }

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

  .storefront-brand {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  .storefront-search {
    min-height: 58px;
    grid-template-columns: 1fr 58px;
  }

  .storefront-search input {
    min-height: 56px;
    padding-left: 22px;
  }

  .search-icon-button {
    width: 46px;
    height: 46px;
  }

  .storefront-meta {
    grid-template-columns: 1fr;
    margin-top: 22px;
  }

  .storefront-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .category-rail {
    grid-template-columns: 1fr;
  }

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

  .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;
  }
}