/* ===================== 通用样式 ===================== */
body {
  margin: 0;
  font-family: "Inter", Arial, system-ui, sans-serif;
  line-height: 1.6;
  background: #f5f5f5;
}
a {
  text-decoration: none;
}
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #222;
  color: #fff;
  padding: 1rem;
  text-align: center;
  z-index: 10;
}
.header a {
  color: #fff;
  margin: 0 1rem;
}
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #222;
  color: #fff;
  text-align: center;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
}
.main {
  padding: 5rem 1rem 5rem; /* 上右下留白 */
  max-width: 960px;
  margin: 0 auto;
}
.nav-link {
  padding: 8px 16px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}
.nav-link:hover {
  color: #4caf50;
}
.nav-link.active {
  color: #4caf50;
  border-bottom: 2px solid #4caf50;
  font-weight: 600;
} /* 通用按钮 */
.btn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background-color: #0070f3;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.btn:hover {
  background-color: #005bb5;
} /* 页面卡片通用 */
.page {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
details {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}
details[open] {
  background: #f0f8ff;
} /* Hero 通用 */
.hero {
  text-align: center;
  padding: 0rem 1rem;
}
.hero img {
  max-width: 600px;
  margin: 1rem auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.buy-now-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}
.price-tag {
  background-color: #f5f5f5;
  color: #222;
  font-size: 18px;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
} /* ===================== Docs 页面 ===================== */
.docs-layout {
  display: flex;
  justify-content: center; /* 整体居中 */
  gap: 2rem; /* 左右间距 */
  max-width: 1400px; /* 页面最大宽度 */
  margin: 0 auto;
  padding: 2rem 1rem;
} /* 左侧导航栏 */
.sidebar {
  width: 200px; /* 比原来稍宽 */
  flex-shrink: 0;
  background: #f8f8f8;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* 关键：让 sidebar 撑满剩余高度 */
  min-height: calc(
    100vh - 6rem
  ); /* 6rem ≈ header+footer 高度的预留，可根据实际调整 */
  display: flex;
  flex-direction: column;
} /* 左侧导航链接 */
.sidebar a {
  display: block;
  margin: 0.5rem 0;
  color: #0070f3;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.sidebar a:hover {
  text-decoration: underline;
}
.sidebar-menu,
.sidebar-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-menu > li {
  margin: 0.4rem 0;
} /* 二级子菜单缩进 */
.sidebar-menu .submenu {
  margin-left: 1rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(0, 0, 0, 0.05);
}
.sidebar-menu a.active {
  background: #e8f3ff;
  color: #003f8a;
  font-weight: 600;
} /* 右侧正文 */
.content {
  flex: 1;
  max-width: 1000px; /* 增加正文最大宽度 */
  width: 100%;
  background: #fff;
  padding: 2rem;
  padding-bottom: 4rem; /* 给 footer 留空间 */
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
} /* Markdown 页面内部通用样式 */
.content h1,
.content h2,
.content h3,
.content h4 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
.content p {
  margin-bottom: 1rem;
}
.content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
} /* details 折叠块样式 */
details {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}
details[open] {
  background: #f0f8ff;
} /* ===================== 移动端 ===================== */
@media (max-width: 768px) {
  .docs-layout {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .sidebar {
    width: 100%;
    position: static; /* 不再 sticky，避免移动端遮挡正文 */
    margin-bottom: 1rem;
  }
  .content {
    max-width: 100%;
    padding: 1rem;
  }
} /* ===================== Products 页面 ===================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 2rem auto;
}
.product-card {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  max-width: 100%;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}
.product-card img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.product-gallery img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  margin: 0.5rem auto;
  border-radius: 8px;
}
.product-detail,
.products-page {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 5rem; /* 给 footer 留空间 */
} /* 移动端自适应 */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .docs-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    position: static;
    margin-bottom: 1.5rem;
  }
  .content {
    max-width: 100%;
  }
}
