/* ===== layout.css：头部、Hero 轮播、促销条、页脚、浮动按钮 ===== */

/* 头部主行 */
.header { background: #fff; position: relative; z-index: 100; }
.header__main { display: flex; align-items: center; gap: 32px; height: 62px; }
.logo { font-size: 15px; font-weight: 800; letter-spacing: .5px; line-height: 1.15; color: var(--color-dark); }
.logo em { display: block; font-style: normal; font-weight: 400; font-size: 10px; letter-spacing: 2px; }

.header__search { flex: 0 1 480px; margin: 0 auto; display: flex; align-items: center; border: 1px solid #ddd; border-radius: 3px; padding: 0 8px; }
.header__search input { flex: 1; border: 0; outline: none; padding: 8px 6px; font-size: 12px; color: var(--color-text); }
.header__search input::placeholder { color: #aaa; }
.header__search button { background: none; border: 0; cursor: pointer; color: #555; padding: 6px; }
.header__search svg { width: 18px; height: 18px; }

/* 主导航 */
.nav__list { display: flex; gap: 26px; }
.nav__list a {
  display: inline-block;
  padding: 10px 0 12px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .3px;
  color: #222;
}
.nav__list a:hover, .nav__list a.active { color: #000; }
.has-sub > a::after {
  content: "";
  display: inline-block;
  margin-left: 5px;
  border: 3px solid transparent;
  border-top-color: #555;
  transform: translateY(2px);
}
.nav__list > .has-sub { position: relative; }
.nav__sub { display: none; }
@media (min-width: 769px) {
  .nav__sub {
    display: block;
    position: absolute;
    top: 100%;
    left: -8px;
    z-index: 110;
    width: max-content;
    min-width: 140px;
    max-width: 190px;
    padding: 6px 0;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .nav__list > .has-sub:nth-child(4) > .nav__sub { width: 136px; min-width: 136px; }
  .nav__list .nav__sub a {
    display: block;
    padding: 4px 10px;
    overflow: hidden;
    color: #222;
    font-size: 11.667px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .nav__list .nav__sub a:hover { background: #f7f7f7; color: #000; }
  .nav__list > .has-sub:hover > .nav__sub,
  .nav__list > .has-sub:focus-within > .nav__sub,
  .nav__list > .has-sub.is-open > .nav__sub {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav__list > .has-sub:hover > a,
  .nav__list > .has-sub:focus-within > a {
    color: #18a6b5;
    box-shadow: inset 0 -1px #18a6b5;
  }
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #222; margin: 5px 0; }

/* Hero 轮播 */
.hero { position: relative; height: 640px; max-height: 80vh; overflow: hidden; }
.hero__slides, .hero__slide { height: 100%; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
  text-align: left; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
  padding: 0 20px 0 clamp(40px, 9%, 150px);
}
.hero__content h1 { font-size: 44px; font-weight: 500; margin-bottom: 14px; }
.hero__content p { font-size: 16px; font-style: italic; margin-bottom: 30px; }
.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px;
  background: none; border: 0; cursor: pointer; z-index: 3;
}
.hero__arrow::before {
  content: "";
  display: block;
  width: 18px; height: 18px;
  margin: 0 auto;
  border-left: 2px solid #fff;
  border-top: 2px solid #fff;
}
.hero__arrow--prev { left: 24px; }
.hero__arrow--prev::before { transform: rotate(-45deg); }
.hero__arrow--next { right: 24px; }
.hero__arrow--next::before { transform: rotate(135deg); }
.hero__dots { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.hero__dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  transition: background .3s;
}
.hero__dots button.is-active { background: #fff; }

/* 促销滚动条 */
.marquee { background: #7cbcc7; overflow: hidden; padding: 10px 0; }
.marquee__track { display: flex; gap: 80px; width: max-content; animation: marquee 30s linear infinite; }
.marquee__track span { color: #fff; font-size: 18px; font-style: italic; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 页脚 */
.footer { background: var(--color-footer); color: #c9c9c9; font-size: 13px; padding: 60px 0 40px; }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr 1.4fr; gap: 40px; }
.footer__col h4 {
  color: #fff;
  font-size: 13px;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  font-weight: 600;
}
.footer__col li { margin-bottom: 11px; }
.footer__col a:hover { color: #fff; }
.footer__col p { margin-bottom: 18px; line-height: 1.7; }
.footer__social { display: flex; gap: 12px; margin-bottom: 40px; }
.footer__social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700;
}
.footer__social .fb { background: #1877f2; }
.footer__social .yt { background: #ff0000; }
.footer__social .ig { background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); }
.footer__social .tt { background: #111; }
.footer__pay { display: flex; gap: 10px; }
.footer__pay .pay {
  background: #fff; color: #555;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 3px;
}
.footer__news input {
  width: 100%;
  padding: 13px 14px;
  border: 0;
  font-size: 13px;
  outline: none;
  margin-bottom: 14px;
  display: block;
}

/* 浮动按钮 */
.float-wa {
  position: fixed; right: 22px; bottom: 22px;
  width: 52px; height: 52px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  z-index: 90;
}
.float-wa svg { width: 28px; height: 28px; }
.to-top {
  position: fixed; right: 24px; bottom: 88px;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid #cfdee1; border-radius: 50%;
  background: #f8fbfb;
  box-shadow: 0 5px 16px rgba(33, 67, 73, .16);
  color: #397985;
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .25s, background .2s, color .2s, border-color .2s, box-shadow .2s;
  z-index: 90;
}
.to-top svg { width: 20px; height: 20px; transition: transform .2s; }
.to-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top.is-show:hover {
  border-color: #397985;
  background: #397985;
  color: #fff;
  box-shadow: 0 7px 18px rgba(57, 121, 133, .26);
  transform: translateY(-3px);
}
.to-top.is-show:hover svg { transform: translateY(-1px); }
.to-top:focus-visible { outline: 3px solid rgba(57, 121, 133, .25); outline-offset: 3px; }

/* ===== 截图对齐微调 ===== */
.header { border-bottom: 0; }
.header__main { height: 64px; gap: 32px; }
.logo { font-size: 15px; letter-spacing: .5px; }
.logo em { font-size: 11px; letter-spacing: 2px; }
.header__search { flex: 0 1 560px; margin: 0 auto; border: 1px solid #ddd; border-radius: 3px; padding: 0 8px; }
.header__search input { padding: 8px 6px; font-size: 12px; }
.header__search input::placeholder { color: #aaa; }
.nav { border-top: 0; }
.nav__list { gap: 26px; }
.nav__list a { padding: 10px 0 12px; font-size: 12px; font-weight: 400; letter-spacing: .3px; }
.nav__list a:hover, .nav__list a.active { font-weight: 400; }
.hero__content { align-items: flex-start; text-align: left; padding: 0 20px 0 clamp(40px, 10%, 150px); }
.hero__content--center { align-items: center; text-align: center; padding: 0 20px; }
.hero__content--right { padding-left: 56%; padding-right: 0; }
.hero__content h1 { font-size: 44px; font-weight: 500; white-space: nowrap; }
.hero__content p { font-size: 16px; }
.marquee { background: #7bbbc6; padding: 12px 0; }
.marquee__track span { font-size: 17px; font-style: italic; }
/* 品牌 logo 图片 */
.logo img { display: block; height: 50px; width: auto; }
/* 导航对齐参考截图：细线 chevron 箭头 + 紧凑行高 + 右缩进 */
.nav__list { gap: 24px; padding-left: 15px; }
.nav__list a { padding: 7px 0 9px; font-size: 12px; letter-spacing: .3px; color: #333; }
.has-sub > a::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-left: 6px;
  border: 0;
  border-right: 1px solid #666;
  border-bottom: 1px solid #666;
  transform: translateY(-2px) rotate(45deg);
}
/* 导航字号/位置 + 搜索框下划线样式（对齐参考） */
.header__search { border: 0; border-bottom: 1px solid #e4e4e4; border-radius: 0; padding: 0 0 2px; }
.header__search input { padding: 6px 2px; font-size: 12px; }
.header__search input::placeholder { color: #999; }
.header__search button { padding: 4px 2px; }
.header__search svg { width: 17px; height: 17px; color: #555; }
.nav__list { gap: 26px; padding-left: 0; }
.nav__list a { font-size: 15px; font-weight: 500; letter-spacing: 0; color: #333; padding: 8px 0 10px; }