:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #ffffff;
  --soft: #f4f7fb;
  --brand: #0f7f78;
  --brand-dark: #0b625d;
  --accent: #d88416;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(24, 33, 47, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

.brand-logo {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
}

.top-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a.is-active {
  color: var(--brand-dark);
  background: #e7f4f2;
}

main {
  outline: none;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  width: min(1440px, calc(100% - 48px));
  margin: 24px auto 48px;
}

.filter-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(24, 33, 47, 0.06);
}

.panel-title {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-title span {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.series-filter {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.series-filter:hover {
  color: var(--brand-dark);
}

.series-filter small {
  color: var(--muted);
}

.contact-box {
  margin-top: 18px;
  padding: 14px;
  background: #fff8ed;
  border: 1px solid #f3d19d;
  border-radius: var(--radius);
}

.contact-box p {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.contact-box a {
  color: var(--brand-dark);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.catalog-main,
.page-wrap {
  min-width: 0;
}

.page-wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 24px auto 54px;
}

.hero-band,
.series-hero,
.product-detail,
.info-panel,
.board-card,
.series-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: stretch;
  padding: 28px;
}

.hero-copy h1,
.series-hero h1,
.product-info h1,
.empty-state h1 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(32px, 4vw, 56px);
}

.hero-copy p:not(.eyebrow),
.series-hero p,
.intro {
  max-width: 740px;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-tools {
  display: grid;
  gap: 14px;
  align-content: center;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(15, 127, 120, 0.12), rgba(216, 132, 22, 0.1)),
    #fbfcfe;
  border: 1px solid #cfdce7;
  border-radius: var(--radius);
}

.hero-tools label,
.compact-search span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c5cfdb;
  border-radius: 8px;
  outline: none;
}

input[type="search"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 127, 120, 0.14);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-grid span {
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(197, 207, 219, 0.8);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.stat-grid strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
}

.series-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 28px;
}

.series-tile {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 18px;
}

.series-tile:hover,
.board-card:hover {
  border-color: #9fb3c8;
  box-shadow: 0 12px 32px rgba(24, 33, 47, 0.1);
  transform: translateY(-1px);
}

.series-tile span,
.board-card p {
  color: var(--muted);
}

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

.section-head h2,
.info-panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.section-head > span {
  color: var(--muted);
  font-weight: 700;
}

.compact-search {
  display: grid;
  gap: 6px;
  width: min(320px, 100%);
}

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

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

.board-card {
  overflow: hidden;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.board-card[hidden] {
  display: none;
}

.board-media {
  display: block;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 20% 10%, rgba(216, 132, 22, 0.14), transparent 30%),
    linear-gradient(145deg, #eff5f8, #ffffff);
  border-bottom: 1px solid var(--line);
}

.board-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
}

.board-card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.board-title-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.board-title-row h3 {
  margin: 0;
  line-height: 1.25;
}

.card-actions,
.buy-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
  border: 1px solid transparent;
}

.primary-action {
  color: #fff;
  background: var(--brand);
}

.primary-action:hover {
  background: var(--brand-dark);
}

.secondary-action {
  color: var(--brand-dark);
  background: #e7f4f2;
}

.ghost-action {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.series-badge {
  padding: 6px 9px;
  color: var(--brand-dark);
  background: #e7f4f2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.crumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.crumbs a {
  color: var(--brand-dark);
  font-weight: 700;
}

.series-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  margin-bottom: 28px;
}

.chip-set,
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-set span,
.tag-row span {
  padding: 7px 10px;
  color: var(--brand-dark);
  background: #e7f4f2;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
}

.product-gallery {
  display: grid;
  place-items: center;
  min-height: 360px;
  background:
    linear-gradient(135deg, rgba(15, 127, 120, 0.08), rgba(216, 132, 22, 0.08)),
    #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-gallery img {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  padding: 20px;
}

.product-info {
  display: grid;
  gap: 16px;
  align-content: center;
}

.product-info h1 {
  font-size: clamp(32px, 4vw, 52px);
}

.selector-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-grid,
.download-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.info-panel {
  padding: 22px;
}

.clean-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 20px;
}

.clean-list li::marker {
  color: var(--brand);
}

.spec-table {
  display: grid;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.spec-row:last-child {
  border-bottom: 0;
}

.spec-row strong,
.spec-row span {
  padding: 12px 14px;
}

.spec-row strong {
  background: #f8fafc;
  border-right: 1px solid var(--line);
}

.download-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.download-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.download-list a:hover {
  border-color: var(--brand);
}

.download-list strong {
  color: var(--brand-dark);
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  width: min(720px, calc(100% - 48px));
  margin: 80px auto;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty-state p {
  color: var(--muted);
}

@media (max-width: 1020px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 12px 18px;
  }

  .top-nav {
    grid-column: 1 / -1;
    order: 3;
  }

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

  .filter-panel {
    position: static;
  }

  .hero-band,
  .series-hero,
  .product-detail {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .site-header {
    min-height: 64px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .catalog-layout,
  .page-wrap,
  .empty-state {
    width: min(100% - 28px, 1180px);
    margin-top: 14px;
  }

  .hero-band,
  .series-hero,
  .product-detail,
  .info-panel {
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .series-strip,
  .board-grid,
  .board-grid.compact,
  .detail-grid,
  .download-layout {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .product-gallery {
    min-height: 260px;
  }

  .spec-row {
    grid-template-columns: 1fr;
  }

  .spec-row strong {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
