:root {
  --red: #d42a1d;
  --red-dark: #b91f15;
  --black: #000;
  --ink: #1a1a1a;
  --white: #fff;
  --soft: #f7f7f7;
  --line: #ccc;
  --line-strong: #5e5e5e;
  --muted: #757575;
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --shell: 1360px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--black); line-height: 1.25; }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px;
  background: var(--red); color: var(--white); font-weight: 700; transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.site-header { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--black); }
.header-primary { min-height: 88px; display: grid; grid-template-columns: minmax(280px, 1fr) auto auto; align-items: center; gap: 40px; }
.brand-flow { width: max-content; display: flex; align-items: center; gap: 16px; text-decoration: none; }
.logo-box { display: grid; place-items: center; overflow: hidden; background: var(--white); }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.hightac-logo { width: 132px; height: 62px; }
.sidi-logo { width: 66px; height: 66px; }
.flow-arrow { color: var(--red); font-size: 26px; font-weight: 700; }
.primary-tabs { height: 88px; display: flex; align-items: stretch; }
.primary-tabs button {
  position: relative; min-width: 112px; min-height: 44px; padding: 0 20px; border: 0;
  background: transparent; color: var(--black); font-weight: 700; cursor: pointer;
}
.primary-tabs button::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 4px; background: var(--red); transform: scaleX(0); transition: transform 160ms var(--ease); }
.primary-tabs button:hover::after, .primary-tabs button.active::after { transform: scaleX(1); }
.language-switch { display: flex; border: 1px solid var(--black); border-radius: 2px; overflow: hidden; }
.language-switch button { min-width: 64px; min-height: 44px; padding: 0 14px; border: 0; background: var(--white); color: var(--black); font-size: 14px; font-weight: 700; cursor: pointer; }
.language-switch button + button { border-left: 1px solid var(--black); }
.language-switch button.active { background: var(--black); color: var(--white); }
.lang-short { display: none; }

.workspace-head { background: var(--black); color: var(--white); }
.workspace-head-inner { min-height: 128px; display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.workspace-head p { margin-bottom: 8px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.workspace-head h1 { margin-bottom: 0; color: var(--white); font-size: 32px; }
.workspace-head #datasetMeta { margin: 0; color: rgba(255,255,255,.7); font-size: 14px; letter-spacing: 0; text-align: right; }

.workspace-panel { padding-block: 32px 64px; }
.catalogue-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.catalogue-content { min-width: 0; }
.category-rail { position: sticky; top: 112px; max-height: calc(100vh - 136px); overflow: auto; border: 1px solid var(--line); border-radius: 2px; background: var(--white); }
.rail-head { position: sticky; top: 0; z-index: 2; min-height: 48px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; background: var(--black); color: var(--white); }
.rail-head span { min-width: 26px; height: 26px; display: grid; place-items: center; background: var(--red); color: var(--white); font-size: 12px; font-weight: 700; }
.category-list button { width: 100%; min-height: 46px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 13px; border: 0; border-bottom: 1px solid var(--line); background: var(--white); text-align: left; cursor: pointer; }
.category-list button:hover { background: var(--soft); }
.category-list button.active { padding-left: 9px; border-left: 4px solid var(--red); background: var(--black); color: var(--white); }
.category-list button span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.category-list button span:last-child { color: var(--muted); font-size: 11px; }
.category-list button.active span:last-child { color: rgba(255,255,255,.7); }

.filter-bar { position: sticky; top: 104px; z-index: 10; display: grid; grid-template-columns: minmax(0, 1fr) 210px auto; gap: 12px; margin-bottom: 24px; padding: 12px; border: 1px solid var(--line); background: var(--soft); }
.search-field, .select-field { position: relative; display: block; }
.search-field svg { position: absolute; top: 12px; left: 14px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; pointer-events: none; }
.search-field input, .select-field select { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 2px; background: var(--white); color: var(--black); }
.search-field input { padding: 0 16px 0 44px; }
.select-field select { padding: 0 40px 0 14px; }
.search-field input::placeholder { color: var(--muted); }
.search-field input:focus, .select-field select:focus { border-color: var(--red); outline: 3px solid var(--red); outline-offset: 2px; }
.view-switch { display: flex; }
.view-switch button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.view-switch button + button { border-left: 0; }
.view-switch button.active { background: var(--black); color: var(--white); }
.view-switch svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 1.8; }
.results-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--black); }
.results-head h2 { margin: 0; font-size: 24px; }
.results-head p { margin: 0; color: var(--muted); font-size: 13px; }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.product-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 2px; background: var(--white); }
.product-card:hover { border-color: var(--line-strong); }
.product-media { height: 190px; display: grid; place-items: center; padding: 12px; border-bottom: 1px solid var(--line); background: var(--soft); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-card-body { flex: 1; display: flex; flex-direction: column; padding: 18px; }
.product-category { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.product-code { margin-bottom: 8px; color: var(--red-dark); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.product-card h3 { margin: 0 0 8px; font-size: 17px; }
.product-context { display: -webkit-box; margin: 0 0 18px; color: var(--muted); font-size: 14px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.product-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.product-price { color: var(--black); font-size: 17px; font-weight: 700; }
.detail-button { min-height: 44px; padding: 0 14px; border: 1px solid var(--red); border-radius: 2px; background: transparent; color: var(--red-dark); font-size: 13px; font-weight: 700; cursor: pointer; }
.detail-button:hover { background: var(--red); color: var(--white); }
.button-outline { min-height: 44px; padding: 0 22px; border: 2px solid var(--red); border-radius: 2px; background: transparent; color: var(--red-dark); font-weight: 700; cursor: pointer; }
.button-outline:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.load-more-wrap { display: flex; justify-content: center; margin-top: 28px; }

.product-table-wrap, .declaration-table-wrap { overflow: auto; border: 1px solid var(--line); background: var(--white); }
.product-table, .declaration-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.product-table th, .declaration-table th { position: sticky; top: 0; z-index: 2; height: 48px; padding: 10px 14px; background: var(--black); color: var(--white); border-right: 1px solid var(--line-strong); text-align: left; font-size: 13px; }
.product-table td, .declaration-table td { padding: 12px 14px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.product-table tbody tr:nth-child(even), .declaration-table tbody tr:nth-child(even) { background: var(--soft); }
.numeric { text-align: right; white-space: nowrap; }
.table-code { color: var(--red-dark); font-weight: 700; }
.table-detail { min-width: 52px; min-height: 44px; border: 0; background: transparent; color: var(--red-dark); font-weight: 700; cursor: pointer; }

.licence-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 16px; }
.licence-toolbar .search-field { width: min(100%, 520px); }
.licence-toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.declaration-table-wrap { max-height: calc(100vh - 270px); }
.declaration-table { min-width: 1360px; }
.category-link { min-height: 38px; padding: 0 11px; border: 1px solid var(--red); border-radius: 2px; background: transparent; color: var(--red-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.category-link:hover { background: var(--red); color: var(--white); }

.product-dialog { width: min(1120px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--white); }
.product-dialog::backdrop { background: rgba(0,0,0,.78); }
.dialog-shell { position: relative; }
.dialog-close { position: sticky; float: right; top: 12px; right: 12px; z-index: 4; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--black); color: var(--white); font-size: 28px; cursor: pointer; }
.dialog-grid { display: grid; grid-template-columns: minmax(340px, .9fr) 1.1fr; min-height: 560px; }
.dialog-grid.no-media { grid-template-columns: 1fr; min-height: 0; }
.dialog-media { min-height: 420px; display: grid; place-items: center; padding: 24px; background: var(--soft); border-right: 1px solid var(--line); }
.dialog-media.no-image { background: var(--black); }
.dialog-gallery { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dialog-gallery img { width: 100%; height: 220px; object-fit: contain; background: var(--white); }
.dialog-gallery img:only-child { grid-column: 1 / -1; height: 460px; }
.dialog-body { padding: 48px 40px 40px; }
.dialog-category { margin-bottom: 8px; color: var(--red-dark); font-size: 12px; font-weight: 700; }
.dialog-body h2 { margin-bottom: 8px; padding-right: 52px; font-size: 24px; }
.dialog-reference { margin-bottom: 26px; color: var(--muted); }
.spec-list { margin: 0; }
.spec-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 11px 0; border-top: 1px solid var(--line); }
.spec-row dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.spec-row dd { margin: 0; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.noscript { margin: 0; padding: 12px; background: var(--red); color: var(--white); text-align: center; font-weight: 700; }

@media (max-width: 1120px) {
  .header-primary { grid-template-columns: minmax(250px, 1fr) auto auto; gap: 20px; }
  .hightac-logo { width: 112px; }
  .sidi-logo { width: 58px; height: 58px; }
  .primary-tabs button { min-width: 100px; padding-inline: 14px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .header-primary { min-height: 116px; grid-template-columns: 1fr auto; grid-template-rows: 68px 48px; gap: 0 16px; }
  .brand-flow { gap: 9px; }
  .hightac-logo { width: 96px; height: 50px; }
  .sidi-logo { width: 48px; height: 48px; }
  .flow-arrow { font-size: 20px; }
  .primary-tabs { grid-column: 1 / -1; grid-row: 2; height: 48px; margin-inline: -16px; border-top: 1px solid var(--line); }
  .primary-tabs button { flex: 1; min-width: 0; padding-inline: 12px; }
  .primary-tabs button::after { left: 12px; right: 12px; }
  .language-switch { grid-column: 2; grid-row: 1; }
  .language-switch button { min-width: 48px; padding-inline: 10px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .workspace-head-inner { min-height: 96px; }
  .workspace-head h1 { font-size: 26px; }
  .workspace-head #datasetMeta { font-size: 12px; }
  .workspace-panel { padding-block: 20px 40px; }
  .catalogue-layout { grid-template-columns: 1fr; gap: 18px; }
  .category-rail { position: static; width: calc(100% + 32px); max-height: none; margin-inline: -16px; overflow: hidden; border-inline: 0; }
  .rail-head { display: none; }
  .category-list { display: flex; width: 100%; overflow-x: auto; }
  .category-list button { width: auto; min-width: max-content; border-right: 1px solid var(--line); border-bottom: 0; }
  .category-list button.active { padding-left: 13px; border-left: 0; border-bottom: 4px solid var(--red); }
  .filter-bar { position: static; grid-template-columns: minmax(0, 1fr) auto; margin-inline: -16px; margin-bottom: 18px; padding-inline: 16px; border-inline: 0; }
  .select-field { grid-column: 1 / -1; grid-row: 2; }
  .licence-toolbar { display: block; }
  .licence-toolbar p { margin-top: 10px; }
  .declaration-table-wrap { max-height: none; margin-inline: -16px; border-inline: 0; }
}

@media (max-width: 560px) {
  .brand-flow { gap: 5px; }
  .hightac-logo { width: 84px; height: 46px; }
  .sidi-logo { width: 44px; height: 44px; }
  .language-switch button { min-width: 44px; padding-inline: 7px; }
  .workspace-head-inner { align-items: center; }
  .workspace-head #datasetMeta { max-width: 140px; }
  .product-grid { grid-template-columns: 1fr; gap: 14px; }
  .product-media { height: 210px; }
  .results-head h2 { font-size: 21px; }
  .results-head p { text-align: right; }
  .dialog-grid { grid-template-columns: 1fr; }
  .dialog-media { min-height: 260px; max-height: 420px; border-right: 0; border-bottom: 1px solid var(--line); }
  .dialog-gallery img, .dialog-gallery img:only-child { height: 260px; }
  .dialog-body { padding: 32px 20px; }
  .spec-row { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
