:root {  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1a1d23;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #b98a2f;
  --primary-dark: #9a7124;
  --dark: #14161a;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 移动端：禁止双击/捏合缩放（仅保留滚动），iOS Safari 另需 JS 拦截 gesture 事件 */
html { touch-action: pan-x pan-y; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* sticky footer：main 占据剩余空间，页脚在内容不足一屏时也贴在视口底部 */
main { flex: 1 0 auto; }
/* 认证页（登录/注册）：页脚与主体深色区相连，间距由 .login-page 自身 padding 提供 */
body.front-auth .site-footer { margin-top: 0; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* 仅屏幕阅读器/搜索引擎可见：用于语义化标题，不占视觉空间 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶栏 ---------- */
.site-header {
  background: var(--dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  white-space: nowrap;
}

.logo span { color: var(--primary); }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; font-size: 26px; line-height: 1; }

.main-nav { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; }
.main-nav a, .main-nav .nav-link { color: #d1d5db; font-size: 15px; padding: 6px 0; display: inline-block; cursor: pointer; user-select: none; }
.main-nav a:hover, .main-nav a.active,
.main-nav .nav-link:hover, .main-nav .nav-link.active { color: var(--primary); }
.nav-link .caret { margin-left: 4px; font-size: 11px; opacity: .8; }

/* Nav dropdown: desktop default hidden, hover on .has-dropdown shows it */
.main-nav .nav-item { position: relative; }
.main-nav .nav-sub-toggle { display: none; }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 780px;
  max-width: 920px;
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  border: 1px solid var(--border);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s, margin-top .15s, visibility .15s;
  z-index: 200;
  /* 严禁 transform，避免创建 stacking context 把右侧独立 flyout 强制裁切到本盒子内 */
  transform: none !important;
}
/* 桌面 hover 规则必须限定在真正支持悬停的设备：
   触屏点按会产生粘滞 :hover，若不隔离，checkbox 收起面板后该规则仍命中，
   强制 opacity:1 / visibility:visible / overflow:visible，
   导致"容器(max-height)缩了但分类内容溢出仍显示"。 */
@media (hover: hover) and (pointer: fine) {
  .has-dropdown:hover > .nav-dropdown,
  .has-dropdown:hover > .nav-dropdown-label ~ .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    margin-top: 0;
    overflow: visible;   /* 允许右侧独立子分类 flyout 溢出父 dropdown 边框 */
  }
}
/* checkbox 勾选态（桌面端 checkbox 隐藏，实际由移动端面接手风琴使用） */
.nav-sub-toggle:checked ~ .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  margin-top: 0;
  overflow: visible;
}

/* ---- Brands ▾ 固定菜单：下拉品牌列表 + hover 品牌行右侧弹二级子分类下拉 ---- */
/* 覆盖 .nav-dropdown 基础的 780px 宽：一级下拉是窄列表 */
.brands-cascade-panel {
  min-width: 250px;
  max-width: 290px;
}
.brands-cascade-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background: #fff;
}
.brands-cascade-item { position: relative; }
.brands-cascade-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.brands-cascade-item > a .meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.brands-cascade-item > a .count { color: var(--muted); font-size: 12px; font-weight: 400; }
.brands-cascade-item > a .flyout-caret { color: #cbd5e1; font-size: 12px; }
.brands-cascade-item > a:hover,
.brands-cascade-item.has-flyout:hover > a {
  background: #f8f9fb;
  border-left-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}
/* 二级下拉：子分类列表，出现在品牌行右侧（flyout 是 item 的子元素，hover 它不会丢 :hover） */
.brands-cascade-flyout {
  position: absolute;
  left: calc(100% - 6px);
  top: -9px;
  min-width: 280px;
  max-width: 340px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
  padding: 10px 12px;
  display: none;
  z-index: 210;
}
.brands-cascade-flyout::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0;
  bottom: 0;
  width: 10px;
  background: transparent;
}
.brands-cascade-item:hover > .brands-cascade-flyout { display: block; }
/* 列表末尾品牌：二级下拉向上展开，避免超出视口底部 */
.brands-cascade-item:nth-last-child(-n+4) > .brands-cascade-flyout {
  top: auto;
  bottom: -9px;
}

/* 移动端行内手风琴开关 / "查看全部品牌"入口：桌面端隐藏（桌面继续走 hover 右侧浮层） */
.cascade-sub-toggle { display: none; }
.cascade-toggle-label { display: none; }
.flyout-all-row { display: none; }
.cascade-flyout-head {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.cascade-flyout-head a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.cascade-flyout-head a:hover { color: var(--primary-dark); }
.cascade-flyout-head a .count { color: var(--muted); font-size: 12px; font-weight: 400; }
.cascade-flyout-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cascade-flyout-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  line-height: 1.3;
}
.cascade-flyout-list li a:hover { background: #fff8ec; color: var(--primary-dark); }
.cascade-flyout-list li a .count { color: var(--muted); font-size: 12px; font-weight: 400; }

/* 桌面：隐藏 Brands ▾ 移动触发器（label/checkbox），让 .has-dropdown:hover 控制显示
   注意：.main-nav .nav-link{display:inline-block} 优先级(0,2,0)更高，
   所以这里必须用 .brands-dropdown .brands-trigger-mobile(0,2,0) 且位于其之后才能压住 */
.brands-dropdown .brands-trigger-mobile { display: none; }
.brands-dropdown > .brands-trigger {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
#nav-brands-dd-toggle { display: none; }

/* ---- Brands: 单列品牌列表 + 右侧二级子菜单 ---- */
.brands-dropdown-split {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 340px;
  max-height: 70vh;
}
.brand-list {
  list-style: none;
  padding: 10px 0;
  margin: 0;
  border-right: 1px solid var(--border);
  background: #fafafa;
  overflow-y: auto;
  max-height: 70vh;
}
.brand-list .brand-row a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  color: var(--text);
  font-size: 14px;
  border-left: 3px solid transparent;
  line-height: 1.3;
}
.brand-list .brand-row a .brand-name-text { flex: 1; min-width: 0; }
.brand-list .brand-row a .count { color: var(--muted); font-size: 12px; font-weight: 400; }
.brand-list .brand-row a .brand-row-caret {
  color: #cbd5e1;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .15s, transform .15s, color .15s;
  font-size: 14px;
}
.brand-list .brand-row:hover > a,
.brand-list .brand-row.is-active > a {
  background: #fff;
  border-left-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}
.brand-list .brand-row:hover > a .brand-row-caret,
.brand-list .brand-row.is-active > a .brand-row-caret {
  opacity: 1;
  transform: translateX(0);
  color: var(--primary);
}

/* ---- Brands: 单列简洁下拉（无右侧分类面板） ---- */
.brands-dropdown-simple {
  min-width: 260px;
  max-width: 320px;
  padding: 8px 0;
}
.brands-column {
  border-right: 0;
  background: #fff;
  max-height: 60vh;
}
.brands-column .brand-row a .brand-row-caret { display: none; }

/* ---- Brands: 子分类单列弹出（右侧独立一列） ---- */
.brands-dropdown-column-single {
  grid-template-columns: 230px 280px;
  min-height: 260px;
  max-width: 540px;
}
.brands-dropdown-column-single .brand-cat-empty { display: none; }
.brands-dropdown-column-single .brand-cat-pane {
  inset: 0;
  padding: 14px 18px;
}
.brands-dropdown-column-single .pane-list-single {
  columns: 1;
  column-gap: 0;
}
.brands-dropdown-column-single .pane-list-single li a {
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.25;
}
.brands-dropdown-column-single .pane-head {
  margin-bottom: 8px;
  padding-bottom: 8px;
}
.brands-dropdown-column-single .pane-head a { font-size: 16px; }

/* ---- Brands: 子分类真正独立弹窗（每品牌行独立 flyout，不与父 dropdown 同容器宽度） ---- */
.brands-dropdown-flyout {
  min-width: 230px;
  max-width: 260px;
  padding: 6px 0;
  overflow: visible;        /* 关键：允许子 flyout 从右边缘溢出 */
  clip-path: none;         /* 防 Safari/Chrome 对 transformed 容器的边界裁切 */
}
/* 单独去掉 brands 一级下拉的 780px 最小宽（否则留下一大片空白，
   鼠标从品牌行→右侧 flyout 移动时容易离开 has-dropdown 区域而关闭） */
.nav-dropdown.brands-dropdown-flyout {
  min-width: 260px;
  max-width: 260px;
  width: 260px;
}
.brands-brand-col {
  background: #fff;
  border-right: 0;
  padding: 0;
  max-height: 65vh;
  overflow-y: auto;
  overflow-x: visible;
}
.brands-brand-col .brand-row {
  position: relative;       /* 定位锚点：每一行自己的 flyout 从 li 右边展开 */
}
.brands-brand-col .brand-row > a {
  padding: 10px 14px;
}
/* ====== 顶栏品牌：Home 右侧直接列出，每个品牌是独立菜单项，hover 弹自己的子分类 ====== */

/* ---------- 桌面端：品牌横排（与 Home 平级） + hover 弹出子分类 ----------
   样式与 .main-nav .nav-link 保持一致：高度/颜色/字号/hover 色/caret 全对齐。 */
.nav-brands-bar {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}
.nav-brands-bar .brand-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}
/* 与 .main-nav a/.nav-link 一致：color / font-size / hover-color 用同主题；垂直居中、高度与 header 对齐 */
.nav-brands-bar .nav-brand-link {
  display: inline-flex;
  align-items: center;
  height: 56px;                      /* 与 header 垂直居中对齐 */
  padding: 0 10px;                   /* 横向紧凑，视觉上与 Home 连排 */
  margin: 0 4px;                     /* 与 Home link 同层级间隔感 */
  font-size: 15px;                   /* 与 .main-nav a 相同字号 */
  font-weight: 500;
  color: #d1d5db;                    /* 与 .main-nav .nav-link 相同默认文字色（深色头） */
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .12s ease, border-color .12s ease, background-color .12s ease;
}
.nav-brands-bar .nav-brand-link:hover,
.nav-brands-bar .brand-item.has-submenu:hover > .nav-brand-link,
.nav-brands-bar .brand-item.has-submenu:focus-within > .nav-brand-link {
  color: var(--primary);             /* 与 .main-nav a:hover 相同高亮色（#f59e0b 主色） */
  border-bottom-color: var(--primary);
  background-color: rgba(245, 158, 11, 0.06);
}
.nav-brands-bar .nav-brand-link .sub-caret {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;                   /* 与 .nav-link .caret 一致 */
  color: rgba(209, 213, 219, 0.8);   /* 与 .nav-link .caret opacity .8 等价 */
  transition: transform .12s ease, color .12s ease;
}
.nav-brands-bar .brand-item.has-submenu:hover > .nav-brand-link .sub-caret,
.nav-brands-bar .brand-item.has-submenu:focus-within > .nav-brand-link .sub-caret {
  transform: rotate(180deg);
  color: var(--primary);
}

/* 子分类卡片：绝对定位在品牌名下方居中（仅桌面） */
.brand-submenu {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 240px;
  max-width: 320px;
  width: max-content;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
  padding: 12px 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
  z-index: 950;
}
/* 透明桥：链接↔卡片之间 2–4px 间隙不触发 hover 丢失 */
.brand-submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  height: 6px;
  background: transparent;
  pointer-events: auto;
}
.brand-item.has-submenu:hover > .brand-submenu,
.brand-item.has-submenu:focus-within > .brand-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.brand-submenu-head {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.brand-submenu-head a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.brand-submenu-head a:hover { color: var(--primary-dark); }
.brand-submenu-head a .count { color: var(--muted); font-size: 12px; font-weight: 400; }
.brand-submenu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 1;
}
.brand-submenu-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  line-height: 1.3;
}
.brand-submenu-list li a:hover {
  background: #fff8ec;
  color: var(--primary-dark);
}
.brand-submenu-list li a .count { color: var(--muted); font-size: 12px; font-weight: 400; }

/* ---------- 移动端（≤767px） ----------
   独立品牌条隐藏：移动端品牌导航统一走上方 Brands ▾ 手风琴（可开可关）。
   否则汉堡菜单里会有两份品牌列表，关闭 Brands 后下方品牌条仍在，看起来"关不掉"。 */
@media (max-width: 767px) {
  .nav-brands-bar {
    display: none;
  }
  .nav-brands-bar .brand-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid #2a2f38;   /* 与 .main-nav .nav-link border-bottom 一致 */
  }
  /* 对齐基准：.main-nav .nav-link { padding:10px 6px; border-bottom:1px solid #2a2f38; color:#d1d5db; font-size:15px; } */
  .nav-brands-bar .nav-brand-link {
    height: auto;
    min-height: 0;
    padding: 10px 6px;                 /* 与 .main-nav .nav-link 相同内边距 */
    margin: 0;                         /* 去掉桌面 margin */
    color: #d1d5db;                    /* 与 .main-nav .nav-link 默认色一致 */
    border-bottom: 0 !important;       /* 分隔线由父 .brand-item 负责，与其它链接视觉一致 */
    font-size: 15px;                   /* 与 .main-nav a 相同字号 */
    font-weight: 500;
    justify-content: space-between;
    white-space: normal;
  }
  .nav-brands-bar .nav-brand-link:hover,
  .nav-brands-bar .brand-item.has-submenu:hover > .nav-brand-link,
  .nav-brands-bar .brand-item.has-submenu:focus-within > .nav-brand-link {
    background: #191d24;
    color: var(--primary);             /* 与 .main-nav a:hover 同主题高亮 */
  }
  .nav-brands-bar .nav-brand-link .sub-caret {
    color: rgba(209, 213, 219, 0.8);   /* 与桌面 caret / .nav-link .caret 对齐 */
    font-size: 11px;
  }
  /* 子分类面板：缩进与 .nav-dropdown 内嵌套保持一致（左 12px 层叠感） */
  .brand-submenu {
    position: static;
    transform: none;
    min-width: 0;
    max-width: none;
    width: auto;
    background: transparent;
    color: #e5e7eb;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 2px 6px 10px 20px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    transition: none;
    z-index: auto;
  }
  .brand-submenu::before { display: none; }
  .brand-item.has-submenu:hover > .brand-submenu,
  .brand-item.has-submenu:focus-within > .brand-submenu {
    transform: none;
    display: block;
  }
  .brand-submenu-head {
    padding-bottom: 4px;
    border-bottom: 1px solid #232833;
    margin-bottom: 4px;
  }
  .brand-submenu-head a { color: var(--primary); font-size: 14px; font-weight: 600; }
  .brand-submenu-list li a {
    color: #d1d5db;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 0;
  }
  .brand-submenu-list li a:hover { background: #191d24; color: #fff; }
  .brand-submenu-list li a .count { color: #6b7280; }
}

.brand-cat-panes {
  position: relative;
  padding: 20px 24px;
  overflow-y: auto;
  max-height: 70vh;
  background: #fff;
}
.brand-cat-pane {
  position: absolute;
  inset: 20px 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s, visibility .12s;
}
.brand-cat-empty {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  gap: 14px;
}
.brand-cat-empty .hint { font-size: 14px; max-width: 280px; }
.brand-cat-empty .btn-outline { border-color: var(--border); }

.pane-head { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.pane-head a {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: inline-block;
}
.pane-head a:hover { color: var(--primary-dark); }
.pane-head a .count { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 6px; }

.pane-list {
  list-style: none;
  columns: 2;
  column-gap: 16px;
}
.pane-list li { break-inside: avoid; }
.pane-list li a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--text);
  border-radius: 6px;
}
.pane-list li a:hover {
  background: #fff8ec;
  color: var(--primary-dark);
}
.pane-list li a .count { color: var(--muted); font-size: 12px; font-weight: 400; }

/* 通过 :has() 切换二级子菜单（Chrome/Edge/Safari/Firefox 121+ 均支持） */
.brands-dropdown-split:has(.brand-row-1:hover) .brand-cat-pane-1,
.brands-dropdown-split:has(.brand-row-2:hover) .brand-cat-pane-2,
.brands-dropdown-split:has(.brand-row-3:hover) .brand-cat-pane-3,
.brands-dropdown-split:has(.brand-row-4:hover) .brand-cat-pane-4,
.brands-dropdown-split:has(.brand-row-5:hover) .brand-cat-pane-5,
.brands-dropdown-split:has(.brand-row-6:hover) .brand-cat-pane-6,
.brands-dropdown-split:has(.brand-row-7:hover) .brand-cat-pane-7,
.brands-dropdown-split:has(.brand-row-8:hover) .brand-cat-pane-8,
.brands-dropdown-split:has(.brand-row-9:hover) .brand-cat-pane-9,
.brands-dropdown-split:has(.brand-row-10:hover) .brand-cat-pane-10,
.brands-dropdown-split:has(.brand-row-11:hover) .brand-cat-pane-11,
.brands-dropdown-split:has(.brand-row-12:hover) .brand-cat-pane-12,
.brands-dropdown-split:has(.brand-row-13:hover) .brand-cat-pane-13,
.brands-dropdown-split:has(.brand-row-14:hover) .brand-cat-pane-14,
.brands-dropdown-split:has(.brand-row-15:hover) .brand-cat-pane-15,
.brands-dropdown-split:has(.brand-row-16:hover) .brand-cat-pane-16,
.brands-dropdown-split:has(.brand-row-17:hover) .brand-cat-pane-17,
.brands-dropdown-split:has(.brand-row-18:hover) .brand-cat-pane-18,
.brands-dropdown-split:has(.brand-row-19:hover) .brand-cat-pane-19,
.brands-dropdown-split:has(.brand-row-20:hover) .brand-cat-pane-20,
.categories-dropdown-split:has(.cat-row-1:hover)  .cat-pane-1,
.categories-dropdown-split:has(.cat-row-2:hover)  .cat-pane-2,
.categories-dropdown-split:has(.cat-row-3:hover)  .cat-pane-3,
.categories-dropdown-split:has(.cat-row-4:hover)  .cat-pane-4,
.categories-dropdown-split:has(.cat-row-5:hover)  .cat-pane-5,
.categories-dropdown-split:has(.cat-row-6:hover)  .cat-pane-6,
.categories-dropdown-split:has(.cat-row-7:hover)  .cat-pane-7,
.categories-dropdown-split:has(.cat-row-8:hover)  .cat-pane-8,
.categories-dropdown-split:has(.cat-row-9:hover)  .cat-pane-9,
.categories-dropdown-split:has(.cat-row-10:hover) .cat-pane-10,
.categories-dropdown-split:has(.cat-row-11:hover) .cat-pane-11,
.categories-dropdown-split:has(.cat-row-12:hover) .cat-pane-12,
.categories-dropdown-split:has(.cat-row-13:hover) .cat-pane-13,
.categories-dropdown-split:has(.cat-row-14:hover) .cat-pane-14,
.categories-dropdown-split:has(.cat-row-15:hover) .cat-pane-15,
.categories-dropdown-split:has(.cat-row-16:hover) .cat-pane-16,
.categories-dropdown-split:has(.cat-row-17:hover) .cat-pane-17,
.categories-dropdown-split:has(.cat-row-18:hover) .cat-pane-18,
.categories-dropdown-split:has(.cat-row-19:hover) .cat-pane-19,
.categories-dropdown-split:has(.cat-row-20:hover) .cat-pane-20,
.categories-dropdown-split:has(.cat-row-21:hover) .cat-pane-21,
.categories-dropdown-split:has(.cat-row-22:hover) .cat-pane-22,
.categories-dropdown-split:has(.cat-row-23:hover) .cat-pane-23,
.categories-dropdown-split:has(.cat-row-24:hover) .cat-pane-24,
.categories-dropdown-split:has(.cat-row-25:hover) .cat-pane-25,
.categories-dropdown-split:has(.cat-row-26:hover) .cat-pane-26,
.categories-dropdown-split:has(.cat-row-27:hover) .cat-pane-27,
.categories-dropdown-split:has(.cat-row-28:hover) .cat-pane-28,
.categories-dropdown-split:has(.cat-row-29:hover) .cat-pane-29,
.categories-dropdown-split:has(.cat-row-30:hover) .cat-pane-30,
.categories-dropdown-split:has(.cat-row-31:hover) .cat-pane-31,
.categories-dropdown-split:has(.cat-row-32:hover) .cat-pane-32,
.categories-dropdown-split:has(.cat-row-33:hover) .cat-pane-33,
.categories-dropdown-split:has(.cat-row-34:hover) .cat-pane-34,
.categories-dropdown-split:has(.cat-row-35:hover) .cat-pane-35,
.categories-dropdown-split:has(.cat-row-36:hover) .cat-pane-36,
.categories-dropdown-split:has(.cat-row-37:hover) .cat-pane-37,
.categories-dropdown-split:has(.cat-row-38:hover) .cat-pane-38,
.categories-dropdown-split:has(.cat-row-39:hover) .cat-pane-39,
.categories-dropdown-split:has(.cat-row-40:hover) .cat-pane-40,
.categories-dropdown-split:has(.cat-row-41:hover) .cat-pane-41,
.categories-dropdown-split:has(.cat-row-42:hover) .cat-pane-42,
.categories-dropdown-split:has(.cat-row-43:hover) .cat-pane-43,
.categories-dropdown-split:has(.cat-row-44:hover) .cat-pane-44,
.categories-dropdown-split:has(.cat-row-45:hover) .cat-pane-45,
.categories-dropdown-split:has(.cat-row-46:hover) .cat-pane-46,
.categories-dropdown-split:has(.cat-row-47:hover) .cat-pane-47,
.categories-dropdown-split:has(.cat-row-48:hover) .cat-pane-48,
.categories-dropdown-split:has(.cat-row-49:hover) .cat-pane-49,
.categories-dropdown-split:has(.cat-row-50:hover) .cat-pane-50,
.categories-dropdown-split:has(.cat-row-51:hover) .cat-pane-51,
.categories-dropdown-split:has(.cat-row-52:hover) .cat-pane-52,
.categories-dropdown-split:has(.cat-row-53:hover) .cat-pane-53,
.categories-dropdown-split:has(.cat-row-54:hover) .cat-pane-54,
.categories-dropdown-split:has(.cat-row-55:hover) .cat-pane-55,
.categories-dropdown-split:has(.cat-row-56:hover) .cat-pane-56,
.categories-dropdown-split:has(.cat-row-57:hover) .cat-pane-57,
.categories-dropdown-split:has(.cat-row-58:hover) .cat-pane-58,
.categories-dropdown-split:has(.cat-row-59:hover) .cat-pane-59,
.categories-dropdown-split:has(.cat-row-60:hover) .cat-pane-60 {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.brands-dropdown-split:has([class*="brand-row-"]:hover) .brand-cat-empty,
.categories-dropdown-split:has([class*="cat-row-"]:hover) .brand-cat-empty {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.header-search { display: flex; margin-left: auto; }
/* 移动端专用搜索框：桌面端隐藏 */
.header-search-mobile { display: none; }
.header-search input {
  padding: 8px 12px;
  border: 1px solid #374151;
  background: #1f242c;
  color: #fff;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
  min-width: 0;
  width: 180px;
}
.header-search button {
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-size: 14px;
}

/* 头部用户状态区（Login / Register / 用户名 + Logout） */
.header-auth { display: flex; align-items: center; gap: 14px; margin-left: 14px; }
.header-auth .auth-user { color: var(--muted); cursor: default; white-space: nowrap; }
.header-auth .auth-logout-form { display: inline-flex; margin: 0; }
.header-auth button.nav-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: inherit;
}
.header-auth button.nav-link:hover { color: var(--primary); }

/* 移动端菜单 */
@media (max-width: 767px) {
  .main-nav .header-auth {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    margin-top: 10px;
  }
  .main-nav .header-auth .auth-user { padding: 10px 6px; border-bottom: 1px solid #2a2f38; }
  .main-nav .header-auth .auth-logout-form { border-bottom: 1px solid #2a2f38; }
  .main-nav .header-auth button.nav-link { padding: 10px 6px; width: 100%; text-align: left; }
  .main-nav .header-auth a.nav-link { padding: 10px 6px; border-bottom: 1px solid #2a2f38; }
  .nav-toggle-label { display: block; }

  /* 顶栏：Logo 居左，汉堡按钮与购物车靠右固定一排（菜单展开为下拉面板，不占顶栏空间）
     flex-wrap：让移动端搜索框单独落到第二排 */
  .header-inner { gap: 14px; flex-wrap: wrap; }
  .site-header .logo { margin-right: auto; }
  .header-cart {
    min-width: 36px;
    min-height: 36px;
    flex-shrink: 0;
    margin-left: 0;
  }
  /* 搜索框第二排：全宽，输入框自适应 */
  .header-search-mobile {
    display: flex;
    width: 100%;
    margin: 0;
  }
  .header-search-mobile input { flex: 1; width: auto; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 4px;
    border-top: 1px solid #2a2f38;
  }
  .main-nav .nav-link { padding: 10px 6px; border-bottom: 1px solid #2a2f38; }
  .main-nav .nav-item.has-dropdown { display: block; }
  .main-nav .nav-sub-toggle { display: none; }
  .nav-dropdown-label {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 10px 6px;
    border-bottom: 1px solid #2a2f38;
    color: #d1d5db;
  }
  .nav-dropdown-label .caret { transition: transform .15s; }
  .nav-sub-toggle:checked + .nav-dropdown-label .caret { transform: rotate(180deg); }
  .nav-dropdown {
    position: static;
    transform: none !important;
    left: 0;
    min-width: 0;
    max-width: 100%;
    width: auto;
    background: #0f1217;
    color: #e5e7eb;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    transition: max-height .25s ease, opacity .15s, visibility .15s;
    margin: 0 -6px;
  }
  .nav-sub-toggle:checked ~ .nav-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
    max-height: 1000vh !important;
    overflow-y: auto;
  }
  /* 移动：拆分面板 → 扁平单列折叠品牌区 */
  .brands-dropdown-split {
    display: block;
    grid-template-columns: none;
    min-height: 0;
    max-height: none;
    background: transparent;
    color: #e5e7eb;
  }
  .brand-list {
    padding: 0;
    background: transparent;
    border-right: 0;
    overflow: visible;
    max-height: none;
  }
  .brand-list .brand-row {
    border-bottom: 1px solid #2a2f38;
  }
  .brand-list .brand-row a {
    color: #f3f4f6;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 10px;
    border-left: 0;
    background: transparent;
  }
  .brand-list .brand-row:hover > a { background: #191d24; color: #f3f4f6; border-left: 0; font-weight: 600; }
  .brand-list .brand-row a .count { color: #9ca3af; font-size: 12px; }
  .brand-list .brand-row a .brand-row-caret { display: none; }

  .brand-cat-panes {
    padding: 0;
    background: transparent;
    max-height: none;
    overflow: visible;
  }
  .brand-cat-empty { display: none; }
  .brand-cat-pane {
    position: static;
    inset: auto;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    padding: 4px 10px 12px;
    border-bottom: 1px dashed #232833;
    margin: 0;
  }
  .brand-cat-pane:last-child { border-bottom: 0; }
  .pane-head {
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #232833;
  }
  .pane-head a { font-size: 13px; color: var(--primary); }
  .pane-list { columns: 1; column-gap: 0; }
  .pane-list li a {
    font-size: 13px;
    color: #d1d5db;
    padding: 5px 10px;
    border-radius: 0;
  }
  .pane-list li a:hover { background: #191d24; color: #fff; }
  .pane-list li a .count { color: #6b7280; }
  /* 覆盖桌面 hover → mobile 不需要 :has 切换 */
  .brands-dropdown-split:has([class*="brand-row-"]:hover) .brand-cat-empty { display: none; }

  /* 固定菜单 Brands ▾（两列面板）：移动端扁平化为"Brands▾ checkbox 展开 → 品牌行 → 子分类内嵌" */
  /* 隐藏桌面 span 触发器：!important + 高优先级，压过 .nav-dropdown-label{display:flex!important} 与 .main-nav .nav-link */
  .main-nav .brands-dropdown > .brands-trigger { display: none !important; }
  .brands-trigger-mobile {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 10px 6px;
    border-bottom: 1px solid #2a2f38;
    color: #d1d5db;
    font-size: 15px;
    cursor: pointer;
  }
  .brands-trigger-mobile .caret { transition: transform .15s; }
  #nav-brands-dd-toggle:checked ~ .brands-trigger-mobile .caret { transform: rotate(180deg); }
  .brands-dropdown-panel {
    margin: 0 -6px;
  }
  .brands-cascade-panel { min-width: 0; max-width: 100%; }
  .brands-cascade-list {
    padding: 0;
    background: transparent;
  }
  .brands-cascade-item {
    position: static;
    border-bottom: 1px solid #2a2f38;
  }
  .brands-cascade-item > a,
  .brands-cascade-item > a:hover {
    display: none;
  }
  /* 品牌行手风琴开关 */
  .cascade-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 10px;
    color: #f3f4f6;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
  }
  .cascade-toggle-label:hover { background: #191d24; color: #f3f4f6; }
  .cascade-toggle-label .count { color: #9ca3af; font-size: 12px; font-weight: 400; }
  .cascade-toggle-label .flyout-caret {
    color: #9ca3af;
    display: inline-block;
    transition: transform .15s;
  }
  .cascade-sub-toggle:checked ~ .cascade-toggle-label .flyout-caret { transform: rotate(180deg); }

  /* 二级面板：内嵌静态布局，随 checkbox 显隐；!important 压过桌面 :hover 规则在触屏上的残留触发 */
  .brands-cascade-flyout {
    display: none !important;
    position: static;
    left: auto; top: auto; bottom: auto;
    min-width: 0; max-width: none; width: auto;
    background: transparent;
    border: 0; border-radius: 0;
    box-shadow: none;
    padding: 0 0 6px;
  }
  .brands-cascade-flyout::before { display: none; }
  .cascade-sub-toggle:checked ~ .brands-cascade-flyout { display: block !important; }
  /* "查看全部品牌"入口（品牌页链接，行内手风琴展开后可达） */
  .flyout-all-row { display: block; }
  .flyout-all-row a { color: var(--primary); font-weight: 600; }
  .flyout-all-row a:hover { color: #fff; }
  /* 深色透明底上的子分类链接配色 */
  .brands-cascade-flyout .cascade-flyout-list li a { color: #d1d5db; padding: 8px 10px; }
  .brands-cascade-flyout .cascade-flyout-list li a:hover { background: #191d24; color: #fff; }
  .brands-cascade-flyout .cascade-flyout-list li a .count { color: #6b7280; }

  /* 搜索已迁移到顶栏第二排，移动菜单内不再重复显示 */
  .main-nav .header-search { display: none; }
  .nav-toggle:checked ~ .main-nav { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #14161a 0%, #2b2110 100%);
  color: #fff;
  text-align: center;
  padding: 64px 16px;
}
.hero h1 { font-size: 32px; margin-bottom: 12px; }
.hero p { color: #cbd5e1; max-width: 640px; margin: 0 auto 24px; }
.hero .btn { margin: 0 6px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 0;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: inherit; }
.btn-outline:hover { background: rgba(0,0,0,.05); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { display: block; width: 100%; }

/* ---------- Nav 显示开关（后台 Brands/Categories 列表使用） ---------- */
.nav-switch {
  --h: 22px;
  --w: 40px;
  display: inline-flex;
  align-items: center;
  position: relative;
  width: var(--w);
  height: var(--h);
  background: #cbd5e1;
  border: 1px solid #cbd5e1;
  border-radius: calc(var(--h) / 2);
  cursor: pointer;
  vertical-align: middle;
  transition: background .2s, border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.nav-switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  width: calc(var(--h) - 6px);
  height: calc(var(--h) - 6px);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: left .2s, transform .2s, background .2s;
}
.nav-switch.is-on {
  background: var(--primary);
  border-color: var(--primary);
}
.nav-switch.is-on::after {
  left: calc(var(--w) - var(--h) + 4px);
}
.nav-switch:hover {
  box-shadow: 0 0 0 3px rgba(234,179,8,.18);
}
.nav-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.nav-switch-label {
  font-size: 12px;
  color: var(--muted);
  margin-left: 6px;
  user-select: none;
}
.nav-switch-form {
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
}
.nav-switch-form button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.nav-switch-form button:focus-visible .nav-switch {
  box-shadow: 0 0 0 3px rgba(234,179,8,.35);
  outline: none;
}

/* ---------- 区块 ---------- */
.section { padding: 40px 0; }
.section-title { font-size: 24px; margin-bottom: 20px; text-align: center; }
.section-title small { display: block; font-size: 14px; color: var(--muted); font-weight: 400; }

/* ---------- 品牌网格 ---------- */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.brand-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.brand-card:hover { transform: translateY(-2px); }
.brand-card h3 { font-size: 15px; margin-bottom: 4px; }
.brand-card p { color: var(--muted); font-size: 13px; }

@media (min-width: 640px) { .brand-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .brand-grid { grid-template-columns: repeat(5, 1fr); } }

/* ---------- USP 区块（首页 SEO） ---------- */
.usp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.usp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.usp-card h3 { font-size: 16px; margin-bottom: 8px; }
.usp-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }
@media (min-width: 640px) { .usp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .usp-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 首页品牌介绍区（SEO 文案） ---------- */
.home-intro h2 { font-size: 22px; margin-bottom: 16px; text-align: center; }
.home-intro p { color: var(--muted); line-height: 1.8; margin-bottom: 14px; font-size: 15px; }
.home-intro strong { color: var(--text); font-weight: 600; }
.home-intro a { color: var(--primary); text-decoration: underline; }
.home-intro-cta { text-align: center; margin-top: 10px; }

/* ---------- 产品网格 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.product-card .thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f1f2f4;
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card .name {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
}
.product-card .meta { font-size: 12px; color: var(--muted); }
.product-card .price-row { margin-top: auto; display: flex; align-items: baseline; gap: 8px; }
.price { color: var(--primary); font-weight: 700; font-size: 16px; }
.price-original { color: var(--muted); font-size: 13px; text-decoration: line-through; }

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3e8cf;
  color: var(--primary-dark);
}
.badge-muted { background: #eef0f3; color: var(--muted); }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.filter-bar select, .filter-bar input[type="number"], .filter-bar input[type="text"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  flex: 1 1 130px;
  min-width: 0;
}
.filter-bar .apply { flex: 0 0 auto; }

/* ---------- 分类 Chips ---------- */
.chip-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.selected, .chip.selected:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 分类 ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
  min-height: 96px;
}
.category-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}
.category-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.category-count { font-size: 13px; color: var(--muted); }

/* ---------- Shop 两栏布局（Categories Shop） ---------- */
.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 14px;
}
.shop-toolbar .shop-summary { flex:1; display:flex; align-items:baseline; gap:10px; }
.shop-toolbar .shop-sort select {
  padding: 8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface);
}

.shop {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: flex-start;
}
@media (max-width: 900px) { .shop { grid-template-columns: 1fr; } }

.shop-sidebar {
  position: sticky;
  top: 76px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  z-index: 50;
}
.shop-sidebar-head {
  display: none;
}
.shop-sidebar .shop-search input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 14px;
}
.shop-filter-block { margin-top: 18px; }
.shop-filter-block .btn.apply { padding: 8px 10px; }

.shop-filter-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 10px;
}

.brand-tree { list-style: none; padding: 0; margin: 0; }
.brand-node {
  border-bottom: 1px solid var(--border-light, #f0f0f0);
  padding: 8px 0;
}
.brand-node:last-child { border-bottom: 0; }
.brand-node-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-node-head .brand-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}
.brand-node-head .brand-name:hover { color: var(--primary); }
.brand-node-head .brand-count {
  color: var(--muted);
  font-size: 12px;
  opacity: .85;
}
.brand-node-head .brand-toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 2px 6px;
  color: var(--muted);
  font-size: 14px;
  transform: rotate(-90deg);
  transition: transform .2s ease;
}
.brand-node.is-open > .brand-node-head .brand-toggle { transform: rotate(0); }

.cat-list {
  list-style: none;
  padding: 6px 0 2px;
  margin: 0;
  display: none;
}
.brand-node.is-open > .cat-list { display: block; }
.cat-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px 5px 14px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
}
.cat-item a:hover { background: var(--bg); color: var(--primary); }
.cat-item.active a {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  font-weight: 600;
}
.cat-item .cat-count {
  font-size: 12px;
  color: var(--muted);
  opacity: .8;
}
.chip.tiny { padding: 2px 8px; font-size: 12px; }

/* ---------- 移动端侧边抽屉 ---------- */
.shop-overlay { display: none; }
@media (max-width: 900px) {
  .sidebar-toggle { display: inline-flex !important; }
  .shop-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(320px, 85vw);
    border-radius: 0;
    max-height: none;
    transform: translateX(-110%);
    transition: transform .25s ease;
    z-index: 999;
    padding-top: 44px;
  }
  .shop-sidebar.is-open { transform: translateX(0); box-shadow: 0 10px 40px rgba(0,0,0,.15); }
  .shop-sidebar-head {
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
  }
  .shop-sidebar-head .sidebar-close {
    background: transparent; border: 0; cursor: pointer;
    font-size: 22px; line-height: 1; color: var(--muted);
  }
  .shop-overlay.is-open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 998;
  }
  .brand-node.is-open > .cat-list { display: block; }
  /* 在移动端初始不展开任何品牌，除非有活跃项；此由模板中的 .is-open class 控制即可 */
}

/* ---------- 详情页 ---------- */
.product-detail { display: grid; gap: 24px; }
@media (min-width: 900px) { .product-detail { grid-template-columns: 1fr 1fr; } }

.gallery {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f1f2f4;
  border: 1px solid var(--border);
  aspect-ratio: 1/1;
}
.gallery-track {
  display: flex;
  height: 100%;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.gallery-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* 左右箭头 */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 2;
}
.gallery-arrow:hover { background: rgba(0,0,0,.7); }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

/* 圆点指示器 */
.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.gallery-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* ---------- 首页 H1（SEO 可见主标题） ---------- */
.home-h1 {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  margin: 32px 16px 8px;
  color: var(--dark);
  line-height: 1.3;
  letter-spacing: -0.5px;
}
.home-h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary);
  margin: 14px auto 0;
  border-radius: 2px;
}
@media (min-width: 640px) {
  .home-h1 { font-size: 34px; margin: 48px 24px 16px; letter-spacing: -1px; }
  .home-h1::after { width: 80px; margin-top: 18px; }
}

/* ---------- 首页轮播 ---------- */
.home-slides-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px;
}
.home-slides {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 7;
}
.home-slides-track {
  display: flex;
  height: 100%;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.home-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  position: relative;
}
.home-slide a { display: block; width: 100%; height: 100%; }
.home-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 24px 24px;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
}
.home-slide-caption h2 {
  font-size: 20px;
  margin: 0 0 6px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.home-slide-price {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
.home-slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.4);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 2;
}
.home-slide-arrow:hover { background: rgba(0,0,0,.7); }
.home-slide-prev { left: 16px; }
.home-slide-next { right: 16px; }
.home-slide-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.home-slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.home-slide-dot.active {
  background: #fff;
  transform: scale(1.3);
}
@media (max-width: 640px) {
  .home-slides { aspect-ratio: 4 / 3; }
  .home-slide-caption { padding: 24px 16px 16px; }
  .home-slide-caption h2 { font-size: 16px; }
  .home-slide-price { font-size: 18px; }
  .home-slide-arrow { width: 36px; height: 36px; font-size: 20px; }
}

.detail-info h1 { font-size: 22px; line-height: 1.4; margin-bottom: 12px; }
.detail-price { font-size: 26px; margin: 8px 0 16px; }
.detail-meta { display: grid; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.detail-meta b { color: var(--text); font-weight: 600; }
/* 详情页区块标题（H2，规格/描述） */
.detail-sub-heading { margin-top: 24px; font-size: 18px; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.spec-table td { border: 1px solid var(--border); padding: 8px 12px; font-size: 14px; }
.spec-table td:first-child { background: #fafafa; font-weight: 600; width: 40%; }
.detail-desc { margin-top: 12px; font-size: 14px; color: #374151; white-space: pre-line; }

/* ---------- 列表页 SEO 介绍文案 ---------- */
.shop-seo-intro {
    margin-top: 28px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: #374151;
}
.shop-seo-intro p { margin-bottom: 10px; }
.shop-seo-intro p:last-child { margin-bottom: 0; }
.shop-seo-intro a { color: var(--primary); }
.shop-seo-intro a:hover { text-decoration: underline; }

/* ---------- 面包屑 ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 16px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "/"; margin-right: 4px; color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- 分页 ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 24px 0; }
.pagination a, .pagination span {
  min-width: 36px;
  padding: 7px 10px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { color: var(--muted); opacity: .5; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--dark);
  color: #9ca3af;
  text-align: center;
  padding: 24px 16px;
  font-size: 13px;
  margin-top: 48px;
}

/* ---------- 页脚（E-E-A-T 信任信息区） ---------- */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 20px;
  text-align: left;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.2fr 1fr; } }
.footer-logo { font-weight: 700; font-size: 16px; color: #fff; letter-spacing: 1px; }
.footer-logo span { color: var(--primary); }
.footer-brand p { margin-top: 8px; line-height: 1.6; }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; align-content: start; }
.footer-links a { color: #d1d5db; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 16px; }

/* ---------- 政策类静态页正文 ---------- */
.policy-body { max-width: 820px; }
.policy-body h2 { font-size: 18px; margin: 28px 0 10px; }
.policy-body p, .policy-body li { line-height: 1.7; }
.policy-body ul { padding-left: 20px; margin: 10px 0; }
.policy-body a { text-decoration: underline; }

/* ---------- 后台 ---------- */
.admin-layout { display: flex; min-height: 100vh; background: var(--bg); }

.admin-sidebar {
  width: 220px;
  background: var(--dark);
  color: #cbd5e1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.admin-sidebar .side-logo { padding: 20px 16px; font-weight: 700; color: #fff; font-size: 17px; border-bottom: 1px solid #2a2f38; }
.admin-sidebar nav { display: flex; flex-direction: column; padding: 12px 8px; gap: 4px; flex: 1; }
.admin-sidebar nav a { padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.admin-sidebar nav a:hover { background: #1f242c; color: #fff; }
.admin-sidebar nav a.active { background: var(--primary); color: #fff; }
.side-footer { padding: 14px 16px; border-top: 1px solid #2a2f38; font-size: 13px; }
.side-footer form button { background: none; border: 0; color: #f87171; cursor: pointer; font-size: 13px; padding: 0; }

.admin-main { flex: 1; min-width: 0; padding: 20px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 10px; flex-wrap: wrap; }
.admin-topbar h1 { font-size: 20px; }

@media (max-width: 767px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: column; }
  .admin-sidebar nav { flex-direction: row; overflow-x: auto; padding: 8px; }
  .admin-sidebar nav a { white-space: nowrap; }
  .admin-main { padding: 14px; }
}

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 13px; color: var(--muted); }
.stat-card .value { font-size: 24px; font-weight: 700; margin-top: 4px; }

/* ---------- 表格 ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data th { background: #fafafa; font-weight: 600; white-space: nowrap; }
table.data tr:hover td { background: #fcfcfd; }
table.data .thumb-sm { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: #f1f2f4; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.status-on { background: #dcfce7; color: var(--success); }
.status-off { background: #fee2e2; color: var(--danger); }

/* ---------- 表单 ---------- */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); max-width: 720px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"],
.form-group input[type="number"], .form-group select, .form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.form-group textarea { min-height: 90px; resize: vertical; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.form-row { display: grid; gap: 12px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.inline-form { display: inline; }

/* ---------- 后台 switch 开关 ---------- */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}
.switch .slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider {
  background-color: #16a34a;
}
.switch input:checked + .slider::before {
  transform: translateX(20px);
}
.switch input:disabled + .slider {
  opacity: .5;
  cursor: not-allowed;
}

/* ---------- 后台表单提示 ---------- */
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 后台商品相册 ---------- */
.gallery-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.gallery-upload-btn { cursor: pointer; display: inline-flex; align-items: center; }
.gallery-upload-btn.disabled { opacity: .6; pointer-events: none; }
.gallery-count { font-size: 13px; color: var(--muted); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.gallery-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  cursor: move;
}
.gallery-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-cell.dragging { opacity: .4; }
.gallery-cover-badge {
  position: absolute; top: 4px; left: 4px;
  background: rgba(0,0,0,.65); color: #fff;
  font-size: 11px; padding: 1px 6px; border-radius: 4px;
}
.gallery-actions {
  position: absolute; bottom: 4px; left: 4px; right: 4px;
  display: flex; gap: 4px; justify-content: center;
}
.gallery-btn {
  flex: 1;
  padding: 3px 0;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  background: rgba(255,255,255,.9);
  color: #333;
  cursor: pointer;
}
.gallery-btn:hover:not(:disabled) { background: #fff; }
.gallery-btn:disabled { opacity: .35; cursor: not-allowed; }
.gallery-btn.gallery-del { background: rgba(220,38,38,.9); color: #fff; }
.gallery-btn.gallery-del:hover:not(:disabled) { background: #dc2626; }

/* ---------- 提示 ---------- */
.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-success { background: #dcfce7; color: #166534; }

/* ---------- 后台订单管理 ---------- */
.filter-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.order-admin-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.order-admin-grid .form-card { max-width: none; }
.status-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-form select { min-width: 200px; }

@media (max-width: 900px) {
  .order-admin-grid { grid-template-columns: 1fr; }
}
.alert-error { background: #fee2e2; color: #991b1b; }

/* ---------- 登录页 ---------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center;  padding: 16px; }
.login-card { background: #fff; border-radius: 14px; padding: 32px; width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.login-card h1 { font-size: 22px; text-align: center; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }

/* ---------- WhatsApp 浮动联系按钮 ---------- */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .28);
  z-index: 900;
  transition: transform .18s ease, box-shadow .18s ease;
}
.whatsapp-float:hover {
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
}
.whatsapp-float svg { display: block; }
@media (max-width: 767px) {
  .whatsapp-float { right: 16px; bottom: 16px; width: 50px; height: 50px; }
}

/* ---------- 质量保证弹窗（左下浮动入口 + 居中弹窗） ---------- */
.quality-float {
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .28);
  z-index: 900;
  transition: transform .18s ease, box-shadow .18s ease;
}
.quality-float:hover {
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(185, 138, 47, .5);
}
.quality-float svg { display: block; }

.quality-modal { position: fixed; inset: 0; z-index: 1100; }
.quality-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 26, .55);
  backdrop-filter: blur(2px);
}
.quality-modal-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-width: 400px;
  background: var(--surface);
  border-radius: 14px;
  padding: 32px 28px 26px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  animation: quality-pop .22s ease;
}
@keyframes quality-pop {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.quality-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}
.quality-modal-close:hover { color: var(--text); }
.quality-modal-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(185, 138, 47, .12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.quality-modal-card h3 { font-size: 20px; margin-bottom: 10px; }
.quality-modal-card p { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.quality-modal-card p strong { color: var(--primary-dark); }
.quality-modal-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 36px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.quality-modal-btn:hover { background: var(--primary-dark); }
.quality-modal-more {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.quality-modal-more:hover { color: var(--primary-dark); }

/* 弹窗打开时锁定页面滚动 */
body.quality-modal-open { overflow: hidden; }

@media (max-width: 767px) {
  .quality-float { left: 16px; bottom: 16px; width: 50px; height: 50px; }
  .quality-modal-card { padding: 26px 20px 22px; }
}

/* ---------- 质量保证页面 ---------- */
.quality-hero {
  background: linear-gradient(180deg, rgba(185, 138, 47, .10), transparent);
  text-align: center;
  padding: 56px 0 32px;
}
.quality-hero-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(185, 138, 47, .12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.quality-hero h1 { font-size: 32px; margin-bottom: 8px; }
.quality-hero p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 15px; }
.quality-hero p strong { color: var(--primary-dark); }

.quality-coverage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quality-coverage-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.quality-coverage-num { display: block; font-size: 34px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.quality-coverage-unit { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 2px 0 8px; }
.quality-coverage-item p { font-size: 13px; color: var(--muted); }

.quality-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quality-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.quality-card:hover { border-color: var(--primary); }
.quality-card h3 { font-size: 16px; margin-bottom: 8px; }
.quality-card p { font-size: 14px; color: var(--muted); }

.quality-steps { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.quality-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.quality-step-num {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quality-step h3 { font-size: 15px; margin-bottom: 4px; }
.quality-step p { font-size: 14px; color: var(--muted); }

.quality-cta {
  background: var(--dark);
  border-radius: 14px;
  padding: 40px 24px;
  text-align: center;
  color: #fff;
}
.quality-cta h2 { font-size: 24px; margin-bottom: 8px; }
.quality-cta p { color: rgba(255, 255, 255, .72); font-size: 14px; margin-bottom: 20px; }
.quality-cta-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  padding: 11px 32px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
}
.quality-cta-btn:hover { background: var(--primary-dark); color: #fff; }

@media (max-width: 767px) {
  .quality-hero h1 { font-size: 26px; }
  .quality-coverage, .quality-grid { grid-template-columns: 1fr; }
}

/* iOS Safari：输入框聚焦时若字号 < 16px 会自动放大页面；移动端统一兜底 */
@media (max-width: 767px) {
  .form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"],
  .form-group input[type="number"], .form-group select, .form-group textarea,
  .filter-bar select, .filter-bar input[type="number"], .filter-bar input[type="text"],
  .shop-toolbar .shop-sort select,
  .header-search input,
  .cart-qty-form input[type="number"] { font-size: 16px; }
}

/* ---------- 订单状态徽章 ---------- */
.order-status-pending { background: #fef3c7; color: #b45309; }
.order-status-confirmed { background: #dbeafe; color: #1d4ed8; }
.order-status-shipped { background: #ede9fe; color: #6d28d9; }
.order-status-completed { background: #dcfce7; color: var(--success); }
.order-status-cancelled { background: #fee2e2; color: var(--danger); }

/* ---------- 会员中心 ---------- */
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.account-nav { padding: 16px; position: sticky; top: 80px; }
.account-nav-user { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.account-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #b8860b);
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.account-nav-name { font-weight: 700; font-size: 15px; }
.account-nav nav { display: flex; flex-direction: column; gap: 2px; }
.account-nav nav a, .account-logout {
  display: block; padding: 9px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text); text-decoration: none;
  background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.account-nav nav a:hover, .account-logout:hover { background: var(--bg); }
.account-nav nav a.active { background: rgba(198, 156, 109, .12); color: var(--primary); font-weight: 600; }
.account-logout { color: var(--danger); }

.account-content { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.account-content .form-card { max-width: none; }
.account-welcome h2 { font-size: 22px; margin-bottom: 6px; }
.account-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.account-card-head h3 { margin: 0; }

.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; box-shadow: var(--shadow);
}
.stat-num { font-size: 26px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

.account-form-card h3 { margin-bottom: 16px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 4px; }
.account-form-card form + form { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--border); }
.form-checkbox label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.form-checkbox input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- 收货地址卡片 ---------- */
.address-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.address-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; font-size: 14px;
  background: var(--bg); transition: border-color .15s;
}
.address-card:hover { border-color: var(--primary); }
.address-card-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.address-default-badge {
  background: rgba(198, 156, 109, .14); color: var(--primary);
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.address-actions { display: flex; gap: 14px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.address-actions a { color: var(--primary); font-size: 13px; text-decoration: none; }
.address-delete {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--danger); font-size: 13px;
}

@media (max-width: 767px) {
  .address-grid { grid-template-columns: 1fr; }
}

/* ---------- 结算页地址选择 ---------- */
.checkout-address-card { cursor: pointer; position: relative; }
.checkout-address-radio { position: absolute; top: 14px; right: 14px; accent-color: var(--primary); }
.checkout-address-card.selected {
  border-color: var(--primary); border-width: 2px; padding: 13px 15px;
  box-shadow: 0 0 0 1px var(--primary);
}

@media (max-width: 767px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { position: static; }
  .stat-cards { grid-template-columns: 1fr; }
}

/* ---------- 头部购物车 ---------- */
.header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  padding: 4px;
  border-radius: 8px;
  transition: color .15s;
}
.header-cart:hover { color: var(--primary); }
/* 桌面端与导航保留小间距（.header-inner 已有 24px gap） */
@media (min-width: 768px) {
  .header-cart { margin-left: -10px; }
}
.cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 999px;
  text-align: center;
  padding: 0 5px;
}

/* ---------- 商品详情：数量与加购 ---------- */
.add-cart-form { margin-top: 20px; }
.product-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.product-actions .add-cart-form {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 0;
  flex: 1 1 auto;
}
.product-actions .qty-row { margin-bottom: 0; flex-shrink: 0; height: 52px; }
.product-actions .qty-row .qty-btn { width: 48px; height: 52px; font-size: 20px; }
.product-actions .qty-row input { width: 72px; height: 52px; font-size: 17px; }
.product-actions .btn-add-cart { flex: 1 1 auto; min-width: 160px; height: 52px; font-size: 17px; text-align: center; display: inline-flex; align-items: center; justify-content: center; }
.product-actions .btn-view-cart { flex-shrink: 0; height: 52px; font-size: 17px; padding: 10px 28px; display: inline-flex; align-items: center; }
@media (max-width: 420px) {
  .product-actions { flex-direction: column; align-items: stretch; }
  .product-actions .add-cart-form { flex-direction: column; align-items: stretch; }
  .product-actions .qty-row { justify-content: center; }
}
.qty-row { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 10px; }
.qty-row .qty-btn {
  width: 40px;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
}
.qty-row .qty-btn:first-child { border-radius: 8px 0 0 8px; }
.qty-row .qty-btn:last-child { border-radius: 0 8px 8px 0; }
.qty-row input {
  width: 64px;
  height: 42px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 0;
  border-right: 0;
  text-align: center;
  font-size: 15px;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-row input::-webkit-outer-spin-button,
.qty-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- 购物车页 ---------- */
.cart-empty { text-align: center; padding: 60px 16px; }
.cart-empty p { color: var(--muted); margin-bottom: 16px; font-size: 16px; }
.cart-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.cart-table .cart-product { display: flex; align-items: center; gap: 12px; }
.cart-table .cart-product img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.cart-qty-form input[type="number"] { width: 72px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; text-align: center; }
.cart-remove {
  background: none;
  border: 0;
  color: var(--danger);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.cart-remove:hover { background: #fee2e2; }

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}
.cart-summary h3 { font-size: 17px; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-bottom: 1px dashed var(--border); gap: 12px; }
.summary-row span:last-child { white-space: nowrap; }
.summary-total { border-bottom: 0; font-size: 17px; font-weight: 700; padding-top: 12px; margin-bottom: 14px; }
.cart-summary .btn { margin-top: 4px; }

/* ---------- 结算页 ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.checkout-form { max-width: none; }
.checkout-form h3 { margin-bottom: 16px; }

/* 游客结账地址表单：两列网格，地址/备注占整行 */
.guest-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.guest-fields .form-group-full { grid-column: 1 / -1; }
.guest-fields .req { color: var(--danger); }

@media (max-width: 560px) {
  .guest-fields { grid-template-columns: 1fr; }
}
.checkout-contact { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); text-align: center; display: flex; flex-direction: column; gap: 8px; }
.checkout-contact .btn-whatsapp { width: 100%; justify-content: center; font-size: 14px; padding: 11px 16px; }

/* ---------- 下单成功页 ---------- */
.order-confirm { max-width: 900px; margin: 0 auto; }
.confirm-head { text-align: center; margin-bottom: 24px; }
.confirm-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 32px;
  line-height: 64px;
}
.confirm-head h1 { font-size: 26px; margin-bottom: 8px; }
.confirm-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.confirm-cta p { color: var(--muted); margin-bottom: 16px; }
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
}
.btn-whatsapp:hover { background: #1eb858; color: #fff; }

/* PayPal 支付按钮（品牌金黄） */
.btn-paypal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #FFC439;
  color: #003087;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
}
.btn-paypal:hover { background: #f5bb2e; color: #003087; }
.btn-paypal.btn-block { width: 100%; }
.confirm-check-pending { background: #e6a23c; }
.order-detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.order-detail-grid .form-card { max-width: none; }
.order-detail-grid h3 { margin-bottom: 14px; }

@media (max-width: 900px) {
  .cart-layout, .checkout-layout, .order-detail-grid { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
