/* 跳转到正文：键盘访问时显示，平时隐藏在视口外。 */
.skip-link {
  position: absolute; top: -100px; left: 12px; z-index: 300;
  padding: 8px 16px; background: var(--color-primary); color: #fff;
  font-weight: 700; border-radius: 0 0 4px 4px;
}
.skip-link:focus { top: 0; }

/* 顶部联系栏：电话、邮箱和社交链接。 */
.top-bar {
  background: var(--color-primary); color: #fff;
  font-size: 14px; padding: 6px 0; position: sticky; top: 0; z-index: 102;
}
.top-bar-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
  display: flex; gap: 20px; justify-content: flex-end; align-items: center;
}
.top-bar a { color: #fff; text-decoration: none; }
.top-bar a:hover { text-decoration: underline; }
.top-bar-socials { display: flex; gap: 10px; align-items: center; }
.top-bar-socials a { display: flex; align-items: center; }
.top-bar-socials a:hover { text-decoration: none; opacity: .8; }
.top-bar-socials svg { width: 18px; height: 18px; }

/* 移动端菜单按钮：通过 body/nav-open 状态切换三条线动画。 */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 10px; min-width: 44px; min-height: 44px;
  flex-direction: column; gap: 5px; z-index: 101; align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--color-text-main);
  border-radius: 2px; transition: transform .3s ease, opacity .3s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* 主导航：WordPress 菜单、下拉菜单和询盘 CTA。 */
.nav {
  position: sticky; top: var(--nav-top-offset); z-index: 100;
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 10px 20px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
}
.nav-logo { font-family: var(--font-heading); font-weight: 800; font-size: 22px; color: var(--color-primary); white-space: nowrap; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; list-style: none; padding: 0; margin: 0; }
.nav-links li { list-style: none; }
.nav-links a {
  color: var(--color-text-main); text-decoration: none; font-weight: 600;
  padding: 7px 12px; border-radius: var(--radius-pill);
  transition: background .3s ease, color .3s ease; font-size: 15px;
}
.nav-links a:hover { background: var(--color-primary-light); color: var(--color-primary); text-decoration: none; }
.nav-links a.nav-cta { background: var(--color-primary); color: #fff; }
.nav-links a.nav-cta:hover { background: var(--color-primary-dark); }

.nav-links .menu-item-has-children { position: relative; }
.nav-links .sub-menu {
  display: none; position: absolute; top: 100%; right: 0;
  background: var(--color-bg-white); min-width: 200px;
  border: 1px solid var(--color-border); border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 100;
  list-style: none; padding: 6px 0; margin: 4px 0 0;
}
.nav-links .menu-item-has-children:hover > .sub-menu { display: block; }
.nav-links .sub-menu li { display: block; }
.nav-links .sub-menu a {
  display: block; padding: 10px 18px; border-radius: 0;
  font-weight: 500; font-size: 14px; white-space: nowrap;
}
.nav-links .sub-menu a:hover { background: var(--color-primary-light); color: var(--color-primary); }

/* 页脚版权线：位于 footer 询盘区下方。 */
.copyright {
  max-width: var(--max-width); margin: 34px auto 0; padding: 18px 20px 0;
  border-top: 1px solid var(--color-border); text-align: center;
  font-size: 15px; color: var(--color-text-muted);
}

/* 页脚快捷询盘按钮：保留给 footer 中的固定定位按钮。 */
.float-btn {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); right: 24px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .3s ease;
}
.float-btn:hover { transform: scale(1.1); }
.float-btn svg { width: 30px; height: 30px; fill: #fff; }

/* WhatsApp 浮动按钮：页面右下角即时沟通入口。 */
.whatsapp-float {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); right: 24px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: transform .3s ease;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float svg { width: 30px; height: 30px; fill: #fff; }

/* 平板端导航与顶部联系栏压缩。 */
@media (max-width: 900px) {
  .nav-links a { padding: 6px 8px; font-size: 14px; }
  .top-bar { font-size: 13px; }
  .top-bar-inner {
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .top-bar-inner::-webkit-scrollbar { display: none; }
}

/* 手机端汉堡菜单和浮动元素适配。 */
@media (max-width: 560px) {
  .top-bar { display: none; }
  .nav { top: 0; }
  .nav-toggle { display: flex; }
  .nav-inner { padding: 10px 16px; flex-wrap: wrap; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; gap: 0;
    padding-top: 8px;
  }
  .nav-open .nav-links { display: flex; }
  .nav-links a {
    display: block; padding: 14px 10px; font-size: 16px;
    text-align: left; border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }
  .nav-links a:active { background: var(--color-primary-light); }
  .nav-links a.nav-cta {
    margin-top: 6px; text-align: center; border-radius: var(--radius-pill);
  }
  .nav-links .sub-menu {
    display: none; position: static; box-shadow: none; border: none;
    margin: 0; padding: 0; min-width: 0; background: transparent;
  }
  .nav-links .menu-item-has-children.open > .sub-menu { display: block; }
  .nav-links .sub-menu a { padding-left: 28px; font-size: 15px; }
  .nav-logo { font-size: 20px; }
  .top-bar-socials { display: none; }
  .social-icons a { width: 44px; height: 44px; }
  .social-icons svg { width: 24px; height: 24px; }
}
