/* 往台 · 导航 v4 — 单行顶栏 + 透明叠放 */

/* ── 覆盖 Exomac 遗留 header 规则（最小范围） ── */
body.wt-page-home .header-section,
body.wt-page-home .header-section.header-transparent {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

body.wt-page-home .header-section .header-inner,
body.wt-page-home .header-section.header-transparent .header-inner {
  min-height: 0 !important;
  height: auto !important;
  background: transparent !important;
  background-color: transparent !important;
}

.wt-header.header-section {
  min-height: 0 !important;
  border-bottom: none !important;
}

.wt-header .header-inner.wt-header__bar {
  display: block !important;
  min-height: 0 !important;
  background: transparent !important;
  align-items: unset !important;
}

.wt-header.header-section.is-sticky .header-inner {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  background: transparent !important;
  animation: none !important;
  box-shadow: none !important;
}

.wt-header .header-logo a {
  max-width: none !important;
}

.wt-header .header-logo a img {
  padding: 0 !important;
}

.wt-header .site-main-menu {
  margin-left: 0 !important;
  flex-wrap: nowrap !important;
}

@media (min-width: 1200px) {
  .wt-header .site-main-menu {
    display: block !important;
  }
}

.wt-header .header-mobile-menu-toggle .toggle {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* ── 顶栏结构 ── */
.wt-header {
  position: relative;
  z-index: 200;
}

.wt-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wt-wine-deep) 0%, var(--wt-wine) 35%, var(--wt-brass) 50%, var(--wt-wine) 65%, var(--wt-wine-deep) 100%);
  z-index: 5;
  pointer-events: none;
}

body.wt-page-home .wt-header::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
}

body.wt-page-home .wt-header:not(.wt-header--solid) {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  z-index: 300;
}

.wt-page-home .wt-header:not(.wt-header--solid) .wt-header__inner::after {
  display: none;
}

body.wt-page-home .wt-header.header-section.header-transparent {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
}

body.wt-page-home .wt-header.header-section.header-transparent .header-inner {
  min-height: 0 !important;
  height: auto !important;
  background-color: transparent !important;
  background: transparent !important;
}

.wt-page-home .wt-header {
  margin: 0;
  padding: 0;
  background: transparent !important;
}

.wt-page-home .wt-header.wt-header--solid {
  position: sticky !important;
  top: 0;
  z-index: 300;
}

.wt-page-home .wt-header.header-section {
  min-height: 0 !important;
  height: auto;
  border-bottom: none !important;
}

.wt-page-home .wt-header .header-inner,
.wt-page-home .wt-header .header-inner.wt-header__bar {
  min-height: 0 !important;
  background-color: transparent !important;
  background: transparent !important;
}

.wt-page-home .wt-header.wt-header--solid,
.wt-inner-page .wt-header {
  position: sticky;
  top: 0;
  z-index: 300;
}

body.wt-inner-page .wt-header.header-section.header-transparent {
  position: sticky !important;
  top: 0 !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.wt-inner-page .wt-header.header-section.header-transparent .header-inner {
  min-height: 0 !important;
  height: auto !important;
}

.wt-header__bar {
  position: relative;
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

/* 首页透明态：无灰底，仅底缘渐变线与轻微向下淡出 */
.wt-page-home .wt-header:not(.wt-header--solid) .wt-header__bar {
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: none !important;
}

.wt-page-home .wt-header:not(.wt-header--solid) .wt-header__bar::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 252, 248, 0.18) 22%,
    rgba(196, 165, 116, 0.42) 50%,
    rgba(255, 252, 248, 0.18) 78%,
    transparent 100%
  );
}

/* 滚动后 / 内页：磨砂实底 */
.wt-header.wt-header--solid .wt-header__bar,
.wt-inner-page .wt-header__bar,
.mobile-menu-open .wt-header__bar {
  background: rgba(255, 252, 248, 0.98) !important;
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid rgba(229, 223, 214, 0.85);
  box-shadow: 0 4px 24px rgba(16, 20, 24, 0.05);
}

.wt-header__container {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.wt-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  min-height: var(--wt-header-h, 76px);
  padding: 8px 0;
}

.wt-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.35rem, 1vw, 0.85rem);
  min-width: 0;
  margin-left: auto;
}

.wt-header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.wt-header__logo img {
  display: block;
  max-height: 44px;
  width: auto;
  filter: brightness(0) saturate(100%) invert(17%) sepia(38%) saturate(980%) hue-rotate(322deg) brightness(0.76) contrast(1.06);
  transition: filter 0.35s ease, max-height 0.2s ease;
}

/* 首页轮播上方：原色白 logo */
.wt-page-home .wt-header:not(.wt-header--solid) .wt-header__logo img {
  filter: none;
}

.wt-header__nav {
  min-width: 0;
  overflow: hidden;
}

.wt-header__menu,
.wt-header .site-main-menu > ul {
  flex-wrap: nowrap !important;
  justify-content: flex-end;
  align-items: center;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

@media (min-width: 1200px) {
  .wt-header__menu,
  .wt-header .site-main-menu > ul {
    display: flex !important;
  }
}

.wt-header__menu > li,
.wt-header .site-main-menu > ul > li {
  flex: 0 0 auto;
  position: relative;
}

.wt-header__menu > li + li::before,
.wt-header .site-main-menu > ul > li + li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 10px;
  margin-top: -5px;
  background: rgba(166, 137, 83, 0.38);
  pointer-events: none;
}

.wt-page-home .wt-header:not(.wt-header--solid) .wt-header__menu > li + li::before,
.wt-page-home .wt-header:not(.wt-header--solid) .site-main-menu > ul > li + li::before {
  background: rgba(255, 252, 248, 0.22);
}

.wt-header__menu > li > a,
.wt-header .site-main-menu > ul > li > a {
  display: block;
  padding: 0.45rem 0.78rem !important;
  font-family: var(--wt-font-body);
  font-size: clamp(0.86rem, 0.95vw, 1rem) !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.35 !important;
  color: inherit !important;
  transition: color 0.2s ease;
}

.wt-page-home .wt-header:not(.wt-header--solid) .wt-header__menu > li > a .menu-text,
.wt-page-home .wt-header:not(.wt-header--solid) .site-main-menu > ul > li > a .menu-text {
  color: rgba(255, 252, 248, 0.92) !important;
}

.wt-header.wt-header--solid .wt-header__menu > li > a .menu-text,
.wt-inner-page .wt-header__menu > li > a .menu-text,
.wt-header .site-main-menu > ul > li > a .menu-text {
  color: var(--wt-ink) !important;
}

.wt-header__menu > li > a .menu-text,
.wt-header .site-main-menu > ul > li > a .menu-text {
  position: relative;
  display: inline-block !important;
  align-items: unset !important;
  padding-bottom: 3px;
}

.wt-header__menu > li > a .menu-text::after,
.wt-header .site-main-menu > ul > li > a .menu-text::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--wt-brass);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.wt-header__menu > li:hover > a .menu-text::after,
.wt-header__menu > li > a.active .menu-text::after,
.wt-header .site-main-menu > ul > li:hover > a .menu-text::after,
.wt-header .site-main-menu > ul > li > a.active .menu-text::after {
  transform: scaleX(1);
}

.wt-page-home .wt-header:not(.wt-header--solid) .wt-header__menu > li:hover > a .menu-text {
  color: var(--wt-white) !important;
}

.wt-header__menu > li > a.active .menu-text,
.wt-header .site-main-menu > ul > li > a.active .menu-text {
  color: var(--wt-brass-light) !important;
}

.wt-inner-page .wt-header__menu > li > a.active .menu-text,
.wt-header.wt-header--solid .wt-header__menu > li > a.active .menu-text {
  color: var(--wt-wine) !important;
}

.wt-header__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-shrink: 0;
}

.wt-header__cta {
  display: none;
  align-items: center;
  padding: 0.48rem 1rem;
  font-family: var(--wt-font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--wt-white) !important;
  text-decoration: none;
  background: var(--wt-wine);
  border: 1px solid var(--wt-wine);
  border-radius: var(--wt-radius);
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.wt-page-home .wt-header:not(.wt-header--solid) .wt-header__cta {
  background: rgba(107, 29, 40, 0.5);
  border-color: rgba(255, 252, 248, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.wt-header__cta:hover {
  background: var(--wt-wine-deep);
  border-color: var(--wt-wine-deep);
  box-shadow: 0 4px 14px rgba(74, 18, 25, 0.22);
}

.wt-page-home .wt-header:not(.wt-header--solid) .wt-header__cta:hover {
  background: var(--wt-wine);
  border-color: var(--wt-wine);
}

.wt-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 252, 248, 0.38);
  border-radius: var(--wt-radius);
  background: rgba(16, 20, 24, 0.22);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.wt-menu-toggle:hover {
  background: rgba(16, 20, 24, 0.35);
  border-color: rgba(255, 252, 248, 0.55);
}

.wt-menu-toggle__bars {
  position: relative;
  width: 16px;
  height: 12px;
}

.wt-menu-toggle__bar {
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: var(--wt-white);
  border-radius: 1px;
  transition: transform 0.3s ease, top 0.3s ease, opacity 0.2s ease, width 0.2s ease;
}

.wt-menu-toggle__bar:nth-child(1) { top: 0; }
.wt-menu-toggle__bar:nth-child(2) { top: 5px; width: 11px; }
.wt-menu-toggle__bar:nth-child(3) { top: 10px; }

.wt-header.wt-header--solid .wt-menu-toggle,
.wt-inner-page .wt-menu-toggle {
  border-color: var(--wt-fog);
  background: var(--wt-paper);
}

.wt-header.wt-header--solid .wt-menu-toggle:hover,
.wt-inner-page .wt-menu-toggle:hover {
  border-color: rgba(166, 137, 83, 0.45);
  background: var(--wt-white);
}

.wt-header.wt-header--solid .wt-menu-toggle__bar,
.wt-inner-page .wt-menu-toggle__bar {
  background: var(--wt-ink);
}

.mobile-menu-open .wt-menu-toggle {
  background: var(--wt-wine);
  border-color: var(--wt-wine);
}

.mobile-menu-open .wt-menu-toggle__bar { background: var(--wt-white); }

.mobile-menu-open .wt-menu-toggle__bar:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}

.mobile-menu-open .wt-menu-toggle__bar:nth-child(2) { opacity: 0; width: 0; }

.mobile-menu-open .wt-menu-toggle__bar:nth-child(3) {
  top: 5px;
  transform: rotate(-45deg);
}

/* 桌面：单行 logo + 右侧导航/CTA */
@media (min-width: 1200px) {
  .wt-header__cta { display: inline-flex; }
  .wt-menu-toggle { display: none; }

  .wt-header__tools::before {
    content: '';
    width: 1px;
    height: 22px;
    margin-right: 0.1rem;
    background: rgba(166, 137, 83, 0.35);
  }

  .wt-page-home .wt-header:not(.wt-header--solid) .wt-header__tools::before {
    background: rgba(255, 252, 248, 0.22);
  }
}

@media (max-width: 1199.98px) {
  .wt-header__nav,
  .wt-header .site-main-menu,
  .wt-header__menu {
    display: none !important;
  }

  .wt-header__cta {
    display: none !important;
  }

  .wt-header__tools {
    gap: 0;
  }

  .wt-header__inner {
    min-height: 64px;
  }

  .header-mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
  }
}

/* 1200–1400px：收紧间距防换行 */
@media (min-width: 1200px) and (max-width: 1399px) {
  .wt-header__inner {
    gap: 0.55rem;
    min-height: 68px;
  }

  .wt-header__logo img {
    max-height: 40px;
  }

  .wt-header__menu > li + li::before,
  .wt-header .site-main-menu > ul > li + li::before {
    display: none;
  }

  .wt-header__menu > li > a,
  .wt-header .site-main-menu > ul > li > a {
    padding-left: 0.48rem !important;
    padding-right: 0.48rem !important;
    font-size: 0.84rem !important;
    letter-spacing: 0.04em;
  }

  .wt-header__cta {
    padding: 0.45rem 0.88rem;
    font-size: 0.78rem;
  }
}

@media (min-width: 1400px) and (max-width: 1499px) {
  .wt-header__menu > li > a,
  .wt-header .site-main-menu > ul > li > a {
    padding-left: 0.62rem !important;
    padding-right: 0.62rem !important;
    font-size: 0.92rem !important;
  }
}

/* 移动端抽屉 */
@media (max-width: 1199.98px) {
  .site-main-mobile-menu,
  .wt-mobile-menu {
    z-index: 9999 !important;
    background: rgba(16, 20, 24, 0.52) !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: visibility 0.35s ease, opacity 0.35s ease;
  }

  .site-main-mobile-menu-inner,
  .wt-mobile-menu__panel {
    position: relative;
    float: right;
    width: min(400px, 88vw) !important;
    max-width: min(400px, 88vw);
    height: 100%;
    height: 100dvh;
    background: var(--wt-paper) !important;
    background-image: none !important;
    box-shadow: -12px 0 48px rgba(16, 20, 24, 0.14);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .site-main-mobile-menu-inner::before,
  .wt-mobile-menu__panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2;
    background: linear-gradient(90deg, var(--wt-wine-deep) 0%, var(--wt-wine) 35%, var(--wt-brass) 50%, var(--wt-wine) 65%, var(--wt-wine-deep) 100%);
    opacity: 1;
    pointer-events: none;
  }

  .mobile-menu-open #page {
    transform: none !important;
  }

  .mobile-menu-open {
    overflow: hidden;
    touch-action: none;
  }

  .mobile-menu-header,
  .wt-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto !important;
    min-height: 72px;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px 16px !important;
    background: rgba(255, 252, 248, 0.98) !important;
    border-bottom: 1px solid rgba(229, 223, 214, 0.85);
    box-shadow: 0 1px 0 rgba(166, 137, 83, 0.12);
  }

  .mobile-menu-logo a,
  .wt-mobile-menu__logo a {
    display: inline-flex;
    width: auto !important;
    max-width: 148px;
  }

  .mobile-menu-logo img,
  .wt-mobile-menu__logo img {
    display: block;
    max-height: 38px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(17%) sepia(38%) saturate(980%) hue-rotate(322deg) brightness(0.76) contrast(1.06);
  }

  .wt-mobile-menu__close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(166, 137, 83, 0.35);
    border-radius: var(--wt-radius);
    background: var(--wt-white);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }

  .wt-mobile-menu__close-btn:hover,
  .wt-mobile-menu__close-btn:focus-visible {
    border-color: var(--wt-brass);
    background: var(--wt-white);
    transform: scale(1.04);
    outline: none;
  }

  .wt-mobile-menu__close-btn:focus-visible {
    outline: 2px solid rgba(166, 137, 83, 0.45);
    outline-offset: 3px;
  }

  .wt-mobile-menu__close-icon {
    position: relative;
    display: block;
    width: 16px;
    height: 16px;
  }

  .wt-mobile-menu__close-icon::before,
  .wt-mobile-menu__close-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 1.5px;
    background: var(--wt-ink);
    border-radius: 1px;
    transition: background 0.2s ease;
  }

  .wt-mobile-menu__close-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .wt-mobile-menu__close-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .wt-mobile-menu__close-btn:hover .wt-mobile-menu__close-icon::before,
  .wt-mobile-menu__close-btn:hover .wt-mobile-menu__close-icon::after {
    background: var(--wt-wine);
  }

  .mobile-menu-close .toggle i {
    display: none !important;
  }

  .mobile-menu-content,
  .wt-mobile-menu__content {
    height: auto !important;
    padding: 8px 0 calc(env(safe-area-inset-bottom, 0px) + 24px);
  }

  .site-mobile-menu > ul,
  .wt-mobile-nav__list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
  }

  .site-mobile-menu > ul > li,
  .wt-mobile-nav__list > li {
    position: relative;
    border-bottom: 1px solid rgba(229, 223, 214, 0.9);
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .site-mobile-menu > ul > li > a,
  .wt-mobile-nav__list > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 14px 20px !important;
    font-family: var(--wt-font-body);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.35;
    color: var(--wt-ink) !important;
    text-decoration: none;
    border-bottom: none;
    transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
  }

  .site-mobile-menu > ul > li > a .menu-text,
  .wt-mobile-nav__list > li > a .menu-text {
    display: inline !important;
    padding-bottom: 0;
  }

  .site-mobile-menu > ul > li > a.active,
  .site-mobile-menu > ul > li > a:hover,
  .wt-mobile-nav__list > li > a.active,
  .wt-mobile-nav__list > li > a:hover {
    color: var(--wt-wine) !important;
    background: var(--wt-wine-soft);
    padding-left: 24px !important;
  }

  .site-mobile-menu > ul > li:last-child,
  .wt-mobile-nav__list > li:last-child {
    border-bottom: none;
  }
}

/* 桌面端抽屉样式兜底（不应在桌面显示） */
.site-main-mobile-menu {
  background: rgba(16, 20, 24, 0.55) !important;
}

.site-main-mobile-menu-inner {
  background: var(--wt-paper) !important;
  max-width: min(360px, 88vw);
}

.mobile-menu-header {
  border-bottom: 3px solid var(--wt-wine);
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px 16px !important;
}

.site-mobile-menu > ul > li > a {
  padding: 14px 20px !important;
  font-family: var(--wt-font-body);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--wt-ink) !important;
  border-bottom: 1px solid var(--wt-fog);
}

.site-mobile-menu > ul > li > a.active,
.site-mobile-menu > ul > li > a:hover {
  color: var(--wt-wine) !important;
  background: var(--wt-wine-soft);
}

@media (prefers-reduced-motion: reduce) {
  .site-main-mobile-menu,
  .site-main-mobile-menu-inner,
  .wt-menu-toggle__bar,
  .wt-mobile-menu__close-btn {
    transition: none;
  }
}

/* 覆盖 Exomac 旧导航色 */
.wt-header .site-main-menu > ul > li > a.active {
  color: inherit !important;
}

.wt-header .site-main-menu > ul > li:hover > a {
  color: inherit !important;
}
