/* General styles for the page content, ensuring text color contrasts with body background */
.page-index {
  color: #333333; /* Default text color for light backgrounds */
  background-color: #F5F7FA; /* General background color for the page content area */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  font-size: 17px; /* Base font size */
}

/* Module 1: HERO主图区域 */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Assuming shared.css sets body padding-top, this is a small top margin */
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  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;
}

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

/* ⚠️ 移动端HERO主图防裁切（必读）：禁止 aspect-ratio + object-fit:cover + max-height 限高组合 */
@media (max-width: 849px) {
  .page-index__hero-section {
    padding-top: 10px !important; /* Ensure small 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; /* Crucial for mobile to prevent cropping */
    max-height: none !important;
    display: block !important;
  }
}

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

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.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; /* 最大宽度不超过 300px */
  border-radius: 0; /* 禁止圆角 */
  overflow: hidden;
  background: transparent; /* 禁止背景色 */
  box-shadow: none; /* 禁止阴影 */
  transition: transform 0.3s ease;
}

.page-index__product-card:hover {
  transform: translateY(-3px); /* 轻微上移效果 */
}

.page-index__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__product-card-image {
  width: 100%;
  max-width: 300px; /* 最大宽度不超过 300px */
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* 保持图片原始宽高比 */
  display: block;
  border-radius: 0; /* 禁止圆角 */
}

/* Module 3: 居中装饰主标题 */
.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: #F5F7FA;
}
.page-index__section-title {
  margin: 0;
  font-size: clamp(1.1rem, 4.5vw, 1.75rem); /* Clamp for responsive font size */
  line-height: 1.35;
  color: #E53935; /* Using primary color for H1 */
  font-weight: 700;
  max-width: 800px; /* Limit width to prevent overly long lines */
  text-align: center;
}
.page-index__section-title-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  opacity: 0.6;
  background-color: #E0E0E0; /* Border color */
}

/* Module 4: 长文 SEO 主体 */
.page-index__article-body {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 48px; /* Adjusted padding for better content flow */
  box-sizing: border-box;
  overflow-x: hidden;
  background-color: #F5F7FA; /* Ensure background color for contrast */
  color: #333333; /* Main text color */
}
.page-index__article-body h2 {
  margin: 2rem 0 1rem;
  color: #E53935; /* Primary color for H2 */
  font-size: 28px;
  font-weight: 600;
}
.page-index__article-body h3 {
  margin: 1.25rem 0 0.75rem;
  color: #FF5A4F; /* Secondary color for H3 */
  font-size: 22px;
  font-weight: 600;
}
.page-index__article-body p {
  margin-bottom: 1em;
  font-size: 17px;
  color: #333333;
}
.page-index__article-body ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 1em;
  color: #333333;
}
.page-index__article-body li {
  margin-bottom: 0.5em;
  font-size: 17px;
  color: #333333;
}

.page-index__article-figure {
  margin: 1.5rem auto;
  max-width: 800px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.page-index__article-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 5px; /* Slight border radius for images in article */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Slight shadow */
}
.page-index__article-figure figcaption {
  font-style: italic;
  font-size: 15px;
  color: #666666;
  margin-top: 10px;
}

.page-index__article-quote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #E53935; /* Primary color for quote border */
  background-color: #ffffff; /* White background for quote */
  color: #333333;
  font-style: italic;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.page-index__article-quote p {
  margin-bottom: 0.5em;
  font-size: 18px;
}
.page-index__article-quote-link {
  color: #E53935;
  text-decoration: underline;
  font-weight: bold;
}
.page-index__article-quote-link:hover {
  color: #FF5A4F;
}

/* Static FAQ styles (Module 4, section 7) */
.page-index__faq-static-question {
  margin: 1.5rem 0 0.5rem;
  color: #E53935; /* Primary color for static FAQ questions */
  font-size: 20px;
  font-weight: 600;
}
.page-index__faq-static-answer {
  margin-bottom: 1em;
  font-size: 17px;
  color: #333333;
}

/* CTA Buttons in Article Body and Footer */
.page-index__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 20px;
  margin-top: 40px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-index__cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons don't overflow */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
  text-align: center;
}

.page-index__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: none;
}

.page-index__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-index__btn-secondary {
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
}

.page-index__btn-secondary:hover {
  background: #E53935;
  color: #ffffff;
  transform: translateY(-2px);
}

/* Global image styles for content area (min-size 200x200 enforced via image gen) */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ⚠️ 移动端 @media (max-width: 768px) 必写清单 */
@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.5;
    padding: 0 10px;
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* HERO Section Mobile */
  .page-index__hero-section {
    padding-top: 10px !important;
  }
  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: unset !important;
    object-fit: contain !important;
    max-height: none !important;
  }

  /* Product Display Section Mobile */
  .page-index__products-section {
    padding: 40px 15px;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  .page-index__products-container,
  .page-index__products-grid {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  .page-index__products-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* 移动：2 列 × 3 行 */
    gap: 15px;
  }
  .page-index__product-card,
  .page-index__product-card-image {
    max-width: 100% !important;
    width: 100% !important;
  }
  .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Decorative Main Title Mobile */
  .page-index__section-title-wrap {
    padding: 20px 10px;
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-index__section-title {
    font-size: clamp(1rem, 4.5vw, 1.5rem); /* Adjust clamp for smaller screens */
    line-height: 1.3;
    max-width: calc(100% - 80px); /* Adjust max-width for title with lines */
  }
  .page-index__section-title-line {
    max-width: 40px;
  }

  /* Long SEO Article Body Mobile */
  .page-index__article-body {
    padding: 0 15px 32px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  .page-index__article-body h2 {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    margin: 1.5rem 0 0.8rem;
  }
  .page-index__article-body h3 {
    font-size: clamp(1.1rem, 4.5vw, 1.3rem);
    margin: 1rem 0 0.6rem;
  }
  .page-index__article-body p,
  .page-index__article-body li,
  .page-index__faq-static-question,
  .page-index__faq-static-answer {
    font-size: 16px;
  }
  .page-index__article-figure {
    padding: 0 5px;
  }
  .page-index__article-figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__article-quote {
    margin: 1rem 0;
    padding: 0.8rem 1rem;
    font-size: 16px;
  }
  .page-index__article-quote p {
    font-size: 16px;
  }

  /* Universal Image Responsive for Content Area */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Buttons and Button Containers Mobile */
  .page-index__cta-button,
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index a[class*="button"],
  .page-index a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
    font-size: 16px;
  }
  .page-index__cta-buttons,
  .page-index__button-group,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
    overflow: hidden !important;
  }
}