/* ===========================================================
   components.css — 新增组件样式
   加载顺序在 styles.css 之后，同优先级规则以此文件为准
   =========================================================== */

/* ── 1. 顶部导航：5 项后的间距收敛 + 语言下拉 + 购物车图标 ── */
.site-header nav {
  gap: clamp(15px, 2.1vw, 30px);
  font-size: .86rem;
  white-space: nowrap
}

.lang-wrap {
  position: relative
}

.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 7px 11px;
  border-radius: 30px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
  transition: background .22s ease
}

.lang:hover,
.lang[aria-expanded="true"] {
  background: rgba(48, 51, 39, .07)
}

.globe {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round
}

/* 语言代码定宽：ID / EN / 中文 切换时按钮不再改变宽度，消除抖动 */
.lang-code {
  flex: none;
  min-width: 2.3em;
  text-align: center;
  font-variant-numeric: tabular-nums
}

.lang .chev {
  width: 9px;
  height: 6px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .55;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transition: transform .28s cubic-bezier(.34, 1.24, .64, 1), opacity .2s ease
}

.lang[aria-expanded="true"] .chev {
  transform: rotate(180deg);
  opacity: .9
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 196px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px;
  display: grid;
  gap: 2px;
  box-shadow: 0 20px 44px -16px rgba(48, 51, 39, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-7px);
  transition: opacity .24s ease, transform .24s ease, visibility .24s;
  z-index: 60
}

/* 展开状态统一由 JS 的 .open 控制（键盘聚焦打开也在 JS 里处理），
   避免鼠标点选后焦点仍留在菜单内导致 CSS 无法收起、再次点击时闪一下 */
.lang-menu.open {
  opacity: 1;
  visibility: visible;
  transform: none
}

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: .8rem;
  transition: background .2s ease, color .2s ease
}

.lang-menu a:hover {
  background: rgba(232, 137, 61, .13);
  color: var(--deep)
}

.lang-menu b {
  flex: none;
  min-width: 32px;
  font-size: .72rem;
  letter-spacing: .05em;
  color: var(--deep)
}

.bag {
  display: flex;
  align-items: center;
  gap: 7px
}

.bag-icon {
  width: 21px;
  height: 21px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round
}

.bag b {
  margin-left: 0
}

/* ── 2. Hero 轮播 ────────────────────────────────────────── */
.hero {
  background: #efe6d7
}

.hero-swiper {
  width: 100%;
  height: 100%
}

.hero-slide {
  position: relative;
  overflow: hidden
}

.hero-slide>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center
}

.hero-slide--mom>img {
  object-position: center
}

.hero-copy {
  z-index: 3
}

.hero-shade {
  z-index: 2
}

/* 产品宣传图自带文案，不能裁切 —— 用同图模糊做背景，完整展示 */
.hero-slide--product {
  background: #f3e9dc
}

.hero-slide--product::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: var(--slide-bg);
  background-size: cover;
  background-position: center;
  filter: blur(38px) saturate(1.15);
  opacity: .85
}

.hero-slide--product>img {
  object-fit: contain;
  z-index: 2
}

.hero-swiper .swiper-pagination {
  bottom: 28px;
  left: 7.5vw;
  width: auto;
  display: flex;
  gap: 9px;
  align-items: center
}

.hero-swiper .swiper-pagination-bullet {
  width: 9px;
  height: 9px;
  background: rgba(48, 51, 39, .32);
  opacity: 1;
  border-radius: 50%;
  transition: .3s ease
}

.hero-swiper .swiper-pagination-bullet-active {
  background: var(--orange);
  width: 28px;
  border-radius: 20px
}

.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 250, 242, .88);
  color: var(--ink);
  box-shadow: 0 10px 24px -10px rgba(48, 51, 39, .45);
  transition: background .26s ease, color .26s ease, transform .26s ease
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
  background: var(--orange);
  color: #fff;
  transform: scale(1.06)
}

.hero-swiper .swiper-button-prev:after,
.hero-swiper .swiper-button-next:after {
  font-size: 15px;
  font-weight: 700
}

.hero-swiper .swiper-button-prev {
  left: 18px
}

.hero-swiper .swiper-button-next {
  right: 18px
}

.hero-note {
  z-index: 4
}

/* ── 3. 优势图标：放大 + 居中 + 圆形底托 ──────────────────── */
.feature {
  text-align: center;
  padding: 46px 3vw 52px
}

.feature-ico {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: rgba(232, 137, 61, .12);
  display: grid;
  place-items: center;
  transition: background .4s ease, transform .4s ease
}

.feature:hover .feature-ico {
  background: rgba(232, 137, 61, .2);
  transform: translateY(-5px)
}

.feature svg {
  width: 46px;
  height: 46px;
  margin: 0;
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round
}

.feature h3 {
  margin: 0 0 8px
}

.feature p {
  margin: 0 auto;
  max-width: 30ch
}

.feature-no {
  right: 16px;
  top: 16px
}

/* ── 4. 评价区：非对称杂志式排版 ─────────────────────────── */
.testimonial {
  background: var(--paper);
  padding: 110px 7vw;
  text-align: left
}

.testi-inner {
  max-width: 1240px;
  margin: 0 auto
}

.testi-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 42px
}

.testi-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: 1.06;
  font-size: clamp(2.2rem, 4vw, 4rem);
  margin: 0
}

.testi-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px
}

.testi-score b {
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--orange)
}

.testi-score small {
  color: var(--muted);
  font-size: .72rem
}

.tstars {
  color: var(--orange);
  letter-spacing: .14em;
  font-size: .85rem;
  line-height: 1
}

.testi-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px
}

.tcard {
  margin: 0;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform .4s ease, box-shadow .4s ease
}

.tcard:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 44px -24px rgba(48, 51, 39, .34)
}

.tcard.lead {
  grid-row: span 2;
  justify-content: space-between;
  padding: 38px;
  background: var(--ink);
  color: #f7f1e7;
  border-color: transparent
}

.tcard.lead:hover {
  box-shadow: 0 28px 50px -24px rgba(48, 51, 39, .6)
}

.tcard.lead .tstars {
  color: #f2a263
}

.tcard.lead blockquote {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.85rem);
  line-height: 1.4;
  letter-spacing: -.025em;
  color: inherit;
  margin: 14px 0 0
}

.tcard blockquote {
  font-size: .94rem;
  line-height: 1.65;
  margin: 12px 0 0;
  color: var(--ink)
}

.tcard figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto
}

.tav {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: #e9ddc9;
  color: var(--deep);
  display: grid;
  place-items: center;
  font-size: .7rem;
  font-weight: 700
}

.tcard.lead .tav {
  background: var(--orange);
  color: #fff
}

.tcard figcaption b {
  display: block;
  font-size: .85rem
}

.tcard figcaption small {
  display: block;
  font-size: .7rem;
  color: var(--muted)
}

.tcard.lead figcaption small {
  color: #b6b7ad
}

/* ── 5. Berita 资讯动态 ──────────────────────────────────── */
.berita {
  padding: 110px 7vw
}

.berita-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px
}

.berita-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: 1.06;
  font-size: clamp(2.2rem, 4vw, 4rem);
  margin: 0
}

.berita-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line)
}

.berita-list li {
  border-bottom: 1px solid var(--line)
}

.berita-list a {
  display: grid;
  grid-template-columns: 92px 1fr auto 40px;
  gap: 24px;
  align-items: center;
  padding: 26px 6px;
  transition: background .28s ease, padding .28s ease
}

.berita-list a:hover {
  background: rgba(232, 137, 61, .07);
  padding-left: 16px;
  padding-right: 16px
}

.berita-list time {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--deep)
}

.berita-list time b {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1
}

.berita-list time span {
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase
}

.berita-list h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.14rem;
  line-height: 1.35;
  margin: 0 0 6px;
  transition: color .25s ease
}

.berita-list a:hover h3 {
  color: var(--deep)
}

.berita-list p {
  font-size: .83rem;
  color: var(--muted);
  margin: 0;
  max-width: 64ch
}

.berita-list em {
  font-style: normal;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--deep);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 5px 12px;
  white-space: nowrap
}

.berita-list .berita-ar {
  justify-self: end;
  font-size: 1.05rem;
  color: var(--orange);
  transition: transform .28s ease
}

.berita-list a:hover .berita-ar {
  transform: translateX(6px)
}

/* ── Hero 三屏统一文案版式，仅用裁切位置做区分 ─────────── */
@media (min-width:901px) {
  .hero-slide--mom.s2>img {
    object-position: 24% center
  }

  .hero-slide--mom.s3>img {
    object-position: 76% center
  }
}

/* ── 故事区播放按钮 ───────────────────────────────────── */
.story-play {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 9px 20px 9px 10px;
  border: 0;
  border-radius: 40px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 14px 30px -12px rgba(48, 51, 39, .45);
  transition: transform .26s ease, box-shadow .26s ease, color .26s ease
}

.story-play:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(48, 51, 39, .52);
  color: var(--deep)
}

.story-play:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 3px
}

.story-play__ico {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff
}

.story-play__ico svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  margin-left: 2px
}

.story-play__ico::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--orange);
  opacity: 0;
  animation: playPulse 2.8s ease-out infinite
}

@keyframes playPulse {
  0% {
    opacity: .5;
    transform: scale(1)
  }

  70% {
    opacity: 0;
    transform: scale(1.6)
  }

  100% {
    opacity: 0;
    transform: scale(1.6)
  }
}

/* ── 视频弹窗 ─────────────────────────────────────────── */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px
}

.video-modal[hidden] {
  display: none
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 30, 22, .66);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .28s ease
}

.video-modal__box {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: #121310;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .65);
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity .3s ease, transform .3s cubic-bezier(.2, .8, .3, 1)
}

.video-modal.open .video-modal__backdrop {
  opacity: 1
}

.video-modal.open .video-modal__box {
  opacity: 1;
  transform: none
}

.video-modal__frame {
  position: relative;
  aspect-ratio: 16/9;
  background: #000
}

.video-modal__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block
}

.video-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 17, 13, .72);
  color: #fff;
  cursor: pointer;
  transition: background .22s ease, transform .22s ease
}

.video-modal__close:hover {
  background: var(--orange);
  transform: rotate(90deg)
}

.video-modal__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px
}

.video-modal__close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round
}

body.modal-open {
  overflow: hidden
}

/* ── 响应式 ─────────────────────────────────────────────── */
@media (max-width:992px) {
  .header-actions .lang {
    display: flex
  }

  .header-actions {
    gap: 14px
  }

  .hero-slide--mom>img {
    object-position: 65% center
  }

  .testi-grid {
    grid-template-columns: 1fr
  }

  .tcard.lead {
    grid-row: auto
  }

  .berita-list a {
    grid-template-columns: 80px 1fr auto;
    gap: 16px
  }

  .berita-list .berita-ar {
    display: none
  }

  .hero-swiper .swiper-button-prev {
    left: 10px
  }

  .hero-swiper .swiper-button-next {
    right: 10px
  }
}

@media (max-width:768px) {
  .site-header nav {
    gap: 20px
  }

  .lang {
    padding: 6px 8px;
    font-size: .72rem
  }

  .lang-menu {
    min-width: 170px
  }

  .bag-text {
    display: none
  }

  .hero-slide--mom>img {
    object-position: 66% center
  }

  .hero-slide--product::before {
    filter: blur(26px) saturate(1.1)
  }

  .hero-swiper .swiper-button-prev,
  .hero-swiper .swiper-button-next {
    display: none
  }

  .hero-swiper .swiper-pagination {
    bottom: 18px;
    left: 24px
  }

  .feature {
    padding: 34px 14px
  }

  .feature-ico {
    width: 70px;
    height: 70px;
    margin-bottom: 20px
  }

  .feature svg {
    width: 40px;
    height: 40px
  }

  .video-modal {
    padding: 14px
  }

  .video-modal__close {
    top: 6px;
    right: 6px;
    width: 36px;
    height: 36px
  }

  .story-play {
    bottom: 22px;
    padding: 8px 16px 8px 8px;
    font-size: .74rem
  }

  .story-play__ico {
    width: 30px;
    height: 30px
  }

  .testimonial,
  .berita {
    padding: 85px 22px
  }

  .testi-score {
    align-items: flex-start
  }

  .tcard {
    padding: 24px
  }

  .tcard.lead {
    padding: 26px
  }

  .berita-head {
    display: block
  }

  .berita-head a {
    display: inline-block;
    margin-top: 20px
  }

  .berita-list a {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px 4px
  }

  .berita-list em {
    justify-self: start
  }

  .berita-list time b {
    font-size: 1.4rem
  }
}

/* ── 降低动效偏好 ───────────────────────────────────────── */
@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none
  }

  .tcard:hover,
  .feature:hover .feature-ico {
    transform: none
  }

  .story-play__ico::after {
    animation: none
  }
}