/* ===== 全站基础样式 ===== */
:root {
  --primary: #00979d;
  --primary-dark: #007580;
  --accent: #f75c03;
  --bg: #f7f9fa;
  --text: #2d3436;
  --text-light: #636e72;
  --white: #ffffff;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== 顶部导航 ===== */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.brand .logo {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--white);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-menu { display: flex; gap: 8px; }

.nav-menu a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
  transition: all 0.2s;
}

.nav-menu a:hover, .nav-menu a.active { background: var(--primary); color: var(--white); }

.nav-toggle { display: none; font-size: 1.5rem; cursor: pointer; background: none; border: none; color: var(--text); }

/* ===== Hero 区块 ===== */
.hero {
  position: relative;
  background-color: var(--primary);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  text-align: center;
  padding: 100px 20px;
  overflow: hidden;
}

/* 背景图片遮罩层，保证文字可读 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero h1 { font-size: 2.6rem; margin-bottom: 16px; }

.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 640px; margin: 0 auto 28px; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: #d94f02; transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); margin-left: 12px; }
.btn-outline:hover { background: var(--white); color: var(--primary); }

/* ===== 通用区块 ===== */
.section { padding: 60px 0; }

.section-title { text-align: center; font-size: 1.8rem; margin-bottom: 12px; }

.section-sub { text-align: center; color: var(--text-light); margin-bottom: 40px; }

/* ===== 卡片网格 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

card:hover, .card:hover { transform: translateY(-4px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12); }

.card .card-img {
  height: 140px;
  background: linear-gradient(135deg, #dfe9f0 0%, #c8d8e4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}

.card-body { padding: 18px; }

.card-body h3 { font-size: 1.1rem; margin-bottom: 8px; }

.card-body p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 12px; }

.card-body .tag {
  display: inline-block;
  font-size: 0.75rem;
  background: #e0f2f3;
  color: var(--primary-dark);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ===== 页面横幅 ===== */
.page-banner {
  position: relative;
  background-color: var(--primary);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  text-align: center;
  padding: 60px 20px;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.page-banner > * {
  position: relative;
  z-index: 2;
}

.page-banner h1 { font-size: 2rem; margin-bottom: 8px; }

.page-banner p { opacity: 0.9; }

/* ===== 文章/文档列表 ===== */
.list-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s;
}

.list-item:hover { transform: translateX(4px); }

.list-item h3 { font-size: 1.05rem; margin-bottom: 4px; }

.list-item .meta { font-size: 0.85rem; color: var(--text-light); }

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }

.form-group label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; }

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dfe6e9;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }

/* ===== 页脚 ===== */
.site-footer {
  background: #22313f;
  color: #b2bec3;
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h4 { color: var(--white); margin-bottom: 14px; font-size: 1rem; }

.footer-grid a { display: block; padding: 4px 0; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid #35485a;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 12px 20px;
    box-shadow: var(--shadow);
  }

  .nav-menu.open { display: flex; }

  .nav-toggle { display: block; }

  .hero h1 { font-size: 1.8rem; }

  .btn-outline { margin-left: 0; margin-top: 12px; }
}

/* ===== 优化底图：左侧留给 HTML 标题，右侧保留产品图 ===== */
.page-banner {
  min-height: 220px;
  background-size: cover;
  background-position: right center;
  text-align: left;
  padding: 56px max(20px, calc((100% - 1100px) / 2 + 20px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.page-banner::before {
  background: linear-gradient(90deg, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.18) 40%, rgba(0,0,0,0.05) 72%, rgba(0,0,0,0.02) 100%);
}
.page-banner > h1,
.page-banner > p {
  position: relative;
  z-index: 2;
  max-width: 480px;
  text-align: left;
  /* 重黑色阴影衬字，不用描边 */
  -webkit-text-stroke: 0;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.95),
    0 4px 14px rgba(0, 0, 0, 0.85),
    0 8px 28px rgba(0, 0, 0, 0.75),
    0 0 18px rgba(0, 0, 0, 0.9);
}
.hero {
  background-position: right center;
  background-size: cover;
}
.hero::before {
  background: linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0.12) 100%);
}
.hero h1,
.hero p {
  -webkit-text-stroke: 0;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.95),
    0 4px 14px rgba(0, 0, 0, 0.85),
    0 8px 28px rgba(0, 0, 0, 0.75),
    0 0 18px rgba(0, 0, 0, 0.9);
}
@media (max-width: 640px) {
  /* 手机端改为居中裁切，避免只露出原图右下角 */
  .hero,
  .page-banner {
    background-position: center center;
    background-size: cover;
    text-align: center;
    padding: 52px 20px;
  }
  /* 首页专用手机底图（已裁切芯片主体，避免大片黑区） */
  .hero {
    background-image: var(--hero-bg-mobile, var(--hero-bg)) !important;
    background-position: center center !important;
    min-height: 220px;
  }
  .page-banner {
    min-height: 180px;
    align-items: center;
  }
  .hero::before {
    background: rgba(0, 0, 0, 0.38);
  }
  .page-banner::before {
    background: rgba(0, 0, 0, 0.48);
  }
  .hero h1,
  .hero p,
  .page-banner > h1,
  .page-banner > p {
    max-width: none;
    text-align: center;
    text-shadow:
      0 2px 5px rgba(0, 0, 0, 1),
      0 5px 16px rgba(0, 0, 0, 0.95),
      0 10px 32px rgba(0, 0, 0, 0.85),
      0 0 22px rgba(0, 0, 0, 0.95);
  }
}


.list-item-main { display:flex; align-items:center; gap:14px; min-width:0; flex:1; }
.list-item-thumb { width:64px; height:64px; object-fit:cover; border-radius:6px; flex-shrink:0; }
.list-item-thumb--placeholder { background:#dfe9f0; display:flex; align-items:center; justify-content:center; font-size:1.6rem; line-height:1; }
.list-item-body { min-width:0; flex:1; }
.list-item-body .meta { overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.list-item-action { flex-shrink:0; margin-left:12px; }
.news-content img { max-width:100%; height:auto; display:block; margin:12px 0; }
@media (max-width:640px) {
  .list-item { flex-direction:column; align-items:stretch; gap:12px; }
  .list-item-action { margin-left:0; align-self:flex-start; }
}

/* ===== 产品列表（参考硬件站卡片展示） ===== */
.pd-cat-bar { margin-bottom: 24px; text-align: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.btn.is-dim { opacity: 0.6; }
.product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-grid .product-card.is-folded { display: none; }
.product-grid.is-expanded .product-card.is-folded { display: block; }
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
}
.product-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.product-card-img {
  aspect-ratio: 1 / 1;
  background: #eef3f6;
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: #90a4ae;
}
.product-card-body { padding: 14px 16px 18px; }
.product-card-body h3 { font-size: 1rem; margin-bottom: 6px; line-height: 1.4; min-height: 2.8em; }
.product-card-model { font-size: 0.82rem; color: var(--text-light); margin-bottom: 6px; }
.product-card-body p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== 产品详情（左图右信息 + 资料下载） ===== */
.product-detail { padding-top: 28px; }
.pd-crumb { font-size: 0.9rem; color: var(--text-light); margin-bottom: 20px; }
.pd-crumb a { color: var(--primary); }
.pd-top {
  display: grid;
  grid-template-columns: minmax(360px, 630px) 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 28px;
}
.pd-gallery { width: 100%; }
.pd-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f2f6f8;
  border: 1px solid #e6eef2;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}
.pd-main-empty { color: #90a4ae; font-size: 1rem; }
.pd-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.pd-thumb {
  width: 96px;
  height: 96px;
  padding: 0;
  border: 2px solid transparent;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb.active, .pd-thumb:hover { border-color: var(--primary); }

.pd-title {
  font-size: 1.35rem;
  line-height: 1.45;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 700;
}
.pd-props {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  font-size: 0.95rem;
}
.pd-props th {
  width: 72px;
  text-align: left;
  font-weight: 500;
  color: var(--text-light);
  padding: 6px 8px 6px 0;
  vertical-align: top;
}
.pd-props td { padding: 6px 0; color: var(--text); }
.pd-price { color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.pd-summary {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 8px 0 18px;
  line-height: 1.7;
}
.pd-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 8px; }
.btn-docs-dl {
  display: inline-block;
  min-width: 120px;
  text-align: center;
  padding: 10px 22px;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: #fff;
  font-size: 0.95rem;
  border-radius: 2px;
  transition: all 0.2s;
}
.btn-docs-dl:hover { background: var(--primary); color: #fff; }
.btn-docs-dl.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.pd-back { font-size: 0.9rem; color: var(--text-light); }
.pd-back:hover { color: var(--primary); }

.pd-tabs {
  border-bottom: 1px solid #e5eef2;
  margin-bottom: 18px;
}
.pd-tab {
  display: inline-block;
  padding: 12px 18px;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}
.pd-detail-body {
  background: #fff;
  padding: 8px 0 20px;
  line-height: 1.75;
}
.pd-detail-body img { max-width: 100%; height: auto; display: block; margin: 12px auto; }

@media (max-width: 980px) {
  .pd-top { grid-template-columns: 1fr; gap: 20px; }
  .pd-main { max-width: 630px; margin: 0 auto; }
  .pd-thumbs { justify-content: center; }
}

