/* ============================================================
   琦特熙商城 · 公共头部样式（商城风 v4.0 · 2026-08-07）
   ------------------------------------------------------------
   分层：
   1. .mh-topbar        顶部工具条（浅米细条）
   2. .nav-header       Logo 行（白底：logo + 大搜索 + 购物车）
   3. .mh-nav-band      橙色主导航条（左分类 mega + 菜单）
   4. .nav-cont         菜单 hover 下拉/mega 面板（白底浮层）
   5. .aside-tools      右侧悬浮工具
   6. .m-nav-*          移动端抽屉（≤992px）
   类名 .nav-* 与 #navHotList / #navSearch* 等被 common.js 依赖，勿改名。
   ============================================================ */

/* ============================================================
   1. 顶部工具条
   ============================================================ */
.mh-topbar {
  background: var(--mh-topbar-bg);
  border-bottom: 1px solid var(--mh-topbar-line);
  font-size: 12px;
  color: var(--mh-topbar-text);
}
.mh-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
}
.mh-topbar-left { display: flex; align-items: center; gap: 4px; }
.mh-topbar-hi { color: var(--mh-text-3); }
.mh-topbar-brand { color: var(--mh-text-1); font-weight: 600; }
.mh-topbar-slogan { color: var(--mh-text-3); }
.mh-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mh-topbar-link {
  color: var(--mh-text-2) !important;
  cursor: pointer;
  transition: color var(--mh-dur) var(--mh-ease);
  text-decoration: none;
}
.mh-topbar-link:hover { color: var(--mh-primary) !important; }
.mh-topbar-link-primary { color: var(--mh-primary) !important; font-weight: 600; }
.mh-topbar-sep { color: var(--mh-text-4); margin: 0 2px; }

/* 顶栏用户区：未登录/已登录共用横向布局 */
.mh-topbar-nologin {
  display: flex !important; /* common.js 会用 attr(style) 写入 display:block，这里强制 flex 保持按钮横排 */
  align-items: center;
  gap: 8px;
}
/* 顶栏登录/注册按钮（商城风：登录=描边、注册=实心） */
.mh-topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  line-height: 1;
  padding: 0 12px;
  font-size: 12px;
  box-sizing: border-box;
  border-radius: var(--mh-radius);
  cursor: pointer;
  transition: all var(--mh-dur) var(--mh-ease);
}
.mh-topbar-btn-login {
  color: var(--mh-primary) !important;
  background: var(--mh-bg-card);
  border: 1px solid var(--mh-primary);
}
.mh-topbar-btn-login:hover {
  background: var(--mh-primary-light);
}
.mh-topbar-btn-regist {
  color: #fff !important;
  background: var(--mh-primary);
  border: 1px solid var(--mh-primary);
}
.mh-topbar-btn-regist:hover {
  background: var(--mh-primary-hover);
}
.mh-topbar-login {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  cursor: pointer;
  padding: 0 4px;
  height: 34px;
}
.mh-topbar-login .head-img {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600;
  background: var(--mh-primary);
}
.mh-topbar-username {
  max-width: 110px;
  color: var(--mh-text-1);
  font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mh-topbar-login .real-name {
  display: inline-block;
  border: 1px solid var(--mh-primary);
  color: var(--mh-primary);
  font-size: 11px;
  line-height: 14px;
  padding: 0 4px;
  border-radius: var(--mh-radius-sm);
}
.mh-topbar-login .no-real-name { border-color: var(--mh-error); color: var(--mh-error); }
/* 已登录下拉（沿用 .login-menu 类，common.js hover 控制） */
.mh-topbar-login:hover .login-menu { display: block; }
.mh-topbar-login .login-menu {
  display: none;
  position: absolute;
  top: 34px;
  right: 0;
  width: 150px;
  background: var(--mh-bg-card);
  border: 1px solid var(--mh-line);
  box-shadow: var(--mh-shadow-md);
  border-radius: var(--mh-radius);
  padding: 6px 0;
  z-index: 999;
}
.mh-topbar-login .login-menu .login-menu-item {
  height: 36px;
  line-height: 36px;
  padding: 0 16px;
  color: var(--mh-text-2);
  cursor: pointer;
  font-size: 13px;
  transition: all var(--mh-dur) var(--mh-ease);
}
.mh-topbar-login .login-menu .login-menu-item:hover {
  background: var(--mh-primary-light);
  color: var(--mh-primary);
}

/* ============================================================
   2. Logo 行（.nav-header 白底）
   ============================================================ */
.nav-shadow {
  background: var(--mh-bg-card);
  box-shadow: 0 1px 0 var(--mh-line), 0 2px 12px rgba(0,0,0,0.04);
}
.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px !important;
  height: auto !important;
  gap: 30px;
}
.nav-header .nav-left {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.nav-icon {
  line-height: 0;
}
.nav-icon img {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

/* 大搜索框 */
.nav-search-wrap {
  flex: 1;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-search {
  display: flex;
  align-items: stretch;
  height: 42px;
  border: 2px solid var(--mh-primary);
  border-radius: var(--mh-radius);
  overflow: hidden;
  background: var(--mh-bg-card);
  transition: box-shadow var(--mh-dur) var(--mh-ease);
}
.nav-search:focus-within {
  box-shadow: 0 0 0 3px rgba(194,85,29,0.15);
}
.nav-search-cat {
  display: flex;
  align-items: center;
  border-right: 1px solid var(--mh-line);
  background: var(--mh-bg-soft);
}
.nav-search-cat select {
  height: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--mh-text-2);
  padding: 0 28px 0 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239B9185' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}
.nav-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--mh-text-1);
  padding: 0 14px;
  height: 100%;
  min-width: 0;
}
.nav-search-input::placeholder { color: var(--mh-text-3); }
.nav-search-btn {
  border: none;
  background: var(--mh-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 0 32px;
  cursor: pointer;
  letter-spacing: 2px;
  transition: background var(--mh-dur) var(--mh-ease);
}
.nav-search-btn:hover { background: var(--mh-primary-hover); }
.nav-search-btn:active { background: var(--mh-primary-active); }
/* 热门搜索词 */
.nav-search-hot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--mh-text-3);
  padding-left: 4px;
  flex-wrap: wrap;
}
.nav-search-hot a {
  color: var(--mh-text-3) !important;
  transition: color var(--mh-dur) var(--mh-ease);
  text-decoration: none;
}
.nav-search-hot a:hover { color: var(--mh-primary) !important; }

/* 右侧：购物车按钮 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--mh-line);
  border-radius: var(--mh-radius);
  background: var(--mh-bg-card);
  color: var(--mh-text-1) !important;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--mh-dur) var(--mh-ease);
}
.nav-cart:hover {
  border-color: var(--mh-primary);
  color: var(--mh-primary) !important;
  box-shadow: var(--mh-shadow-sm);
}
.nav-cart-icon {
  font-size: 20px;
  color: var(--mh-primary);
}
.nav-cart-text { font-size: 13px; font-weight: 500; }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--mh-price);
  border-radius: var(--mh-radius-pill);
  border: 1.5px solid var(--mh-bg-card);
  box-sizing: border-box;
}
#navCartCount:empty,
#navCartCount[data-empty="1"] { display: none; }

/* ============================================================
   3. 橙色主导航条
   ============================================================ */
.mh-nav-band {
  background: var(--mh-nav-bg);
  position: relative;
  z-index: 9;
}
.mh-nav-band-inner {
  display: flex;
  align-items: stretch;
  height: 44px;
}

/* 左侧「全部商品分类」橙色块（比导航条略深，强调可点击） */
.mh-cats {
  position: relative;
  width: 230px;
  flex-shrink: 0;
  background: var(--mh-nav-active);
  color: #fff;
}
.mh-cats-title {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.cats-grid-ico { font-size: 18px; }
.cats-arrow {
  margin-left: auto;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(255,255,255,0.85);
}

/* 左侧分类 mega 面板（悬停展开） */
.mh-cats-mega {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 230px;
  background: rgba(255,255,255,0.98);
  border: 1px solid var(--mh-line);
  border-top: none;
  box-shadow: 0 12px 28px rgba(0,0,0,0.16);
  border-radius: 0 0 var(--mh-radius-md) var(--mh-radius-md);
  padding: 6px 0;
  z-index: 100;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.mh-cats:hover .mh-cats-mega,
.mh-cats.mh-cats-open .mh-cats-mega { display: block; }
.mh-cats-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--mh-text-1) !important;
  text-decoration: none;
  transition: background var(--mh-dur) var(--mh-ease);
  position: relative;
}
.mh-cats-item:hover,
.mh-cats-item.is-active {
  background: var(--mh-primary-light);
  color: var(--mh-primary) !important;
}
.mh-cats-item .ci-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--mh-bg-soft);
  border-radius: var(--mh-radius-sm);
  font-size: 18px;
  color: var(--mh-primary);
  flex-shrink: 0;
}
.mh-cats-item .ci-info { flex: 1; min-width: 0; }
.mh-cats-item .ci-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mh-cats-item .ci-desc {
  font-size: 11px;
  color: var(--mh-text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mh-cats-item .ci-arrow {
  font-size: 12px;
  color: var(--mh-text-4);
}
.mh-cats-item:hover .ci-arrow { color: var(--mh-primary); }

/* 二级浮层（悬停分类项右侧弹出代表商品 + 热门词） */
.mh-cats-sub {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 520px;
  max-width: 640px;
  background: var(--mh-bg-card);
  border: 1px solid var(--mh-line);
  box-shadow: 0 16px 36px rgba(0,0,0,0.18);
  border-radius: 0 var(--mh-radius-md) var(--mh-radius-md) 0;
  padding: 16px;
  z-index: 101;
}
.mh-cats-item:hover .mh-cats-sub { display: flex; gap: 14px; }
.mh-cats-sub-cols {
  display: flex;
  gap: 14px;
  width: 100%;
}
.mh-cats-sub-prods {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mh-cats-sub-prod {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid var(--mh-line-soft);
  border-radius: var(--mh-radius-sm);
  text-decoration: none;
  color: var(--mh-text-1) !important;
  transition: all var(--mh-dur) var(--mh-ease);
  text-align: center;
}
.mh-cats-sub-prod:hover {
  border-color: var(--mh-primary);
  box-shadow: var(--mh-shadow-sm);
  transform: translateY(-1px);
}
.mh-cats-sub-prod img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: var(--mh-radius-sm);
  background: var(--mh-bg-soft);
}
.mh-cats-sub-prod .sp-name {
  font-size: 12px;
  color: var(--mh-text-2);
  line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  width: 100%;
}
.mh-cats-sub-prod .sp-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--mh-price);
}
.mh-cats-sub-side {
  width: 150px;
  flex-shrink: 0;
  border-left: 1px dashed var(--mh-line);
  padding-left: 14px;
}
.mh-cats-sub-side .ss-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--mh-text-1);
  margin-bottom: 8px;
}
.mh-cats-sub-side .ss-kw {
  display: inline-block;
  font-size: 12px;
  color: var(--mh-text-2) !important;
  background: var(--mh-bg-soft);
  padding: 3px 9px;
  border-radius: var(--mh-radius-pill);
  margin: 0 4px 6px 0;
  text-decoration: none;
  transition: all var(--mh-dur) var(--mh-ease);
}
.mh-cats-sub-side .ss-kw:hover {
  background: var(--mh-primary);
  color: #fff !important;
}
.mh-cats-skel {
  height: 54px;
  margin: 4px 12px;
  border-radius: var(--mh-radius);
  background: linear-gradient(90deg, var(--mh-bg-soft) 25%, var(--mh-bg-section) 50%, var(--mh-bg-soft) 75%);
  background-size: 200% 100%;
  animation: mh-skel 1.2s infinite var(--mh-ease);
}

/* 一级菜单（白字橙条） */
.nav-menu {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.nav-menu a { display: block; color: var(--mh-nav-text); text-decoration: none; }
.nav-menu a:hover { color: #fff; }
.nav-menu .nav-item {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--mh-nav-text);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: background var(--mh-dur) var(--mh-ease);
  border-bottom: none;
}
.nav-menu .nav-item:hover,
.nav-menu .nav-item.is-active {
  background: var(--mh-nav-active);
  color: #fff;
}
.nav-menu .nav-item.is-active::after,
.nav-menu .nav-item:hover::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: #fff;
}
.nav-menu .nav-item-has-children { padding-right: 34px; }
.nav-item-has-children::before {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px; height: 7px;
  margin-top: -5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: .7;
  transition: transform var(--mh-dur) var(--mh-ease);
}
.nav-item-has-children:hover::before { transform: rotate(225deg); margin-top: -1px; }
.nav-item-shop { font-weight: 700; }
.nav-shop-grid { font-size: 15px; margin-right: 6px; }
.nav-item-sale { position: relative; }
.nav-item-sale::before {
  content: '惠';
  position: absolute;
  top: 8px; right: 4px;
  width: 16px; height: 16px;
  line-height: 16px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #fff;
  color: var(--mh-promo);
  border-radius: 50%;
}

/* ============================================================
   4. 下拉/mega 面板（白底，common.js 控制 hover 展开高度）
   ============================================================ */
.nav-cont {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--mh-bg-card);
  box-shadow: 0 12px 32px rgba(0,0,0,0.14);
  height: 0;
  overflow: hidden;
  transition: height 0.25s var(--mh-ease);
  z-index: 99;
}
.nav-cont .section-content { padding: 0 16px; }
.nav-cont .nav-cont-menu { display: none; }
.nav-cont-empty { display: none !important; }

/* 普通下拉面板（内容卡片网格） */
.nav-content {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 8px;
}
.nav-content a { width: calc(25% - 12px); }
.nav-item-box {
  min-width: 0;
  height: 84px;
  padding: 16px 18px;
  border-radius: var(--mh-radius);
  background: var(--mh-bg-soft);
  border: 1px solid var(--mh-line);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all var(--mh-dur) var(--mh-ease);
  color: var(--mh-text-1);
}
.nav-item-box:hover {
  background: var(--mh-bg-card);
  border-color: var(--mh-primary);
  box-shadow: var(--mh-shadow-md);
  transform: translateY(-2px);
}
.nav-item-box img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.item-box-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item-box-title .title {
  font-size: 14px; font-weight: 600; color: var(--mh-text-1);
  transition: color var(--mh-dur) var(--mh-ease);
}
.nav-item-box:hover .title { color: var(--mh-primary); }
.item-box-title .desc { font-size: 12px; color: var(--mh-text-3); }

/* Mega 面板：分类磁贴 + 热销榜 */
.nav-mega-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 22px 8px 22px 0;
}
.nav-mega-cats {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-content: start;
  padding-right: 22px;
}
.nav-cat-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--mh-bg-soft);
  border: 1px solid var(--mh-line);
  border-radius: var(--mh-radius-md);
  transition: all var(--mh-dur) var(--mh-ease);
  position: relative;
  color: var(--mh-text-1);
  text-decoration: none;
}
.nav-cat-tile:hover {
  background: var(--mh-bg-card);
  border-color: var(--mh-primary);
  box-shadow: var(--mh-shadow-hover);
  transform: translateY(-2px);
}
.nav-cat-tile img,
.nav-cat-tile .nav-tile-svg {
  width: 44px; height: 44px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--mh-radius-sm);
  background: var(--mh-bg-card);
}
.nav-cat-tile .nav-tile-svg {
  font-size: 24px;
  box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--mh-line);
  color: var(--mh-primary);
}
.nav-cat-info { flex: 1; min-width: 0; }
.nav-cat-name { font-size: 14px; font-weight: 600; color: var(--mh-text-1); margin-bottom: 2px; }
.nav-cat-tile:hover .nav-cat-name { color: var(--mh-primary); }
.nav-cat-desc {
  font-size: 12px; color: var(--mh-text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-cat-arrow {
  font-size: 12px; color: var(--mh-text-4);
  opacity: 0; transform: translateX(-4px);
  transition: all var(--mh-dur) var(--mh-ease);
}
.nav-cat-tile:hover .nav-cat-arrow { opacity: 1; transform: translateX(0); color: var(--mh-primary); }

/* 热销榜 */
.nav-mega-hot {
  width: 260px;
  flex-shrink: 0;
  border-left: 1px solid var(--mh-line);
  padding-left: 22px;
  display: flex;
  flex-direction: column;
}
.nav-hot-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 700; color: var(--mh-text-1);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--mh-line-soft);
}
.nav-hot-fire {
  display: inline-block; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23EF4444'%3E%3Cpath d='M12 2c.7 3.2-.6 5-2.2 6.6C8.2 10.2 7 12 7 14.5A5.5 5.5 0 0 0 12.5 20c3.2 0 5.5-2.6 5.5-5.8 0-2.4-1-4.6-2.4-6.4-.4 1.3-1.1 2.2-2.1 2.7.5-2.6-.2-5.6-1.5-8.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nav-hot-list { flex: 1; padding-top: 8px; }
.nav-hot-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--mh-radius-md);
  transition: background var(--mh-dur) var(--mh-ease);
  color: var(--mh-text-1);
  text-decoration: none;
}
.nav-hot-item:hover { background: var(--mh-bg-soft); }
.nav-hot-rank {
  width: 20px; height: 20px; line-height: 20px; text-align: center;
  font-size: 12px; font-weight: 700; font-style: italic;
  color: var(--mh-text-3);
  background: var(--mh-bg-section);
  border-radius: var(--mh-radius-sm);
  flex-shrink: 0;
}
.nav-hot-rank-1 { background: var(--mh-price); color: #fff; }
.nav-hot-rank-2 { background: var(--mh-accent); color: #fff; }
.nav-hot-rank-3 { background: var(--mh-accent-light); color: var(--mh-primary-active); }
.nav-hot-item img { width: 42px; height: 42px; object-fit: cover; border-radius: var(--mh-radius-sm); border: 1px solid var(--mh-line-soft); flex-shrink: 0; }
.nav-hot-info { flex: 1; min-width: 0; }
.nav-hot-name {
  font-size: 13px; color: var(--mh-text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color var(--mh-dur) var(--mh-ease);
}
.nav-hot-item:hover .nav-hot-name { color: var(--mh-primary); }
.nav-hot-price { font-size: 14px; font-weight: 700; color: var(--mh-price); margin-top: 2px; }
.nav-hot-more {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin-top: 8px; padding: 8px 0;
  font-size: 13px; color: var(--mh-text-2);
  border: 1px dashed var(--mh-border);
  border-radius: var(--mh-radius-pill);
  transition: all var(--mh-dur) var(--mh-ease);
  text-decoration: none;
}
.nav-hot-more:hover { color: var(--mh-primary) !important; border-color: var(--mh-primary); background: var(--mh-bg-soft); }
.nav-hot-skel {
  height: 42px; margin: 8px;
  border-radius: var(--mh-radius-md);
  background: linear-gradient(90deg, var(--mh-bg-soft) 25%, var(--mh-bg-section) 50%, var(--mh-bg-soft) 75%);
  background-size: 200% 100%;
  animation: mh-skel 1.2s infinite var(--mh-ease);
}
@keyframes mh-skel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 顶栏登录态/按钮在 logo 行不再出现（已移到 topbar），保留兜底样式避免残留 DOM 异常 */
.nav-header .no-login,
.nav-header .login-in { display: none !important; }

/* ============================================================
   5. 侧边悬浮工具栏
   ============================================================ */
.aside-tools {
  position: fixed;
  top: 45%;
  right: 0;
  z-index: 800;
}
.aside-tools .tools-list {
  width: 48px;
  background: var(--mh-bg-card);
  box-shadow: 0 0 12px rgba(19,55,83,0.10);
  border-radius: var(--mh-radius-md) 0 0 var(--mh-radius-md);
  overflow: hidden;
}
.aside-tools .tools-item {
  position: relative;
  border-bottom: 1px solid var(--mh-line-soft);
  text-align: center;
}
.aside-tools .tools-item:last-child { border-bottom: none; }
.aside-tools .tools-item img {
  margin: 9px;
  height: 26px; width: 26px;
  cursor: pointer;
}
.aside-tools .tools-item:hover { background: var(--mh-primary-light); }
.aside-tools .tools-item:hover .tools-box { display: block; }
.aside-tools .tools-box {
  display: none;
  position: absolute;
  left: -210px;
  top: 0;
  padding-right: 12px;
}
.aside-tools .tools-box-s {
  padding: 16px;
  width: 190px;
  background: var(--mh-bg-card);
  box-shadow: var(--mh-shadow-md);
  border-radius: var(--mh-radius-md);
  border: 1px solid var(--mh-line);
}
.aside-tools .tools-box h5 { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--mh-text-1); }
.aside-tools .tools-box p { font-size: 12px; color: var(--mh-text-3); margin: 0; }
.aside-tools .tools-box .button {
  font-size: 12px;
  display: inline-block;
  margin-top: 12px;
  padding: 5px 12px;
  background: var(--mh-primary);
  color: #fff;
  border-radius: var(--mh-radius);
  transition: background var(--mh-dur) var(--mh-ease);
}
.aside-tools .tools-box .button:hover { background: var(--mh-primary-hover); }

/* ============================================================
   6. 移动端导航（汉堡抽屉 ≤992px）
   ============================================================ */
.nav-toggle {
  display: none;
  position: relative;
  width: 28px; height: 22px;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 1200;
}
.nav-toggle span {
  position: absolute;
  left: 0; width: 100%; height: 2px;
  background: var(--mh-text-1);
  border-radius: 2px;
  transition: transform var(--mh-dur) var(--mh-ease), opacity var(--mh-dur) var(--mh-ease), top var(--mh-dur) var(--mh-ease);
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 10px; }
.nav-toggle span:nth-child(3) { top: 20px; }
body.nav-open .nav-toggle span { background: var(--mh-primary); }
body.nav-open .nav-toggle span:nth-child(1) { top: 10px; transform: rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

.m-nav-overlay {
  position: fixed; inset: 0;
  background: rgba(27,36,48,0.5);
  opacity: 0; visibility: hidden;
  transition: opacity var(--mh-dur) var(--mh-ease), visibility var(--mh-dur);
  z-index: 1150;
}
body.nav-open .m-nav-overlay { opacity: 1; visibility: visible; }

.m-nav-drawer {
  position: fixed; top: 0; right: 0;
  width: min(320px, 84vw); height: 100%;
  background: var(--mh-bg-card);
  box-shadow: var(--mh-shadow-lg);
  transform: translateX(100%);
  transition: transform var(--mh-dur) var(--mh-ease);
  z-index: 1160;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
body.nav-open .m-nav-drawer { transform: translateX(0); }
.m-nav-head { padding: 16px; border-bottom: 1px solid var(--mh-line); background: var(--mh-nav-bg); }
.m-nav-search {
  display: flex; align-items: center; height: 40px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--mh-radius-pill);
  padding: 0 6px 0 14px;
}
.m-nav-search input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 14px; color: #fff; height: 100%;
}
.m-nav-search input::placeholder { color: rgba(255,255,255,0.7); }
.m-nav-search .m-nav-search-btn {
  width: 28px; height: 28px; line-height: 28px; text-align: center;
  border-radius: 50%; color: #fff; cursor: pointer; font-size: 15px;
}
.m-nav-list { padding: 8px 0; flex: 1; }
.m-nav-section { padding: 4px 0; }
.m-nav-section + .m-nav-section { border-top: 1px solid var(--mh-line-soft); }
.m-nav-group-title {
  padding: 12px 20px 4px;
  font-size: 12px; color: var(--mh-text-3); letter-spacing: 0.5px;
}
.m-nav-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px;
  font-size: 15px; color: var(--mh-text-1);
  border-left: 3px solid transparent;
  transition: background var(--mh-dur) var(--mh-ease), color var(--mh-dur) var(--mh-ease);
  text-decoration: none;
}
.m-nav-link:hover, .m-nav-link.is-active {
  color: var(--mh-primary); background: var(--mh-primary-light);
  border-left-color: var(--mh-primary);
}
.m-nav-link .iconfont { font-size: 12px; color: var(--mh-text-4); }
.m-nav-sub { padding: 0 0 6px; background: var(--mh-bg-soft); }
.m-nav-sub .m-nav-link { padding: 11px 20px 11px 36px; font-size: 14px; color: var(--mh-text-2); }
.m-nav-sub .m-nav-link:hover { background: var(--mh-bg-card); }
.m-nav-link-sale { color: var(--mh-price) !important; }
.m-nav-foot {
  padding: 16px;
  border-top: 1px solid var(--mh-line);
  display: flex; gap: 10px;
}
.m-nav-foot .btn { flex: 1; height: 42px; line-height: 42px; text-align: center; }
.m-nav-user {
  display: none; align-items: center; gap: 10px;
  padding: 6px 4px; width: 100%;
}
.m-nav-user .head-img {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; flex-shrink: 0; background: var(--mh-primary);
}
.m-nav-user .name {
  flex: 1; font-size: 14px; color: var(--mh-text-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.m-nav-user .m-nav-logout {
  color: var(--mh-text-3); cursor: pointer; font-size: 13px;
  padding: 6px 10px; border-radius: var(--mh-radius);
}
.m-nav-user .m-nav-logout:hover { color: var(--mh-primary); background: var(--mh-primary-light); }

/* —— ≤1200px：收紧搜索/导航 —— */
@media screen and (max-width: 1200px) {
  .nav-header { gap: 18px; padding: 12px 16px !important; }
  .nav-icon img { height: 44px; max-width: 180px; }
  .nav-search-wrap { max-width: 460px; }
  .nav-search-btn { padding: 0 22px; }
  .mh-cats { width: 200px; }
  .nav-menu .nav-item { padding: 0 15px; font-size: 14px; }
}

/* —— ≤992px：启用移动端导航 —— */
@media screen and (max-width: 992px) {
  .mh-topbar-left .mh-topbar-slogan { display: none; }
  .mh-topbar-link { font-size: 11px; }
  .nav-header { height: auto !important; flex-wrap: wrap; gap: 10px; padding: 10px 14px !important; }
  .nav-left { flex: 0 0 auto; }
  .nav-icon img { height: 38px; max-width: 150px; }
  /* 搜索框换行占满 */
  .nav-search-wrap { order: 3; flex: 1 1 100%; max-width: 100%; }
  .nav-search { height: 38px; }
  .nav-search-btn { padding: 0 18px; font-size: 14px; }
  .nav-search-hot { display: none; }
  /* 隐藏橙色导航条与左分类 mega、菜单、下拉面板 */
  .mh-nav-band, .nav-cont { display: none !important; }
  .nav-right { gap: 10px; }
  .nav-cart-text { display: none; }
  .nav-cart { padding: 0 12px; }
  .nav-toggle { display: block; }
  .aside-tools { display: none !important; }
}

/* —— ≤600px —— */
@media screen and (max-width: 600px) {
  .mh-topbar { font-size: 11px; }
  .mh-topbar-right .mh-topbar-sep:nth-last-child(-n+5),
  .mh-topbar-right > a { display: none; }
  .mh-topbar-right > a:last-of-type { display: inline; }
  .nav-icon img { height: 34px; max-width: 130px; }
  .nav-toggle { width: 24px; height: 20px; }
  .nav-toggle span:nth-child(2) { top: 9px; }
  .nav-toggle span:nth-child(3) { top: 18px; }
  body.nav-open .nav-toggle span:nth-child(1),
  body.nav-open .nav-toggle span:nth-child(3) { top: 9px; }
}
