/* ===== Banner: 与关于我们页 banner 文字样式/排版一致 ===== */
.page-banner::before {
  display: none;
}

.page-banner h2,
.page-banner p {
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  margin: 0 0 20px;
  font-family: "Microsoft JhengHei UI Light", "Microsoft JhengHei UI", "Microsoft JhengHei", "PingFang SC", sans-serif;
  color: #00A2E9;
}

.page-banner .page-title {
  font-size: 22px;
  line-height: 1;
  margin-top: 0;
  text-align: center;
  font-family: "Source Han Sans SC", "Source Han Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: #00A2E9;
  border-top: none;
  padding-top: 0;
}

/* 标题上方固定 60px 横线 */
.page-banner .page-title::before {
  content: '';
  display: block;
  width: 60px;
  height: 1.5px;
  margin: 0 auto 8px;
  background: #00A2E9;
}

/* ===== 面包屑：公司产品页不显示（含高度） ===== */
.breadcrumb {
  display: none;
}

/* ===== Products Page Layout ===== */
body {
  overflow-x: hidden; /* 移动端溢出兜底：不允许页面出现横向滚动条 */
}

.products-page {
  padding: 40px 0 80px;
  background: var(--bg-gray);
}

.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  align-items: start;
}

/* ===== Sidebar ===== */
.products-sidebar {
  background: var(--bg-white);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.sidebar-header {
  background: linear-gradient(135deg, #e8e8e8, #f5f5f5);
  padding: 20px;
  text-align: center;
}

.sidebar-header h3 {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.sidebar-header p {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 2px;
}

.sidebar-list li {
  border-bottom: 1px solid var(--border);
}

.sidebar-list li:last-child { border-bottom: none; }

.sidebar-list button {
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dark);
  line-height: 1.5;
  transition: var(--transition);
}

.sidebar-list button:hover,
.sidebar-list button.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

/* ===== Product Detail ===== */
.product-detail {
  background: var(--bg-white);
  border-radius: 4px;
  padding: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  min-width: 0; /* 允许内容在窄容器内收缩，避免撑出横向滚动 */
}

.product-detail h2 {
  font-size: 22px;
  color: var(--text-dark);
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary);
}

.product-detail .model-tag {
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 24px;
}

.product-detail .desc {
  font-size: 15px;
  color: var(--text-gray);
  line-height: 1.9;
  margin-bottom: 30px;
  text-align: justify;
}

.product-intro {
  margin-bottom: 28px;
}

.product-intro img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  background: #fafafa;
  border: 1px solid var(--border);
}

.product-section {
  margin-top: 8px;
  margin-bottom: 32px;
}

.product-section:last-child {
  margin-bottom: 0;
}

.product-section h3 {
  font-size: 16px;
  color: var(--text-dark);
  margin: 0 0 16px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
  line-height: 1.5;
}

.product-section h3:last-child {
  margin-bottom: 0;
}

.product-images {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-images img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
}

.product-note {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.7;
}

/* ===== Tables (legacy) ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
}

.data-table th,
.data-table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.data-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}

.data-table tr:nth-child(even) td {
  background: #fafafa;
}

.data-table .sub-header td {
  background: #f0f0f0;
  font-weight: 600;
  color: var(--text-dark);
}

/* ===== Table Scroll ===== */
.table-scroll {
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Chart ===== */
.chart-container {
  margin: 24px 0;
  overflow-x: auto;
  max-width: 100%;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  height: 250px;
  padding: 20px 10px 40px;
  border-left: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  position: relative;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-pair {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 180px;
}

.chart-bar {
  width: 24px;
  border-radius: 3px 3px 0 0;
  transition: height 0.5s ease;
  position: relative;
}

.chart-bar.t20 { background: var(--primary); }
.chart-bar.std { background: #ccc; }

.chart-bar .bar-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-gray);
  white-space: nowrap;
}

.chart-label {
  font-size: 11px;
  color: var(--text-gray);
  text-align: center;
  margin-top: 8px;
  line-height: 1.3;
  max-width: 80px;
}

.chart-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 16px;
  font-size: 13px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend .dot {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

.chart-legend .dot.t20 { background: var(--primary); }
.chart-legend .dot.std { background: #ccc; }

.chart-y-label {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: rotate(-90deg) translateX(50%);
  font-size: 12px;
  color: var(--text-light);
}

@media (min-width: 993px) {
  /* 桌面端（侧栏 280px + 详情列）：图表保留足够宽度，条形组间距舒适 */
  .chart-bars { min-width: 500px; }
}

/* ===== Mobile Sidebar Toggle ===== */
.sidebar-toggle {
  display: none;
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 16px;
}

/* ===== Products Responsive ===== */
@media (max-width: 768px) {
  .page-banner h2,
  .page-banner p {
    font-size: 32px;
  }
}

@media (max-width: 992px) {
  /* minmax(0,1fr) + min-width:0：防止内容（图表等）把列撑宽导致横向溢出 */
  .products-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 移动端：分类默认展开（不再用折叠按钮），重新排版为卡片网格 */
  .sidebar-toggle { display: none; }

  .products-sidebar {
    position: static;
    display: block;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .sidebar-header { display: none; }

  .sidebar-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .sidebar-list li { border-bottom: none; }

  .sidebar-list button {
    width: 100%;
    text-align: center;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 10px;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .sidebar-list button:hover,
  .sidebar-list button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 500;
  }

  .product-detail {
    padding: 24px;
    min-width: 0;
  }
}

@media (max-width: 576px) {
  .page-banner h2,
  .page-banner p { font-size: 24px; }

  .page-banner .page-title { font-size: 18px; }

  /* 分类：2 列卡片，允许标题换行 */
  .sidebar-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .sidebar-list button {
    padding: 10px 8px;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .product-detail { padding: 16px; }
  .product-detail h2 { font-size: 18px; }

  /* 移动端表格：允许长单词在单元格内断行，让表格缩进容器宽度，
     .table-scroll 仅作极端情况下的内部滚动兜底 */
  .data-table {
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .data-table th, .data-table td { padding: 8px; }

  /* 移动端图表：压缩条形/间距，使其在窄屏内完整放下，不出现内部横向滚动 */
  .chart-bars {
    gap: 8px;
    padding-right: 6px;
    padding-left: 6px;
  }
  .chart-bar { width: 16px; }
  .chart-bar-pair { gap: 3px; }
  .chart-label { font-size: 10px; max-width: 60px; }
}
