:root {
  --ink: #17202a;
  --muted: #66727f;
  --line: #dfe5eb;
  --soft: #f6f8fa;
  --blue: #0f5f83;
  --teal: #118b9a;
  --red: #b92035;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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

img {
  display: block;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(223, 229, 235, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 7px;
  background: var(--ink);
  color: white;
  font-weight: 900;
}

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

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

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #3f4b57;
  font-size: 14px;
  white-space: nowrap;
}

.nav > a,
.nav-trigger {
  padding: 27px 0;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% - 8px);
  left: -22px;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 6px;
  min-width: 470px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 20px 52px rgba(20, 30, 42, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.dropdown-menu.list-menu {
  grid-template-columns: 1fr;
  min-width: 260px;
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 6px;
  color: #43505d;
  font-size: 13px;
  font-weight: 800;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background: var(--soft);
  color: var(--teal);
  outline: none;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.quote-button,
.primary,
.contact-form button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 0;
  border-radius: 7px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.ghost {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-weight: 800;
}

main {
  overflow: hidden;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.75fr) minmax(420px, 1.25fr);
  gap: 42px;
  align-items: center;
  padding: 48px 5vw 34px;
  background: linear-gradient(180deg, #f7f9fb, #fff);
}

.home-copy {
  max-width: 620px;
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-copy h1 {
  margin-bottom: 18px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.02;
}

.home-copy p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-media {
  margin: 0;
}

.hero-media img {
  width: 100%;
  max-height: 470px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.home-lines,
.products,
.contact {
  width: min(1420px, 90vw);
  margin: 0 auto;
}

.home-lines {
  padding: 44px 0 28px;
}

.seo-copy {
  display: grid;
  width: min(1420px, 90vw);
  margin: 0 auto;
  padding: 22px 0 40px;
  grid-template-columns: minmax(260px, 0.72fr) minmax(320px, 1fr);
  gap: 34px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.seo-copy h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.12;
}

.seo-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3.3vw, 42px);
  line-height: 1.12;
}

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

.line-card,
.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.line-card:hover,
.line-card:focus-visible,
.product-card:hover,
.product-card:focus-visible {
  border-color: rgba(17, 139, 154, 0.55);
  box-shadow: 0 16px 36px rgba(18, 26, 34, 0.09);
  outline: none;
  transform: translateY(-2px);
}

.line-card {
  display: grid;
  grid-template-rows: 150px auto;
}

.line-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--soft);
}

.line-card div {
  padding: 14px;
}

.line-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.line-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.line-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.focused-grid .line-card {
  grid-template-rows: 230px auto;
  background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

.focused-grid .line-card img {
  padding: 10px;
}

.mini-gallery {
  width: min(1420px, 90vw);
  margin: 8px auto 0;
  padding: 30px 0 22px;
}

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

.mini-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.mini-grid img {
  width: 100%;
  height: 145px;
  object-fit: contain;
  background: var(--soft);
}

.mini-grid figcaption {
  padding: 10px 12px;
  color: #4a5560;
  font-size: 13px;
  font-weight: 800;
}

.products {
  padding: 46px 0 12px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: start;
  width: min(1480px, 94vw);
  margin: 34px auto 60px;
  border-top: 1px solid var(--line);
}

.legacy-sidebar {
  position: sticky;
  top: 92px;
  padding: 24px 28px 28px 0;
}

.legacy-sidebar h1 {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 4px solid var(--red);
  color: var(--red);
  font-size: 24px;
}

.legacy-sidebar nav {
  display: grid;
}

.legacy-sidebar a {
  padding: 13px 8px 13px 22px;
  border-bottom: 1px dashed #cfd6dd;
  color: #4a5560;
  font-size: 15px;
  font-weight: 800;
}

.legacy-sidebar a::before {
  content: "›";
  margin-right: 10px;
  color: var(--red);
  font-weight: 900;
}

.legacy-sidebar a.active,
.legacy-sidebar a:hover,
.legacy-sidebar a:focus-visible {
  color: var(--red);
  outline: none;
}

.legacy-content {
  min-width: 0;
  padding: 22px 0 0 28px;
  border-left: 1px solid var(--line);
}

.legacy-heading {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 4px solid var(--red);
}

.legacy-heading h1 {
  margin-bottom: 0;
  color: var(--red);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  text-transform: uppercase;
}

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

.legacy-product {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  min-height: 178px;
  padding: 10px;
  border: 1px dashed #cbd3dc;
  background: white;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.legacy-product:hover,
.legacy-product:focus-visible {
  border-color: rgba(185, 32, 53, 0.62);
  box-shadow: 0 14px 32px rgba(18, 26, 34, 0.1);
  outline: none;
  transform: translateY(-2px);
}

.legacy-product img {
  width: 100%;
  height: 156px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--soft);
}

.legacy-product h2 {
  margin: 5px 0 14px;
  font-size: 22px;
  line-height: 1.16;
}

.legacy-product p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 15px;
}

.category {
  padding: 30px 0 38px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}

.category-head {
  display: grid;
  grid-template-columns: minmax(230px, 0.36fr) minmax(0, 0.64fr);
  gap: 26px;
  align-items: start;
  margin-bottom: 18px;
}

.category-head h3 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
}

.category-head p {
  margin: 3px 0 0;
  color: var(--muted);
}

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

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

.product-card {
  display: grid;
  grid-template-rows: 190px auto auto;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--soft);
}

.product-card h4 {
  margin: 0;
  padding: 17px 18px 8px;
  font-size: 20px;
  line-height: 1.18;
}

.product-card p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 15px;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 0.75fr);
  gap: 44px;
  margin-top: 36px;
  margin-bottom: 64px;
  padding: 34px;
  border-radius: 8px;
  background: #102334;
  color: white;
}

.contact h2 {
  margin-bottom: 13px;
  font-size: clamp(28px, 4vw, 42px);
}

.contact p {
  color: rgba(255, 255, 255, 0.72);
}

.contact a {
  color: #8fe3ef;
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
}

.contact-form input {
  height: 44px;
  padding: 0 13px;
}

.contact-form textarea {
  resize: vertical;
  padding: 12px 13px;
}

.product-dialog {
  width: min(1180px, calc(100vw - 32px));
  height: calc(100dvh - 32px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(10, 18, 28, 0.34);
}

.product-dialog::backdrop {
  background: rgba(9, 18, 27, 0.62);
}

.product-dialog[open] {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(320px, 1.05fr);
  grid-template-rows: minmax(0, 1fr);
}

.product-dialog img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: var(--soft);
}

.product-dialog > div {
  min-height: 0;
  max-height: 100%;
  padding: 32px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.dialog-specs {
  display: grid;
  gap: 11px;
  margin: 22px 0;
}

.dialog-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.dialog-gallery img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--soft);
}

.dialog-specs .spec-row {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
}

.old-description {
  display: block;
  max-width: 100%;
  overflow: auto;
  color: #4d5661;
  font-size: 15px;
  line-height: 1.58;
}

.old-description p,
.old-description div {
  margin: 0 0 12px;
}

.old-description table {
  width: 100%;
  min-width: 620px;
  margin: 14px 0;
  border-collapse: collapse;
  background: #fff;
}

.old-description td,
.old-description th {
  padding: 9px 10px;
  border: 1px solid #cfd6dd;
  vertical-align: top;
}

.old-description img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 23px 5vw;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .home-hero,
  .category-head,
  .catalog-layout,
  .seo-copy,
  .contact {
    grid-template-columns: 1fr;
  }

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

  .hero-media img {
    max-height: 390px;
  }

  .legacy-sidebar {
    position: static;
    padding-right: 0;
  }

  .legacy-content {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .site-header {
    flex-wrap: wrap;
    padding: 13px 5vw;
  }

  .brand {
    min-width: 0;
  }

  .quote-button {
    width: 100%;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .dropdown-menu {
    left: 0;
    grid-template-columns: 1fr;
    min-width: min(310px, calc(100vw - 34px));
    max-height: 70vh;
    overflow: auto;
  }

  .home-hero {
    padding-top: 30px;
  }

  .line-grid,
  .mini-grid,
  .product-grid,
  .product-grid.compact,
  .legacy-grid,
  .legacy-product,
  .product-dialog[open] {
    grid-template-columns: 1fr;
  }

  .product-dialog[open] {
    grid-template-rows: 220px minmax(0, 1fr);
  }

  .product-dialog > div {
    padding: 24px;
  }

  .line-card {
    grid-template-rows: 180px auto;
  }

  .product-card {
    grid-template-rows: 220px auto auto;
  }

  .legacy-product img {
    height: 220px;
  }

  .contact {
    width: 100%;
    border-radius: 0;
  }

  footer {
    display: grid;
  }
}
