/* ==========================================================================
   XINHUA · Home Page  (首页专属样式)
   --------------------------------------------------------------------------
   目录 / CONTENTS
   01  Hero 首屏轮播
   02  Trust strip 优势条
   03  About 关于我们 / 工厂
   04  Products 产品分类
   05  Featured 热销产品
   06  Applications 行业应用（卡片组件见 style.css 4.12）
   07  Commitment 我们的承诺
   08  FAQ 常见问题
   09  CTA 联系引导
   10  Responsive 响应式
   --------------------------------------------------------------------------
   约定：只写首页独有的区块；配色 / 间距 / 按钮 / 表单控件一律复用 style.css。
   注：询盘表单已移至「联系我们」页，其全局样式在 style.css 4.9，首页不加载该区块。
   ========================================================================== */

/* ==========================================================================
   01  Hero 首屏轮播
   ========================================================================== */
.hero {
  position: relative;
  background: var(--c-green-900);
  color: var(--c-white);
}

/* --hero-side：给左右贴边箭头留出的横向安全区，避免压住左侧文案 */
.hero__swiper {
  position: relative;
  height: clamp(560px, 76vh, 760px);
  --hero-side: clamp(8px, 4.5vw, 64px);
}

.hero__slide {
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transition: transform 7s linear;
}

.swiper-slide-active .hero__bg {
  transform: scale(1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 32, 20, .92) 0%, rgba(6, 32, 20, .78) 38%, rgba(6, 32, 20, .34) 70%, rgba(6, 32, 20, .12) 100%),
    linear-gradient(180deg, rgba(6, 32, 20, .30) 0%, transparent 28%, rgba(6, 32, 20, .42) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  padding-inline: calc(var(--gutter) + var(--hero-side));
}

.hero__content {
  max-width: 720px;
  padding-block: var(--sp-8);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: var(--fw-extrabold);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-lime);
}

.hero__eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--c-lime);
}

.hero__title {
  margin: 20px 0 22px;
  font-size: clamp(36px, 4.9vw, 50px);
  line-height: 1.08;
  color: var(--c-white);
  letter-spacing: -.035em;
}

.hero__title em {
  font-style: normal;
  color: var(--c-lime);
}

.hero__text {
  max-width: 590px;
  font-size: 18px;
  line-height: 1.78;
  color: rgba(255, 255, 255, .86);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: var(--sp-4);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 14.5px;
  color: rgba(255, 255, 255, .78);
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.hero__meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-lime);
}

/* Swiper 控件：桌面端左右贴边箭头（不显示分页点）
                移动端只显示底部分页点（不显示箭头）—— 显示规则集中在 10 Responsive */
.hero__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero__pagination {
  position: static;
  display: none;
  /* 桌面端隐藏，移动端在响应式里开启 */
  align-items: center;
  justify-content: center;
  /* Swiper 会给容器加满宽修饰类，这里强制居中 */
  gap: 8px;
  width: 100%;
  pointer-events: auto;
}

.hero__pagination .swiper-pagination-bullet {
  width: 30px;
  height: 4px;
  margin: 0 !important;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .45);
  opacity: 1;
  transition: width var(--dur) var(--ease), background var(--dur) var(--ease);
}

.hero__pagination .swiper-pagination-bullet-active {
  width: 56px;
  background: var(--c-lime);
}

/* 贴边切换按钮：固定在轮播左右两侧，垂直居中 */
.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 54px;
  height: 68px;
  display: grid;
  place-items: center;
  background: rgba(6, 32, 20, .42);
  color: var(--c-white);
  font-size: 18px;
  transform: translateY(-50%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), width var(--dur) var(--ease);
}

.hero__arrow:hover {
  background: var(--c-lime);
  color: var(--c-green-900);
  width: 62px;
}

.hero__prev {
  left: 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.hero__next {
  right: 0;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
}

/* ==========================================================================
   02  Trust strip 优势条（上浮压在 Hero 底部）
   ========================================================================== */
.trust-strip {
  position: relative;
  z-index: 5;
  margin-top: -46px;
}

.trust-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.trust-strip__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 26px 24px;
  border-right: 1px solid var(--c-line);
}

.trust-strip__item:last-child {
  border-right: 0;
}

.trust-strip__icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--c-green-100);
  color: var(--c-green-700);
  font-size: 20px;
}

.trust-strip__title {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: var(--fw-bold);
  line-height: 1.35;
}

.trust-strip__desc {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-muted);
}

/* ==========================================================================
   03  About 关于我们 / 工厂
   ========================================================================== */
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: var(--sp-10);
  align-items: center;
}

.about__media {
  position: relative;
  padding: 0 34px 34px 0;
}

.about__media-main {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--r-lg);
}

.about__media-sub {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 6px solid var(--c-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.about__badge {
  position: absolute;
  left: 18px;
  bottom: 74px;
  padding: 16px 20px;
  border-radius: var(--r-sm);
  background: var(--c-lime);
  color: var(--c-green-900);
  box-shadow: var(--shadow-md);
}

.about__badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: var(--fw-extrabold);
  line-height: 1.1;
}

.about__badge span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.about__content .section-head {
  margin-bottom: var(--sp-3);
}

.about__text {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--c-body);
}

.about__actions {
  margin-top: var(--sp-4);
}

/* ==========================================================================
   04  Products 产品分类（Bento 大图 + 四小图）
   ========================================================================== */
.products__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  grid-auto-rows: 270px;
  gap: 20px;
}

.product-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--c-green-900);
  color: var(--c-white);
}

.product-card--feature {
  grid-row: span 2;
}

.product-card:hover {
  color: var(--c-white);
}

.product-card__media {
  position: absolute;
  inset: 0;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.product-card:hover .product-card__media img {
  transform: scale(1.07);
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 32, 20, .04) 24%, rgba(6, 32, 20, .86) 100%);
}

.product-card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 22px 24px;
}

.product-card__index {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: var(--fw-extrabold);
  letter-spacing: .16em;
  color: var(--c-lime);
}

.product-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--fw-bold);
  line-height: 1.25;
}

.product-card--feature .product-card__title {
  font-size: 32px;
}

.product-card--feature .product-card__body {
  padding: 30px;
}

.product-card__desc {
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .76);
}

.product-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: var(--fw-bold);
  color: var(--c-lime);
}

.product-card__more i {
  font-size: 12.5px;
  transition: transform var(--dur) var(--ease);
}

.product-card:hover .product-card__more i {
  transform: translateX(5px);
}

.products__more {
  margin-top: var(--sp-5);
  text-align: center;
}

/* ==========================================================================
   05  Featured 热销产品（图片与文字分离，兼容白底产品图 / 后续任意比例换图）
   ========================================================================== */
.featured {
  border-bottom: 1px solid var(--c-line);
}

.goods-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}

.goods-card {
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.goods-card:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

/* 图区纯白 + contain：白底产品图不会出现白块边界，任意比例也不裁切主体 */
.goods-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  /* padding: 10px; */
  background: var(--c-white);
  border-bottom: 1px solid var(--c-line);
  overflow: hidden;
}

.goods-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--dur-slow) var(--ease);
}

.goods-card:hover .goods-card__media img {
  transform: scale(1.05);
}

.goods-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
}

.goods-card__cat {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: var(--fw-extrabold);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-green-600);
}

.goods-card__title {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: var(--fw-bold);
  line-height: 1.35;
  letter-spacing: -.01em;
}

.goods-card__title a {
  color: var(--c-ink);
}

.goods-card__title a:hover {
  color: var(--c-green-700);
}

.goods-card__spec {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--c-body);
}

.goods-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: var(--fw-bold);
  color: var(--c-green-700);
}

.goods-card__link i {
  font-size: 12.5px;
  transition: transform var(--dur) var(--ease);
}

.goods-card:hover .goods-card__link i {
  transform: translateX(5px);
}

.featured__more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: var(--sp-6);
}

/* ==========================================================================
   07  Commitment 我们的承诺（深色）
   ========================================================================== */
.commitment {
  position: relative;
  overflow: hidden;
  background: var(--c-green-900);
  color: var(--c-white);
}

.commitment::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 214, 74, .13) 0%, rgba(168, 214, 74, 0) 68%);
  pointer-events: none;
}

.commitment__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: var(--sp-10);
  align-items: center;
}

.commitment .section-title {
  color: var(--c-white);
}

.commitment__text {
  max-width: 500px;
  font-size: 16.5px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .72);
}

.commitment__actions {
  margin-top: var(--sp-4);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.value-card {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .055);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.value-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, .09);
  border-color: rgba(168, 214, 74, .35);
}

.value-card__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: rgba(168, 214, 74, .15);
  color: var(--c-lime);
  font-size: 20px;
}

.value-card__title {
  margin: 18px 0 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--fw-bold);
  color: var(--c-white);
}

.value-card__desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .64);
}

/* ==========================================================================
   08  FAQ 常见问题（左文案 + 右侧公共组件 .accordion，样式见 style.css 4.10）
   ========================================================================== */
.faq__inner {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: var(--sp-10);
  align-items: start;
}

.faq__intro .section-head {
  margin-bottom: var(--sp-3);
}

.faq__text {
  max-width: 380px;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--c-body);
}

.faq__actions {
  margin-top: var(--sp-4);
}

/* ==========================================================================
   09  CTA 联系引导（居中的圆角背景图横幅，两个转化按钮）
   ========================================================================== */
.cta-section {
  background: var(--c-white);
}

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--c-green-800) url("../images/cta-bg.jpg") center center / cover no-repeat;
  color: var(--c-white);
}

/* 深色蒙版单独一层：换背景图时不用改文字配色 */
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(6, 32, 20, .60) 0%, rgba(6, 32, 20, .76) 62%, rgba(6, 32, 20, .88) 100%);
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(48px, 6vw, 84px) var(--sp-5);
  text-align: center;
}

.cta-band .eyebrow {
  margin-bottom: 18px;
}

.cta-band__title {
  margin: 0 0 16px;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.16;
  color: var(--c-white);
}

.cta-band__text {
  max-width: 620px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .82);
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: var(--sp-4);
}

.cta-band__note {
  margin: var(--sp-3) 0 0;
  font-size: 14.5px;
  color: rgba(255, 255, 255, .66);
}

.cta-band__note a {
  color: var(--c-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta-band__note a:hover {
  color: var(--c-lime);
}

/* ==========================================================================
   10  Responsive 响应式
   ========================================================================== */
@media (max-width: 1200px) {
  .products__grid {
    grid-auto-rows: 240px;
  }

  .about__inner,
  .commitment__inner,
  .faq__inner {
    gap: var(--sp-8);
  }
}

@media (max-width: 991.98px) {
  .hero__swiper {
    height: 600px;
  }

  /* 小屏取消优势条上浮：避免盖住首屏底部分页点与 meta 文案 */
  .trust-strip {
    margin-top: 68px;
  }

  .hero__content {
    max-width: 620px;
  }

  .hero__text {
    font-size: 17px;
  }

  .trust-strip__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-strip__item:nth-child(2) {
    border-right: 0;
  }

  .trust-strip__item:nth-child(-n+2) {
    border-bottom: 1px solid var(--c-line);
  }

  .about__inner,
  .commitment__inner,
  .faq__inner {
    grid-template-columns: 1fr;
  }

  .about__media {
    max-width: 520px;
  }

  .about__content {
    margin-top: var(--sp-2);
  }

  .products__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 240px;
  }

  .goods-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__swiper {
    --hero-side: 0px;
  }

  .hero__arrow {
    display: none;
  }

  /* 移动端不显示左右箭头 */
  .hero__pagination {
    display: flex;
  }

  /* 移动端显示分页点 */
  .faq__inner {
    gap: var(--sp-4);
  }

  .faq__intro .section-head {
    margin-bottom: var(--sp-2);
  }
}

@media (max-width: 767.98px) {
  .hero__swiper {
    height: 560px;
  }

  .hero__overlay {
    background: linear-gradient(90deg, rgba(6, 32, 20, .92) 0%, rgba(6, 32, 20, .76) 60%, rgba(6, 32, 20, .48) 100%), linear-gradient(180deg, rgba(6, 32, 20, .25), transparent 30%, rgba(6, 32, 20, .45));
  }

  .hero__title {
    font-size: clamp(30px, 8.8vw, 42px);
    margin: 16px 0 18px;
  }

  .hero__text {
    font-size: 16px;
    line-height: 1.7;
  }

  .hero__actions {
    gap: 10px;
  }

  .hero__actions .btn {
    padding: 12px 20px;
    font-size: 14.5px;
  }

  .hero__meta {
    gap: 8px 18px;
    margin-top: var(--sp-3);
    font-size: 13.5px;
  }

  .hero__controls {
    bottom: 22px;
  }

  .trust-strip {
    margin-top: 56px;
  }

  .trust-strip__item {
    padding: 18px 16px;
    gap: 12px;
  }

  .trust-strip__icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .trust-strip__title {
    font-size: 14.5px;
  }

  .trust-strip__desc {
    font-size: 13px;
  }

  .about__media {
    padding-right: 26px;
    padding-bottom: 26px;
  }

  .about__media-sub {
    border-width: 4px;
  }

  .about__badge {
    left: 10px;
    bottom: 52px;
    padding: 12px 16px;
  }

  .about__badge strong {
    font-size: 17px;
  }

  .products__grid {
    grid-auto-rows: 210px;
    gap: 14px;
  }

  .product-card__body {
    padding: 16px 18px;
  }

  .product-card--feature .product-card__body {
    padding: 20px;
  }

  .product-card__title {
    font-size: 18px;
  }

  .product-card--feature .product-card__title {
    font-size: 24px;
  }

  .product-card__desc {
    font-size: 13.5px;
  }

  .goods-grid {
    gap: 16px;
  }

  .goods-card__body {
    padding: 18px 20px 20px;
  }

  .value-grid {
    gap: 14px;
  }

  .value-card {
    padding: 20px;
  }

  .cta-band__inner {
    padding: 44px 24px;
  }
}

@media (max-width: 560px) {
  .hero__swiper {
    height: 540px;
  }

  .hero__meta li:nth-child(3) {
    display: none;
  }

  .trust-strip__grid {
    grid-template-columns: 1fr;
  }

  .trust-strip__item {
    border-right: 0;
    border-bottom: 1px solid var(--c-line);
  }

  .trust-strip__item:nth-child(2) {
    border-bottom: 1px solid var(--c-line);
  }

  .trust-strip__item:last-child {
    border-bottom: 0;
  }

  .products__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }

  .product-card--feature {
    grid-row: span 1;
  }

  .product-card--feature .product-card__title {
    font-size: 23px;
  }

  .goods-grid {
    grid-template-columns: 1fr;
  }

  .value-grid {
    grid-template-columns: 1fr;
  }

  .cta-band__inner {
    padding: 38px 18px;
  }

  .cta-band__actions {
    flex-direction: column;
  }

  .cta-band__actions .btn {
    width: 100%;
  }
}