* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 两页 datasheet 正文统一用色与字号层级 */
:root {
  /* 双栏规格表：左右两列表格共用同一「参数列」比例，竖线对齐 */
  --ds-spec-pair-cat-pct: 46%;
  /* Options 三列表首列（与 colgroup 配合） */
  --ds-spec-opt-cat-pct: 22%;
  /* 系统字体栈：避免 Google Fonts 在国内阻塞首屏（见 js/gtag-lazy.js） */
  --ds-font-sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial,
    'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --ds-ink: #1e293b;
  --ds-body: #334155;
  --ds-muted: #64748b;
  --ds-data: #475569;
  --ds-accent: #b51c21;
  --ds-font-body: 16px;
  --ds-lh-body: 1.5;
  --ds-font-h3: 25px;
  --ds-lh-h3: 1.28;
  --ds-font-table: 15px;
  --ds-lh-table: 1.42;
  --ds-font-cover-h1: 31px;
  --ds-font-cover-h2: 39px;
  /* 相邻规格表之间的垂直间距（全局 .specs-table、双栏 stack、grid 行距等共用） */
  --ds-spec-table-stack-gap: 20px;
  /* 与表格单元格同字号，表头分组行与 th/td 一致 */
  --ds-font-caption: var(--ds-font-table);
  /* 与 all-products.html 产品库左侧一致 */
  --ap-primary: #3b82f6;
  --ap-primary-dark: #5a6fd6;
  --ap-primary-rgb: 102, 126, 234;
  --ap-text-primary: #1f2937;
  --ap-text-secondary: #6b7280;
  --a4-width: 210mm;
  --a4-height: 297mm;
}

body {
  font-family: var(--ds-font-sans);
  line-height: var(--ds-lh-body);
  color: var(--ds-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f3f4f6;
  margin: 0;
  padding: 0;
  gap: 0;
  box-sizing: border-box;
}

/* 与 all-products.html 顶部 .header 一致（限定在 body 直接子级，避免与正文 .header-left 冲突） */
body > header.header.datasheet-app-header {
  background: #fff;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body > header.header.datasheet-app-header .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

body > header.header.datasheet-app-header .logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--ap-primary);
  line-height: 1.2;
}

body > header.header.datasheet-app-header .header-product-name {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  max-width: min(560px, 46vw);
  padding-left: 14px;
  margin-left: 2px;
  border-left: 1px solid #e5e7eb;
  overflow: hidden;
}

body > header.header.datasheet-app-header .header-product-name-model {
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  white-space: nowrap;
}

body > header.header.datasheet-app-header .header-product-name-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--ap-text-secondary);
  line-height: 1.3;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 顶栏仅显示完整产品标题（单行省略） */
body > header.header.datasheet-app-header .header-product-name-full {
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body > header.header.datasheet-app-header .nav-links {
  display: flex;
  gap: 20px;
}

body > header.header.datasheet-app-header .nav-links a {
  text-decoration: none;
  color: var(--ap-text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.3s;
}

body > header.header.datasheet-app-header .nav-links a:hover,
body > header.header.datasheet-app-header .nav-links a.active {
  color: var(--ap-primary);
}

body > header.header.datasheet-app-header .nav-links span {
  font-size: 13px;
  font-weight: 500;
  color: var(--ap-text-secondary);
}

body > header.header.datasheet-app-header .nav-links span.active {
  color: var(--ap-primary);
  cursor: default;
}

body > header.header.datasheet-app-header .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body > header.header.datasheet-app-header .header-toolbar-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body > header.header.datasheet-app-header .header-toolbar-field .toolbar-field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ap-text-secondary);
}

body > header.header.datasheet-app-header .toolbar-select {
  width: auto;
  min-width: 160px;
  max-width: 240px;
  padding: 7px 32px 7px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #fff;
  color: var(--ap-text-primary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.35;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body > header.header.datasheet-app-header .toolbar-select:hover {
  border-color: #cbd5e1;
}

body > header.header.datasheet-app-header .toolbar-select:focus {
  outline: none;
  border-color: var(--ap-primary);
  box-shadow: 0 0 0 3px rgba(var(--ap-primary-rgb), 0.22);
}

body > header.header.datasheet-app-header .toolbar-select:focus-visible {
  outline: none;
}

body > header.header.datasheet-app-header .toolbar-select option {
  background: #fff;
  color: var(--ap-text-primary);
}

body > header.header.datasheet-app-header .btn-primary {
  background: linear-gradient(135deg, var(--ap-primary), var(--ap-primary-dark));
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body > header.header.datasheet-app-header .btn-primary:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

body > header.header.datasheet-app-header .btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

body > header.header.datasheet-app-header .btn-header-ghost {
  background: transparent;
  color: var(--ap-text-secondary);
  border: 1px solid #e5e7eb;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body > header.header.datasheet-app-header .btn-header-ghost:hover:not(:disabled) {
  color: var(--ap-primary);
  border-color: rgba(var(--ap-primary-rgb), 0.35);
  background: rgba(var(--ap-primary-rgb), 0.06);
}

.right-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  justify-content: center;
  padding: 12px 20px 20px;
}

.page-wrapper {
  --page-gutter-x: 40px;
  width: 100%;
  max-width: 1000px;
  background: transparent;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

.document-page {
  width: 100%;
  min-width: 0;
  background: white;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  aspect-ratio: 210 / 297;
  overflow: hidden;
}

.document-page > .header-section {
  flex-shrink: 0;
}

.header-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 300px;
  height: 300px;
  padding-right: var(--page-gutter-x);
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.header-content {
  display: flex;
  background: linear-gradient(135deg, #9a1b1e 0%, #b51c21 50%, #9a1b1e 100%);
  padding: 40px 60px 40px var(--page-gutter-x);
  color: white;
  width: 60%;
  height: 100%;
  box-sizing: border-box;
}

.cover-image-section {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -108px;
  padding: 0 20px 0;
  box-sizing: border-box;
}

.cover-image-section img {
  display: block;
  /* width:50% 在 html2canvas 高 scale 下易与 max-height 冲突导致横向拉伸；用 max-width 保比例 */
  width: auto;
  max-width: 50%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

.header-left {
  flex: 1;
}

.page-wrapper > .document-page:first-child .header-left h1 {
  font-size: var(--ds-font-cover-h1);
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
}

.page-wrapper > .document-page:first-child .header-left h2 {
  font-size: var(--ds-font-cover-h2);
  font-weight: 600;
  line-height: 1.12;
  margin-bottom: 40px;
}

.header-top-row .header-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 40px;
}

.header-top-row .header-right img {
  max-width: 300px;
  max-height: 205px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.header-top-row .header-right .logo {
  font-size: 16px;
  font-weight: 600;
}

.header-top-row .header-right .logo-sub {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}

.document-page > .main-content {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.main-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 40px var(--page-gutter-x) 0;
  box-sizing: border-box;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-font-body);
  line-height: var(--ds-lh-body);
  color: var(--ds-body);
  /* 与第一页正文同一左右内边距；宽表在栏内横向滚动，不撑破对齐 */
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.images-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.images-row img {
  max-width: 48%;
  height: auto;
  border-radius: 4px;
}

.section {
  margin-bottom: 40px;
}

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

/* 第 2 页及以后：主内容首个章节标题与下方表格留白加大；H3 约 60% 宽；logo 与标题首行对齐（多行时不再相对整段垂直居中） */
.page-wrapper > .document-page:not(:first-of-type) .main-content > .section:first-child > .section-title {
  margin-bottom: 34px;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 10px;
}

.page-wrapper > .document-page:not(:first-of-type) .main-content > .section:first-child > .section-title > .line {
  flex-shrink: 0;
}

.page-wrapper > .document-page:not(:first-of-type) .main-content > .section:first-child > .section-title > h3 {
  flex: 0 1 60%;
  width: 60%;
  max-width: 60%;
  min-width: 0;
  box-sizing: border-box;
}

.page-wrapper > .document-page:not(:first-of-type) .main-content > .section:first-child > .section-title > .section-page2-logo-wrap {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: flex-start;
  min-width: 0;
  /* 与 .section-title h3 单行排版高度一致，logo 仅在该带内居中 */
  height: calc(var(--ds-font-h3) * var(--ds-lh-h3));
  box-sizing: border-box;
}

.page-wrapper > .document-page:not(:first-of-type) .main-content > .section:first-child > .section-title > .section-page2-logo-wrap .section-page2-logo {
  width: auto;
  max-width: 150px;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* 仅拓沃科技：第 2 页标题栏 logo 固定高度 20px，宽度随比例 */
html[data-product-company="Beijing Chang Xiang Technology Co., Ltd."] .page-wrapper > .document-page:not(:first-of-type) .main-content > .section:first-child > .section-title {
  align-items: center;
}

html[data-product-company="Beijing Chang Xiang Technology Co., Ltd."] .page-wrapper > .document-page:not(:first-of-type) .main-content > .section:first-child > .section-title > .section-page2-logo-wrap {
  align-self: center;
  height: 20px;
}

html[data-product-company="Beijing Chang Xiang Technology Co., Ltd."] .page-wrapper > .document-page:not(:first-of-type) .main-content > .section:first-child > .section-title > .section-page2-logo-wrap .section-page2-logo {
  width: auto;
  height: 20px;
  max-width: none;
  max-height: none;
}

/* 仅拓沃科技：各页 footer 内 logo 同一尺寸（高度 22px，宽度随比例） */
html[data-product-company="Beijing Chang Xiang Technology Co., Ltd."] .right-content .page-wrapper .footer .footer-logo {
  height: 22px;
  width: auto;
  max-height: 22px;
  max-width: none;
  object-fit: contain;
}

.section-title .line {
  width: 4px;
  height: 28px;
  background: var(--ds-accent);
}

.section-title h3 {
  font-size: var(--ds-font-h3);
  font-weight: 600;
  line-height: var(--ds-lh-h3);
  letter-spacing: -0.01em;
  color: var(--ds-ink);
}

.section-content {
  padding-left: 20px;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.section-content > p {
  margin: 0;
}

.section-content ul {
  list-style: none;
  padding: 0;
}

.section-content li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  text-align: start;
  color: inherit;
  line-height: inherit;
}

.section-content li:last-child {
  margin-bottom: 0;
}

.section-content li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--ds-accent);
  font-weight: 600;
}

.features-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 40px;
  row-gap: 40px;
  align-items: start;
  justify-items: stretch;
  margin-bottom: 40px;
}

.features-grid .section {
  margin-bottom: 0;
}

.features-grid-sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-width: 0;
}

/* separate + 单边线：html2canvas 对 collapse 表格边框常画错，与屏幕/PDF 不一致 */
.specs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: var(--ds-spec-table-stack-gap);
  margin-bottom: 0;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
  font-family: var(--ds-font-sans);
  font-size: var(--ds-font-table);
  line-height: var(--ds-lh-table);
  color: var(--ds-body);
  font-variant-numeric: tabular-nums;
}

.specs-table th,
.specs-table td {
  border: none;
  border-width: 0 1px 1px 0;
  border-style: solid;
  border-color: #d1d5db;
  padding: 10px 16px;
  text-align: left;
  /* 与 caption、分类列一致；覆盖浏览器对 th 的默认缩小 */
  font-size: var(--ds-font-table);
  font-weight: 400;
  vertical-align: middle;
  box-sizing: border-box;
  background-clip: padding-box;
}

.specs-table th:last-child,
.specs-table td:last-child {
  border-right: none;
}

.specs-table tbody tr:last-child td {
  border-bottom: none;
}

/* 由 htp2k054-datasheet.js 根据行数添加：正文超过约 5 行时略缩小字号 */
.specs-table td.specs-cell-compact,
.specs-table th.specs-cell-compact {
  font-size: 12px;
  line-height: 1.38;
}

/* 第一列参数名（.category / .sub-category）：保持与表内主字号一致，不因右侧长文触发 .specs-cell-compact 而缩小 */
.specs-table .category.specs-cell-compact,
.specs-table .sub-category.specs-cell-compact {
  font-size: var(--ds-font-table);
  line-height: var(--ds-lh-table);
}

.specs-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--ds-ink);
}

/* 仅表头第一行（标题行）加深，其余 th 保持浅底 */
.specs-table tr:first-child th {
  background: #d8dfe8;
}

.specs-table thead th.specs-table-caption {
  text-align: center;
  font-size: var(--ds-font-table);
  font-weight: 600;
  line-height: var(--ds-lh-table);
  letter-spacing: 0.02em;
  color: var(--ds-ink);
}

.specs-table .category {
  background: #f1f3f4;
  font-size: var(--ds-font-table);
  line-height: var(--ds-lh-table);
  font-weight: 600;
  color: var(--ds-data);
  width: 120px;
  padding-left: 12px;
  padding-right: 12px;
  vertical-align: middle;
}

.specs-table .sub-category {
  padding-left: 30px;
  background: #fafafa;
  font-size: var(--ds-font-table);
  line-height: var(--ds-lh-table);
  font-weight: 500;
  color: var(--ds-body);
}

.specs-table tbody td:not(.category):not(.sub-category) {
  font-weight: 400;
  color: var(--ds-data);
}

.specs-table td strong {
  font-weight: 500;
  color: inherit;
}

/* 左栏 Introduction + Features 纵向叠放（HT Smallsize 等双栏页） */
.th-features-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

/* 两列「参数 | 取值」规格表：固定布局；首行常为 colspan=2 标题，列宽需由 colgroup 指定否则首列 width 不生效 */
.specs-table.specs-table-pair {
  table-layout: fixed;
  width: 100%;
}

.specs-table.specs-table-pair col.specs-pair-col-label {
  width: var(--ds-spec-pair-cat-pct);
}

.specs-table.specs-table-pair col.specs-pair-col-value {
  width: auto;
}

.specs-table.specs-table-pair .category {
  width: auto;
  min-width: 0;
  max-width: none;
  vertical-align: middle;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.specs-table.specs-table-pair tbody td:not(.category):not(.sub-category) {
  width: auto;
  vertical-align: top;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Options 三列表：首行多为 colspan=3，首列宽用 col 指定 */
.specs-table.specs-options-3col {
  table-layout: fixed;
}

.specs-table.specs-options-3col col.specs-opt-col-label {
  width: var(--ds-spec-opt-cat-pct);
}

.specs-table.specs-options-3col col.specs-opt-col-model {
  width: auto;
}

.specs-table.specs-options-3col .category {
  width: auto;
  min-width: 0;
  vertical-align: middle;
}

.specs-table.specs-options-3col td:not(.category) {
  vertical-align: top;
  line-height: var(--ds-lh-table);
}

/* HT Smallsize 等：Input/Output/Monitoring/Other 四表两列排布 */
.specs-two-col-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 40px;
  row-gap: var(--ds-spec-table-stack-gap);
  align-items: start;
  justify-items: stretch;
  margin-top: 22px;
}

.specs-two-col-grid .specs-table {
  margin-top: 0;
}

.specs-two-col-grid .specs-two-col-stack {
  display: flex;
  flex-direction: column;
  gap: var(--ds-spec-table-stack-gap);
  min-width: 0;
}

/* 两列规格区与下方全宽表（与相邻表间距一致） */
.specs-two-col-grid + .specs-table {
  margin-top: var(--ds-spec-table-stack-gap);
}

/* 个别型号第 2 页规格较密：仅当 .document-page 带此类名时收紧单元格上下与表间距（如 ht-smallsize-1u-embedded） */
.document-page--specs-tight .specs-table th,
.document-page--specs-tight .specs-table td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.document-page--specs-tight .specs-two-col-grid {
  row-gap: 14px;
  margin-top: 18px;
}

.document-page--specs-tight .specs-two-col-grid .specs-two-col-stack {
  gap: 14px;
}

.document-page--specs-tight .specs-two-col-grid + .specs-table {
  margin-top: 14px;
}

/* 规格页内嵌曲线图（如 HT-LFP4850 第 2 页） */
.datasheet-chart-block {
  margin-top: 12px;
}

.datasheet-chart-block img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
}

.datasheet-spec-footnote {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ds-muted);
}

.datasheet-curve-intro {
  margin: 0 0 8px 0;
  font-size: var(--ds-font-body);
  line-height: var(--ds-lh-body);
  color: var(--ds-body);
}

@media (max-width: 900px) {
  .specs-two-col-grid {
    grid-template-columns: 1fr;
    row-gap: var(--ds-spec-table-stack-gap);
  }

  .specs-two-col-grid .specs-two-col-stack {
    gap: var(--ds-spec-table-stack-gap);
  }
}

/* 仅资料页内每页底栏；勿用全局 .footer，以免覆盖官网 body 下的站点页脚 */
.right-content .document-page > .footer {
  flex-shrink: 0;
  margin-top: auto;
}

.right-content .footer {
  background: #016189;
  color: rgba(255, 255, 255, 0.85);
  padding: 10px var(--page-gutter-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.right-content .footer-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.right-content .footer .footer-logo {
  max-height: 48px;
  max-width: 260px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.right-content .footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
}

.right-content .footer-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: flex-end;
  font-style: italic;
  font-size: 14px;
}

.right-content .footer-contact-row span {
  white-space: nowrap;
}

.right-content .footer-company {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  max-width: 520px;
  font-style: italic;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--ds-accent);
  text-decoration: none;
  font-weight: 500;
}

.back-link:hover {
  text-decoration: underline;
}

/* 打印：顶栏「打印」按钮会先截图再在新窗口打印；此处供用户从本页 Ctrl+P 等直接打印 HTML 时仍尽量 A4 对齐 */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  html,
  body {
    margin: 0;
    padding: 0;
    background: #fff;
    /* 与纸张同宽，减少 Chrome 等「缩放适配可打印区域」导致整页变形 */
    width: 210mm !important;
    max-width: 210mm !important;
    margin-left: auto !important;
    margin-right: auto !important;
    height: auto !important;
    min-height: 0 !important;
    transform: none !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body > header.header.datasheet-app-header {
    display: none !important;
  }

  .right-content {
    display: block;
    width: 100%;
    max-width: none;
    padding: 0 !important;
    margin: 0;
    transform: none !important;
  }

  .page-wrapper {
    display: block;
    width: var(--a4-width);
    max-width: var(--a4-width);
    margin: 0;
    gap: 0;
    transform: none !important;
  }

  /* 屏幕上的滚动区在打印时改为自然排版，避免引擎为容纳滚动内容而整体缩放 */
  .main-content {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    max-height: none !important;
  }

  .document-page > .main-content {
    min-height: 0 !important;
  }

  .document-page {
    width: var(--a4-width) !important;
    max-width: var(--a4-width) !important;
    height: var(--a4-height);
    min-height: var(--a4-height);
    max-height: var(--a4-height);
    margin: 0;
    box-sizing: border-box;
    aspect-ratio: unset;
    overflow: hidden;
    box-shadow: none !important;
    border: none;
    border-radius: 0;
    page-break-after: always;
    page-break-inside: avoid;
    break-inside: avoid;
    transform: none !important;
  }

  .document-page:last-of-type {
    page-break-after: auto;
  }
}

/* HT SYS E2201500R48S02 — cover product image slightly lower */
body.product-e2201500r48s02 .cover-image-section {
  margin-top: -76px;
}

/* CR032D048C01 indoor cabinet — cover product image */
body.product-indoor-cabinet .header-top-row {
  min-height: 320px;
  height: 320px;
}

body.product-indoor-cabinet .cover-image-section {
  margin-top: -140px;
}

body.product-indoor-cabinet .cover-image-section img {
  max-width: 48%;
  max-height: 320px;
}

/* Page 1: Introduction / Application Scenario left, Technical Specifications right */
body.product-indoor-cabinet .features-grid {
  column-gap: 32px;
  row-gap: 28px;
  margin-bottom: 24px;
}

body.product-indoor-cabinet .th-features-stack {
  gap: 24px;
}

body.product-indoor-cabinet .features-grid-sidebar .specs-table th,
body.product-indoor-cabinet .features-grid-sidebar .specs-table td {
  padding-top: 7px;
  padding-bottom: 7px;
}

@media (max-width: 900px) {
  body.product-indoor-cabinet .features-grid {
    grid-template-columns: 1fr;
  }
}

/* CT2000A2 outdoor cabinet */
body.product-outdoor-cabinet .header-top-row {
  min-height: 320px;
  height: 320px;
}

body.product-outdoor-cabinet .cover-image-section {
  margin-top: -140px;
}

body.product-outdoor-cabinet .cover-image-section img {
  max-width: 48%;
  max-height: 320px;
}

body.product-outdoor-cabinet .features-grid.outdoor-cabinet-layout {
  column-gap: 32px;
  row-gap: 28px;
  margin-bottom: 24px;
}

body.product-outdoor-cabinet .outdoor-specs-full {
  grid-column: 1 / -1;
}

body.product-outdoor-cabinet .outdoor-specs-full .specs-table {
  margin-top: 0;
}

body.product-outdoor-cabinet .outdoor-specs-full .specs-table th,
body.product-outdoor-cabinet .outdoor-specs-full .specs-table td {
  padding-top: 7px;
  padding-bottom: 7px;
}

body.product-outdoor-cabinet .outdoor-specs-full .specs-table.specs-options-3col .category {
  width: auto;
  min-width: 0;
  max-width: none;
  vertical-align: middle;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

body.product-outdoor-cabinet .outdoor-specs-full .specs-table.specs-options-3col tbody td:not(.category):not(.sub-category) {
  vertical-align: top;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 900px) {
  body.product-outdoor-cabinet .features-grid.outdoor-cabinet-layout {
    grid-template-columns: 1fr;
  }
}