/* General page styles for .page-index */
.page-index {
  color: #333333; /* Default text color for light background */
  background: #FFFFFF; /* Body background is var(--secondary-color), which is #FFFFFF */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  font-size: 17px; /* Default desktop font size */
  overflow-x: hidden; /* Prevent horizontal scroll for the whole page content */
}

/* Module 1: HERO主图区域 */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Adjusting for shared header offset, small top padding for hero */
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.page-index__hero-image {
  width: 100%;
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

@media (min-width: 850px) {
  .page-index__hero-image img {
    aspect-ratio: 16/5;
    object-fit: cover;
  }
}

/* 🚨 移动端主图防裁切（必读）：禁止 aspect-ratio + object-fit:cover + max-height 限高组合 */
@media (max-width: 849px) {
  .page-index__hero-section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    padding-top: 10px !important; /* Ensure small top padding on mobile */
  }
  .page-index__hero-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: unset !important;
    object-fit: contain !important;
    max-height: none !important;
    display: block !important;
  }
}

/* Module 2: 产品展示图区域 */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  box-sizing: border-box;
  background-color: #f8f8f8; /* Light background for contrast */
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden; /* Ensure no horizontal scroll for container */
}

.page-index__products-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(6, 1fr); /* 桌面：一行 6 张 */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__product-card {
  width: 100%;
  max-width: 300px; /* 每个产品卡片最大宽度 */
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease;
  display: flex; /* Use flex to center image if it's smaller than max-width */
  justify-content: center;
  align-items: center;
}

.page-index__product-card:hover {
  transform: translateY(-3px);
}

.page-index__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  max-width: 300px; /* Ensure link also respects max-width */
}

.page-index__product-card-image {
  width: 100%;
  max-width: 300px; /* Ensure image container also respects max-width */
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* Keep original aspect ratio */
  display: block;
}

@media (max-width: 768px) {
  .page-index__products-section {
    padding: 40px 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-index__products-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-index__products-grid {
    grid-template-columns: repeat(2, 1fr); /* 移动：2 列 × 3 行 */
    gap: 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-index__product-card,
  .page-index__product-card-image,
  .page-index__product-card-link {
    max-width: 100%; /* Important for mobile to prevent overflow */
  }
}

/* Module 3: 居中装饰主标题 (H1) */
.page-index__section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  padding: 24px 12px;
  box-sizing: border-box;
  text-align: center;
  background-color: #FFFFFF;
  color: #333333;
}
.page-index__section-title {
  margin: 0;
  font-size: clamp(1.1rem, 4.5vw, 1.75rem);
  line-height: 1.35;
  color: #26A9E0; /* Brand color for H1 */
  font-weight: 700;
}
.page-index__section-title-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  background-color: #26A9E0; /* Line color matches brand color */
  opacity: 0.6;
}
@media (max-width: 768px) {
  .page-index__section-title-line {
    max-width: 40px;
  }
  .page-index__section-title {
    font-size: clamp(1rem, 5vw, 1.5rem); /* Adjust font size for mobile */
    padding: 0 5px; /* Add some horizontal padding */
  }
}

/* Module 4: 长文 SEO 主体 */
.page-index__article-body {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 48px; /* Added horizontal padding for desktop */
  box-sizing: border-box;
  overflow-x: hidden;
  background-color: #FFFFFF;
  color: #333333;
}
.page-index__article-body h2 {
  margin: 2.5rem 0 1.25rem;
  font-size: 2.2em;
  color: #26A9E0; /* Brand color for H2 */
  font-weight: 600;
}
.page-index__article-body h3 {
  margin: 1.5rem 0 0.8rem;
  font-size: 1.6em;
  color: #26A9E0; /* Brand color for H3 */
  font-weight: 500;
}
.page-index__article-body p {
  margin-bottom: 1em;
  font-size: 1em;
}
.page-index__article-body ul {
  margin-bottom: 1em;
  padding-left: 25px;
  list-style-type: disc;
}
.page-index__article-body li {
  margin-bottom: 0.5em;
}
.page-index__article-body a {
  color: #26A9E0; /* Link color matches brand color */
  text-decoration: underline;
}
.page-index__article-body a:hover {
  text-decoration: none;
  opacity: 0.8;
}

.page-index__article-figure {
  margin: 2rem auto;
  max-width: 800px;
  text-align: center;
  background-color: #f8f8f8; /* Light background for figure */
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}