/* ============================================================
   店小富 · 统一站点顶栏（前台 + 后台共用）
   依赖页面已定义的设计令牌（--ink / --accent …）
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
}

.topbar__in {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 68px;
}

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: "Dianify Logo", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--brand);
  transition: color 0.2s var(--ease);
}

.logo:hover { color: var(--accent); }

/* ---------- 导航 ---------- */
.topnav {
  display: flex;
  gap: 26px;
  font-size: 14px;
  color: var(--ink-2);
}

.topnav a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}

.topnav a:hover { color: var(--accent); }

.topnav a.is-active {
  color: var(--ink);
  font-weight: 600;
}

.topnav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent));
}

/* ---------- 右侧 ---------- */
.topbar__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hotline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.hotline:hover {
  background: var(--accent-soft);
  border-color: var(--line);
  color: var(--accent);
}

/* 微信咨询：带描边的胶囊按钮，图标无底色 */
.hotline--wx {
  height: 40px;
  border-color: var(--line-2);
  background: #fff;
  padding: 0 16px 0 8px;
  gap: 8px;
}

.hotline--wx:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hotline.hotline--wx i {
  width: 21px;
  height: 21px;
  background: transparent;
  color: var(--accent);
}

.hotline.hotline--wx svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.5;
}

.hotline i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.hotline svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 8px 18px -14px rgba(44, 83, 245, 0.8);
}

/* ---------- 我的（账号菜单） ---------- */
.acct { position: relative; }

.acct__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.acct__btn:hover {
  border-color: #cfdcfa;
  box-shadow: 0 6px 16px -12px rgba(23, 32, 51, 0.4);
}

.acct__ava {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #e9efff, #d9e5ff);
  color: var(--accent-dark);
  font-size: 12.5px;
  font-weight: 600;
}

.acct__label { font-weight: 500; }

.acct__caret {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 0.2s var(--ease);
}

.acct.is-open .acct__caret { transform: rotate(180deg); }

.acct__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 80;
  width: 228px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 48px -24px rgba(16, 24, 40, 0.45), 0 2px 8px rgba(16, 24, 40, 0.05);
}

.acct__head {
  padding: 10px 12px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.acct__head b {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
}

.acct__head span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.acct__menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.acct__menu a:hover {
  background: var(--accent-tint);
  color: var(--ink);
}

.acct__menu a .ico {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.acct__menu a:hover .ico { color: var(--accent); }

/* 退出登录：不画分割线，用间距和弱化字色区分 */
.acct__out {
  margin-top: 6px;
  border-top: 0;
  border-radius: 10px;
  color: var(--muted);
}

.acct__out:hover { color: var(--ink); }

/* ---------- 汉堡按钮 ---------- */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.6px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.topbar.is-open .nav-toggle span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.topbar.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.topbar.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(15, 23, 41, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), visibility 0.22s;
}

.topbar.is-open ~ .nav-backdrop {
  opacity: 1;
  visibility: visible;
}

/* ---------- 小屏：导航收进下拉面板 ---------- */
@media (max-width: 1023px) {
  .topbar__in {
    height: 60px;
    gap: 12px;
  }

  .nav-toggle { display: inline-flex; }

  .topnav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 20px 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 50px -34px rgba(16, 24, 40, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  }

  .topbar.is-open .topnav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .topnav a {
    padding: 13px 4px;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
  }

  .topnav a:last-child { border-bottom: 0; }

  .topnav a.is-active::after { display: none; }

  .topbar__right { gap: 10px; }

  .hotline span { display: none; }

  .hotline { height: 40px; padding: 0 9px; }

  .logo { font-size: 22px; }
}

@media (max-width: 420px) {
  .acct__label { display: none; }
  .acct__btn { padding: 5px 8px 5px 5px; }
}
