/* 顶部导航栏组件样式（2026-09-04 设计稿大改版：Figma 节点 275:2891 / 185:1766 / 186:2270 / 275:3096，
   1920 基准——
   · 导航栏：半透明白底 rgba(255,255,255,.8) + backdrop blur 12px、底部分隔线 rgba(196,207,218,.3)、
     栏高 80px、logo 64x44、导航项 14px Medium #0f172a 纯文字无 chevron（面板展开项为 900 字重 #8ac0ea）、
     右侧搜索 + 语言两个圆形图标按钮；
   · Models 巨型菜单：通栏、高度占一屏 calc(100vh - 80px)，左 360px 分类列（80px 行高 32px 字）、
     中 600px 车型单列（72px 行高 32px 字，超高列内滚动）、右侧主推车型大图 + 参数条 + Explore；
   · About / Service 下拉：600px 宽大行面板（72px 行高 32px 字，blur 4px）；
   · 语言面板：globe 图标触发，600px 宽（当前语言行白底蓝字带对勾 + Other Language / Coming soon）。
   通用断点、容器与字号变量复用 css/wuling-responsive.css，本文件只维护导航栏组件自身样式。 */

:root {
  --wuling-header-bg: rgba(255, 255, 255, 0.8);
  --wuling-header-border: rgba(196, 207, 218, 0.3);
  --wuling-header-text: #0f172a;
  --wuling-header-active: #b4cae8;
  --wuling-header-accent: #8ac0ea;
  --wuling-header-deep: #203746;
  --wuling-header-subtext: #374151;
  --wuling-header-muted: #6b7280;
  --wuling-header-faint: #9ca3af;
  --wuling-header-count: #c4cfda;
  --wuling-header-line: #f0f2f5;
  --wuling-header-font: var(--wuling-font-family);
}

/* ===== 头部骨架 ===== */
.wuling-site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--wuling-header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wuling-header-border);
  font-family: var(--wuling-header-font);
}

/* 设计稿 275:2891 的横向排布不是三等分：logo 与导航项成一组靠左
   （logo 容器 102.71px，容器右缘到首个导航项固定 40px），右侧图标组贴容器右缘。
   因此这里不用 space-between，由导航组的 margin-right:auto 撑开右侧空白。 */
.wuling-header-inner {
  display: flex;
  align-items: center;
  height: 80px;
}

.wuling-header-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.wuling-header-logo img {
  display: block;
  width: 64px;
  height: 44px;
}

/* 桌面端按设计稿还原 logo 容器宽度（102.71px）：64x44 图形居中后两侧各 19.2px，
   容器右缘再留 40px 接首个导航项，与画布坐标一致。 */
@media (min-width: 992px) {
  .wuling-header-logo {
    width: 102.71px;
    justify-content: center;
  }
}

/* ===== 桌面导航 ===== */
.wuling-nav {
  align-items: center;
  gap: 40px;
}

/* 桌面端：导航组紧跟 logo（间距 40px），并由 margin-right:auto 把右侧图标组推到容器右缘 */
@media (min-width: 992px) {
  .wuling-nav {
    margin-left: 40px;
    margin-right: auto;
  }
}

.wuling-nav-item {
  position: relative;
}

/* 桌面端让导航项占满 80px 栏高：下拉面板的 top:100% 才会落在设计稿的 header 底边（y=80），
   而不是贴在文字行底部（y=52）后反过来盖住导航条。 */
@media (min-width: 992px) {
  .wuling-nav-item {
    display: flex;
    align-items: center;
    height: 80px;
  }
}

.wuling-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--wuling-header-font);
  font-size: calc(14px * var(--wuling-font-scale, 1));
  font-weight: 500;
  line-height: 20px;
  color: var(--wuling-header-text);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.wuling-nav-link:hover,
.wuling-nav-link:focus {
  color: var(--wuling-header-accent);
  text-decoration: none;
}

/* 面板展开时的活跃导航项：设计稿 186:2270 为 Black(900) 字重 + 品牌蓝 */
.wuling-nav-item.is-open > .wuling-nav-link {
  color: var(--wuling-header-accent);
  font-weight: 900;
}

.wuling-chevron-icon {
  flex: 0 0 auto;
  width: 10px;
  height: 6px;
  background: url("../img/icon-chevron.png") center / contain no-repeat;
  transition: transform 0.2s ease, background-image 0.2s ease;
}

.wuling-nav-item.is-open .wuling-chevron-icon,
.wuling-nav-link:hover .wuling-chevron-icon {
  background-image: url("../img/icon-chevron-active.png");
}

.wuling-nav-item.is-open .wuling-chevron-icon {
  transform: rotate(180deg);
}

/* ===== 右侧圆形图标按钮（搜索 + 全球区域） ===== */
.wuling-header-right {
  align-items: center;
  gap: 24px;
}

.wuling-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.wuling-icon-btn img {
  display: block;
  width: 20px;
  height: 20px;
}

.wuling-icon-btn:hover,
.wuling-icon-btn:focus,
.wuling-lang.is-open .wuling-icon-btn {
  background: rgba(15, 23, 42, 0.06);
}

.wuling-lang-select {
  border: 0;
  background: transparent;
  font-family: var(--wuling-header-font);
  font-size: var(--wuling-fs-tiny);
  letter-spacing: 1.98px;
  text-transform: uppercase;
  color: var(--wuling-header-text);
  cursor: pointer;
}

/* ===== 通用下拉（About / Service，设计稿 186:2310：600px 宽大行面板） ===== */
.wuling-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 600px;
  max-width: calc(100vw - 48px);
  padding: 0;
  background: var(--wuling-header-bg);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1040;
}

.wuling-dropdown-link {
  display: flex;
  align-items: center;
  height: var(--wuling-subnav-panel-row);
  padding: var(--wuling-subnav-panel-pad-y) var(--wuling-subnav-panel-pad-x);
  font-size: var(--wuling-subnav-panel-size);
  font-weight: 500;
  line-height: var(--wuling-subnav-panel-line);
  color: var(--wuling-header-deep);
  white-space: nowrap;
  text-decoration: none;
}

.wuling-dropdown-link:first-child {
  height: var(--wuling-subnav-panel-row-first);
}

.wuling-dropdown-link:hover,
.wuling-dropdown-link:focus {
  color: var(--wuling-header-accent);
  background: #ffffff;
  text-decoration: none;
}

/* ===== Models 巨型菜单（设计稿 185:1766：通栏、高度占一屏，中列超高可滚动） ===== */
.wuling-mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - 80px);
  background:
    linear-gradient(180deg, rgba(138, 192, 234, 0.2) 0%, rgba(255, 255, 255, 0.2) 88.175%),
    rgba(255, 255, 255, 1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
  z-index: 1040;
}

.wuling-mega-inner {
  display: flex;
  align-items: stretch;
  height: 100%;
}

/* 左侧车型分类：360px 宽，80px 大行 */
.wuling-mega-cats {
  flex: 0 0 var(--wuling-models-cats-width);
  display: flex;
  flex-direction: column;
  padding: var(--wuling-models-panel-pad) 0;
}

.wuling-mega-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: var(--wuling-models-row-height);
  padding: 16px clamp(24px, 2.08vw, 40px);
  border: 0;
  background: transparent;
  font-family: var(--wuling-header-font);
  font-size: var(--wuling-fs-model-subnav);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  color: var(--wuling-header-muted);
  cursor: pointer;
}

.wuling-mega-cat .wuling-mega-cat-count {
  flex: 0 0 auto;
  min-width: 40px;
  text-align: center;
  color: var(--wuling-header-deep);
  opacity: 0.3;
}

.wuling-mega-cat.is-active,
.wuling-mega-cat:hover {
  background: rgba(196, 207, 218, 0.5);
  font-weight: 600;
  color: var(--wuling-header-deep);
}

/* 中间车型链接列：600px 宽，内容超出一屏时列内滚动 */
.wuling-mega-models {
  flex: 0 0 var(--wuling-models-list-width);
  min-height: 0;
  padding: var(--wuling-models-panel-pad) 0;
  background: rgba(255, 255, 255, 0.2);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(32, 55, 70, 0.25) transparent;
}

.wuling-mega-model {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--wuling-models-row-height);
  padding: 16px clamp(24px, 2.08vw, 40px);
  font-size: var(--wuling-fs-model-subnav);
  font-weight: 500;
  line-height: 1.35;
  color: var(--wuling-header-deep);
  white-space: nowrap;
  text-decoration: none;
}

.wuling-mega-model .wuling-mega-model-arrow {
  flex: 0 0 auto;
  width: 80px;
  height: 10px;
  opacity: 0;
  background: url("../img/icon-arrow-link.png") center / contain no-repeat;
}

.wuling-mega-model:hover,
.wuling-mega-model:focus {
  background: #ffffff;
  font-weight: 600;
  color: var(--wuling-header-accent);
  text-decoration: none;
}

.wuling-mega-model:hover .wuling-mega-model-arrow,
.wuling-mega-model:focus .wuling-mega-model-arrow {
  opacity: 1;
}

.wuling-mega-empty {
  padding: 0 40px;
  font-size: var(--wuling-fs-caption);
  color: var(--wuling-header-faint);
}

/* 右侧主推车型：大图置顶，下方参数条 + Explore 按钮，关闭按钮浮于右上 */
.wuling-mega-feature {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.wuling-mega-feature-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.wuling-mega-feature-img {
  display: block;
  width: 100%;
  height: auto;
}

.wuling-mega-close {
  position: absolute;
  top: 40px;
  right: 40px;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: url("../img/icon-close.png") center / contain no-repeat;
  cursor: pointer;
}

.wuling-mega-feature-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--wuling-models-feature-body-gap);
  padding:
    var(--wuling-models-feature-body-pad-top)
    var(--wuling-models-feature-body-pad-x)
    var(--wuling-models-feature-body-pad-bottom);
}

.wuling-mega-stats {
  display: flex;
  flex-wrap: wrap;
  gap:
    var(--wuling-models-feature-stats-row-gap)
    var(--wuling-models-feature-stats-column-gap);
}

.wuling-mega-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wuling-models-feature-stat-gap);
}

.wuling-mega-stat-num {
  font-size: var(--wuling-models-feature-stat-size);
  font-weight: 500;
  line-height: 1.25;
  color: var(--wuling-header-deep);
  white-space: nowrap;
}

.wuling-mega-stat-label {
  font-size: var(--wuling-models-feature-label-size);
  text-transform: uppercase;
  color: var(--wuling-header-accent);
  text-align: center;
  white-space: nowrap;
}

.wuling-mega-explore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wuling-models-feature-action-gap);
  padding:
    var(--wuling-models-feature-action-pad-y)
    var(--wuling-models-feature-action-pad-x);
  background: var(--wuling-header-accent);
  font-size: var(--wuling-models-feature-action-size);
  font-weight: 500;
  letter-spacing: var(--wuling-models-feature-action-tracking);
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.wuling-mega-explore:hover,
.wuling-mega-explore:focus {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.9;
}

/* Explore 箭头：设计稿 185:1847 原件内联 SVG（35.24x9.13），矢量渲染无位图缩放形变 */
.wuling-mega-explore .wuling-mega-explore-arrow {
  flex: 0 0 auto;
  display: block;
  width: var(--wuling-models-feature-arrow-width);
  height: var(--wuling-models-feature-arrow-height);
}

/* 小桌面档（992–1439px）：列宽、行高和内边距由 wuling-responsive.css 按视口比例控制。 */
@media (min-width: 992px) and (max-width: 1439.98px) {
  .wuling-mega-model .wuling-mega-model-arrow {
    width: clamp(48px, 4.17vw, 64px);
  }

  .wuling-mega-close {
    top: 24px;
    right: 24px;
  }

  .wuling-dropdown-link {
    height: var(--wuling-subnav-panel-row);
    padding: var(--wuling-subnav-panel-pad-y) var(--wuling-subnav-panel-pad-x);
    font-size: var(--wuling-subnav-panel-size);
    line-height: var(--wuling-subnav-panel-line);
  }

  .wuling-dropdown-link:first-child {
    height: var(--wuling-subnav-panel-row-first);
  }
}

/* ===== 语言切换面板（设计稿 275:3096：600px 宽，当前语言 + Coming soon） ===== */
.wuling-lang-panel {
  position: absolute;
  /* 导航项已撑满 80px 栏高，面板直接贴在 header 底边，不再额外下移 */
  top: 100%;
  right: 0;
  width: 600px;
  max-width: calc(100vw - 48px);
  background: var(--wuling-header-bg);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1040;
}

.wuling-lang-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--wuling-lang-current-row);
  padding: var(--wuling-subnav-panel-pad-y) var(--wuling-subnav-panel-pad-x);
  background: #ffffff;
  font-size: var(--wuling-lang-current-size);
  font-weight: 600;
  line-height: var(--wuling-lang-current-line);
  color: var(--wuling-header-accent);
  white-space: nowrap;
}

.wuling-lang-current .wuling-lang-check {
  flex: 0 0 auto;
  width: var(--wuling-lang-check-size);
  height: var(--wuling-lang-check-size);
  display: block;
}

.wuling-lang-other {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--wuling-subnav-panel-row);
  padding: var(--wuling-subnav-panel-pad-y) var(--wuling-subnav-panel-pad-x);
  white-space: nowrap;
  cursor: not-allowed;
}

.wuling-lang-other-label {
  font-size: var(--wuling-lang-other-size);
  letter-spacing: 0.14px;
  color: rgba(107, 114, 128, 0.5);
}

.wuling-lang-soon {
  font-size: var(--wuling-lang-other-size);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--wuling-header-accent);
}

/* 非 1920 基准档（992–1827px）主推区收窄：参数间距收紧、标签允许换行、
   Explore 换行时靠右，避免挤压溢出（cheryinternational 同类窄档处理为卡片纵向堆叠）。
   1920 设计稿需 feature 内容宽 ≥868px 才能单行，故上限取 1827px。 */
@media (min-width: 992px) and (max-width: 1827.98px) {
  .wuling-mega-stat-label {
    white-space: normal;
  }

  .wuling-mega-explore {
    margin-left: auto;
  }
}

/* 小桌面档语言面板字号收窄 */
@media (min-width: 992px) and (max-width: 1439.98px) {
  .wuling-lang-current {
    height: var(--wuling-lang-current-row);
    padding: var(--wuling-subnav-panel-pad-y) var(--wuling-subnav-panel-pad-x);
    font-size: var(--wuling-lang-current-size);
    line-height: var(--wuling-lang-current-line);
  }
}

/* ===== 移动端国家/地区链接（Global 子面板复用） ===== */
.wuling-country-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--wuling-fs-model-subnav-small);
  line-height: 1.5;
  color: var(--wuling-header-subtext);
  white-space: nowrap;
  text-decoration: none;
}

.wuling-country-link .wuling-country-flag {
  flex: 0 0 auto;
  height: 12px;
  width: auto;
  display: block;
}

.wuling-country-link:hover,
.wuling-country-link:focus {
  color: var(--wuling-header-accent);
  text-decoration: none;
}

/* ===== 移动端汉堡与折叠面板 ===== */
/* 移动端：导航组隐藏，靠 margin-left:auto 保持汉堡按钮贴右（原由 space-between 承担） */
.wuling-nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-left: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.wuling-nav-toggle span {
  display: block;
  height: 2px;
  background: var(--wuling-header-text);
}

.wuling-mobile-panel {
  border-top: 1px solid var(--wuling-header-line);
  background: #ffffff;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.wuling-mobile-item {
  border-bottom: 1px solid var(--wuling-header-line);
}

.wuling-mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  border: 0;
  background: transparent;
  font-family: var(--wuling-header-font);
  font-size: var(--wuling-fs-caption);
  color: var(--wuling-header-text);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.wuling-mobile-sub {
  padding: 4px 0 14px;
}

.wuling-mobile-sub-link {
  display: block;
  padding: 8px 0 8px 16px;
  font-size: var(--wuling-fs-model-subnav-small);
  color: var(--wuling-header-subtext);
  text-decoration: none;
}

.wuling-mobile-sub-link:hover,
.wuling-mobile-sub-link:focus {
  color: var(--wuling-header-accent);
  text-decoration: none;
}

.wuling-mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px 16px;
}

.wuling-mobile-cat {
  padding: 4px 10px;
  border: 1px solid var(--wuling-header-line);
  background: transparent;
  font-size: var(--wuling-fs-small);
  color: var(--wuling-header-muted);
  cursor: pointer;
}

.wuling-mobile-cat.is-active {
  border-color: var(--wuling-header-active);
  color: var(--wuling-header-deep);
  background: rgba(196, 207, 218, 0.5);
}

.wuling-mobile-countries {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 16px;
  padding: 4px 0 8px 16px;
}
