/* ============================================================
   站内导航下拉 — 式和元官网 2026-10-22
   「产品展示 ▾」+「服务城市 ▾」两个面板，由 js/site-nav.js 自动接管
   不改原页面结构：只重排 .nav-links 里的 li
   ============================================================ */

/* —— 一级项统一高度，面板才能贴导航底边 —— */
.nav-links > li.nv-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 64px;
}

.nav-links .nv-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.nav-links .nv-caret {
  width: 5px; height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
  opacity: .55;
  flex: 0 0 auto;
}
.nav-links > li.open > .nv-trigger .nv-caret {
  transform: rotate(-135deg) translateY(0);
  opacity: .9;
}
.nav-links > li.open > .nv-trigger { color: var(--walnut); }

/* —— 面板 —— */
.nv-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 6px);
  background: #fff;
  border: 1px solid var(--cream-dark);
  box-shadow: 0 20px 48px rgba(62, 39, 35, .14);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 130;
  text-align: left;
}
.nav-links > li.open > .nv-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
/* 鼠标从一级项移到面板要经过 6px 缝隙，这里铺一层看不见的桥 */
.nv-panel::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -14px; height: 14px;
}

/* —— 产品面板：三列 —— */
.nv-panel--product { width: 624px; padding: 20px; }
.nv-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.nv-c {
  display: block;
  padding: 15px 14px 16px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background .18s, border-color .18s;
}
.nv-c:hover { background: var(--cream); border-color: var(--cream-dark); }
.nv-c b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--walnut);
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.nv-c span {
  display: block;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-light);
}
.nv-foot {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}
.nv-foot a { color: var(--walnut-mid); text-decoration: none; }
.nv-foot a:hover { color: var(--walnut); }
.nv-foot .nv-tel { color: var(--text-light); }
.nv-foot .nv-tel b { color: var(--walnut); font-weight: 700; letter-spacing: .5px; }

/* —— 城市面板 —— */
.nv-panel--city { width: 648px; padding: 18px 20px 14px; }

.nv-search { position: relative; margin-bottom: 14px; }
.nv-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--cream-dark);
  border-radius: 2px;
  background: var(--cream);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .2s, background .2s;
}
.nv-search input:focus { background: #fff; border-color: var(--gold); }
.nv-search input::placeholder { color: #A79890; }
.nv-search::before {
  content: '';
  position: absolute;
  left: 13px; top: 50%;
  width: 11px; height: 11px;
  margin-top: -7px;
  border: 1.5px solid #A79890;
  border-radius: 50%;
  pointer-events: none;
}
.nv-search::after {
  content: '';
  position: absolute;
  left: 23px; top: 50%;
  width: 5px; height: 1.5px;
  margin-top: 3px;
  background: #A79890;
  transform: rotate(45deg);
  pointer-events: none;
}

.nv-city-body {
  display: grid;
  grid-template-columns: 1fr 208px;
  gap: 18px;
  min-height: 212px;
}

.nv-city-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 32px;
  gap: 4px 6px;
  max-height: 212px;
  overflow-y: auto;
  align-content: start;
  padding-right: 4px;
}
.nv-city-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nv-city-list a:hover,
.nv-city-list a.on {
  background: var(--cream);
  border-color: var(--cream-dark);
  color: var(--walnut);
  font-weight: 600;
}
.nv-city-list a.hide { display: none; }
.nv-city-list .nv-empty {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--text-light);
  padding: 10px 2px;
}

.nv-city-side {
  border-left: 1px solid var(--cream-dark);
  padding-left: 16px;
}
.nv-city-side .side-h {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--walnut);
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cream-dark);
}
.nv-city-side .side-h em {
  font-style: normal;
  color: var(--text-light);
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: 0;
  margin-left: 4px;
}
.nv-city-side a {
  display: block;
  font-size: 12.5px;
  color: var(--text-light);
  text-decoration: none;
  padding: 7px 0;
  transition: color .15s, padding-left .15s;
}
.nv-city-side a:hover { color: var(--walnut); padding-left: 4px; }
.nv-city-side a::after { content: ' →'; color: var(--gold); }

.nv-city-foot {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-light);
}
.nv-city-foot a { color: var(--walnut-mid); text-decoration: none; }
.nv-city-foot a:hover { color: var(--walnut); }

/* —— 移动端菜单里的分组 —— */
.nvm-group { border-bottom: 1px solid var(--cream-dark); }
.nvm-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 8px;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 17px;
  color: var(--walnut);
  letter-spacing: 1px;
  cursor: pointer;
  text-align: left;
}
.nvm-h i {
  width: 7px; height: 7px;
  border-right: 1px solid var(--walnut);
  border-bottom: 1px solid var(--walnut);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
  opacity: .5;
  font-style: normal;
}
.nvm-group.open .nvm-h i { transform: rotate(-135deg); }
.nvm-body {
  display: none;
  padding: 0 0 12px;
}
.nvm-group.open .nvm-body { display: block; }
.nvm-body a {
  display: block;
  padding: 12px 8px 12px 20px !important;
  font-size: 15px !important;
  color: var(--text-light) !important;
  border-bottom: 1px solid rgba(232, 221, 211, .6) !important;
  text-decoration: none;
}
.nvm-body a:hover { color: var(--walnut) !important; }
.nvm-body.nvm-cities {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 0 14px;
}
.nvm-group.open .nvm-body.nvm-cities { display: grid; }
.nvm-body.nvm-cities a {
  padding: 9px 4px !important;
  text-align: center;
  font-size: 13.5px !important;
  border: 1px solid var(--cream-dark) !important;
  border-radius: 2px;
}
.nvm-body.nvm-cities a.full { grid-column: 1 / -1; }

/* 移动端菜单内容变多，必须可滚 */
.nav-mobile { overflow-y: auto; }

/* —— 中小屏：导航项收一点 —— */
@media (max-width: 1180px) {
  .nav-links { gap: 20px !important; }
  .nav-links a { font-size: 13.5px; }
  .nv-panel--product { width: 540px; }
  .nv-panel--city { width: 600px; }
}
@media (max-width: 1024px) {
  .nav-links { gap: 14px !important; }
  .nav-links a { font-size: 13px; }
  .nv-panel--product { width: 500px; padding: 16px; }
  .nv-panel--city { width: 546px; padding: 16px; }
  .nv-city-body { grid-template-columns: 1fr 186px; gap: 14px; }
  .nv-city-list { grid-template-columns: repeat(3, 1fr); }
}
/* ============================================================
   手机端吸顶导航加强 — 2026-10-22
   老板反馈「冻结导航栏做得再明显一些」
   手法：底部金色细线（两端淡出）+ 投影加深 + 滚动后投影再深一档
   桌面端完全不受影响（所有规则包在 max-width:768px 内）
   ============================================================ */
@media (max-width: 768px) {
  nav {
    background: #fff !important;
    border-bottom: 0 !important;
    box-shadow: 0 8px 24px rgba(62, 39, 35, .16) !important;
    -webkit-transition: box-shadow .25s ease;
    transition: box-shadow .25s ease;
  }
  /* 底部金色细线：两端淡出，中间实，压在导航最下沿 */
  nav::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: -webkit-linear-gradient(left,
      rgba(184,151,106,.25) 0%, rgba(184,151,106,.55) 10%,
      #B8976A 18%, #B8976A 82%,
      rgba(184,151,106,.55) 90%, rgba(184,151,106,.25) 100%);
    background: linear-gradient(90deg,
      rgba(184,151,106,.25) 0%, rgba(184,151,106,.55) 10%,
      #B8976A 18%, #B8976A 82%,
      rgba(184,151,106,.55) 90%, rgba(184,151,106,.25) 100%);
    pointer-events: none;
  }
  /* 滚动后：投影加深一档，悬浮感出来 */
  nav.nv-stuck {
    box-shadow: 0 14px 34px rgba(62, 39, 35, .26) !important;
  }
  .nav-brand {
    font-size: 19px !important;
    letter-spacing: 2.5px !important;
  }
  .nav-toggle span {
    width: 24px;
    height: 2.5px;
  }
  /* 顺手修既有缝：菜单面板 top 原写死 64px，手机端导航只有 56px，顶部漏 7px 底图 */
  .nav-mobile {
    top: 56px !important;
    border-top: 1px solid var(--cream-dark);
  }
}
