.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #FFFFFF; /* Body background */
}

/* HERO主图区域样式 */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* shared 已给 body 留白：约 10px 级；若 shared 未给 body 留白则改为 var(--header-offset, 120px) */
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Ensure no overflow */
}

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

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

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover; /* Desktop default */
}

@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% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    padding-top: 10px !important; /* Ensure minimal padding top */
  }
  .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;
  }
}

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

.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; /* Each card max width */
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease;
  justify-self: center; /* Center cards in grid cells */
  align-self: center;
}

.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;
  overflow: hidden;
}

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

@media (max-width: 768px) {
  .page-index__products-section {
    padding: 40px 15px !important;
    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 Hàng */
    gap: 15px !important;
  }
  .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;
  }
}

/* 居中装饰主标题样式 */
.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;
}
.page-index__section-title {
  margin: 0;
  font-size: clamp(1.1rem, 4.5vw, 1.75rem); /* H1 font size clamp */
  line-height: 1.35;
  color: #017439; /* Brand color for H1 */
  font-weight: bold;
}
.page-index__section-title-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  opacity: 0.6;
  background-color: #017439; /* Line color */
}
@media (max-width: 768px) {
  .page-index__section-title-wrap {
    padding: 20px 10px !important;
  }
  .page-index__section-title {
    font-size: clamp(1rem, 5vw, 1.5rem) !important;
    line-height: 1.4 !important;
  }
  .page-index__section-title-line {
    max-width: 40px !important;
  }
}

/* 长文 SEO 主体样式 */
.page-index__article-body {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px 48px;
  box-sizing: border-box;
  overflow-x: hidden;
  background-color: #FFFFFF;
}
.page-index__article-body h2 {
  margin: 2rem 0 1rem;
  color: #017439; /* Brand color for H2 */
  font-size: 1.8rem;
  font-weight: bold;
}
.page-index__article-body h3 {
  margin: 1.25rem 0 0.75rem;
  color: #017439; /* Brand color for H3 */
  font-size: 1.4rem;
  font-weight: 600;
}
.page-index__article-body p {
  margin-bottom: 1rem;
  color: #333333;
}
.page-index__article-body ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 1rem;
  color: #333333;
}
.page-index__article-body li {
  margin-bottom: 0.5rem;
  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: 8px; /* Slightly rounded corners for article images */
}
.page-index__article-figure figcaption {
  font-style: italic;
  font-size: 0.9rem;
  color: #666666;
  margin-top: 8px;
}
.page-index__article-quote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #017439; /* Brand color border */
  background-color: #f8f8f8;
  color: #333333;
  font-style: italic;
  font-size: 1.1rem;
}

/* Buttons within article body */
.page-index__btn-primary {
  display: inline-block;
  background-color: #C30808; /* Custom color for Register/Login */
  color: #FFFF00; /* Custom font color for Register/Login */
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin-top: 20px;
  margin-right: 15px;
  border: none;
  cursor: pointer;
  max-width: 100%; /* For mobile responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}
.page-index__btn-primary:hover {
  background-color: #d80a0a;
  color: #ffee00;
}

.page-index__btn-secondary {
  display: inline-block;
  background-color: #FFFFFF;
  color: #017439; /* Brand color */
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  border: 2px solid #017439; /* Brand color border */
  transition: background-color 0.3s ease, color 0.3s ease;
  margin-top: 20px;
  cursor: pointer;
  max-width: 100%; /* For mobile responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}
.page-index__btn-secondary:hover {
  background-color: #017439;
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .page-index__article-body {
    padding: 0 15px 32px !important;
    font-size: 16px !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) !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.8rem !important;
  }
  .page-index__article-body h3 {
    font-size: clamp(1.1rem, 4.5vw, 1.3rem) !important;
    margin-top: 1rem !important;
    margin-bottom: 0.6rem !important;
  }
  .page-index__article-body p,
  .page-index__article-body ul,
  .page-index__article-body li {
    font-size: 15px !important;
  }
  .page-index__article-figure {
    margin: 1rem auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .page-index__article-figure img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  .page-index__article-quote {
    font-size: 1rem !important;
    padding: 0.8rem 1rem !important;
  }

  /* Mobile button adaptations */
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .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;
    margin-left: 0 !important; /* Remove horizontal margin for full width */
    margin-right: 0 !important;
    padding-left: 15px !important; /* Add some padding for content */
    padding-right: 15px !important;
  }

  /* If multiple buttons are in a row, stack them vertically */
  .page-index__article-body .page-index__btn-primary + .page-index__btn-secondary {
    margin-top: 15px !important; /* Add space between stacked buttons */
  }

  /* General image and container rules for mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__container,
  .page-index__products-section,
  .page-index__products-container,
  .page-index__products-grid,
  .page-index__hero-section,
  .page-index__hero-container,
  .page-index__hero-image,
  .page-index__section-title-wrap {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
    padding-left: 15px !important; /* Add padding for content */
    padding-right: 15px !important;
  }
  /* Override specific padding if section has its own */
  .page-index__products-section,
  .page-index__article-body {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}