/* ============================================================
   theme.css — 基础主题样式，支持通过修改变量实现"换装"
   ============================================================ */

/* ========== 1. 主题变量（换肤入口） ========== */
:root {
  /* 主色 */
  --brand-primary: #1b2a3f;
  --brand-primary-hover: #2b3e58;

  /* 页面背景 */
  --bg-page: #f6f9fe;
  --bg-card: #ffffff;
  --bg-soft: #f2f7fe;
  --bg-soft-2: #f6f9fe;

  /* 文字 */
  --text-primary: #1e2b3c;
  --text-secondary: #5b6f87;
  --text-muted: #8a9bb3;
  --text-heading: #1b2a3f;

  /* 边框 / 分割 */
  --border-soft: #eef3fa;
  --border-input: #dae2ee;
  --border-hover: #b6c8e0;

  /* 状态色 */
  --color-success: #27ae60;
  --color-success-bg: #e8f8f0;
  --color-warning: #f7b731;
  --color-warning-bg: #fff8e6;
  --color-danger: #f35b5b;
  --color-danger-bg: #fdecec;
  --color-info: #1e9fff;

  /* 圆角 */
  --radius-sm: 0.5rem;
  --radius-md: 0.6rem;
  --radius-lg: 0.75rem;
  --radius-pill: 999px;

  /* 阴影 */
  --shadow-card: 0 4px 14px -4px rgba(20, 40, 70, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 8px 22px -6px rgba(20, 40, 70, 0.08);
  --shadow-popup: 0 10px 22px -10px rgba(0, 0, 0, 0.35);

  /* 字体 */
  --font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Consolas', 'Menlo', monospace;

  /* 间距 */
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 18px;
  --space-lg: 24px;
}

/* 可选的第二套主题：暖色（在 <html data-theme="warm"> 时生效） */
html[data-theme="warm"] {
  --brand-primary: #5a3e2b;
  --brand-primary-hover: #6f4f38;
  --bg-page: #fbf7f0;
  --bg-card: #ffffff;
  --bg-soft: #f7efe4;
  --bg-soft-2: #fbf3e8;
  --text-primary: #2e2118;
  --text-secondary: #7a6652;
  --text-muted: #a89788;
  --text-heading: #3b2a1e;
  --border-soft: #f1e5d5;
  --border-input: #e3d3c0;
  --border-hover: #c9b49a;
}

/* 可选的第三套主题：薄荷绿（在 <html data-theme="mint"> 时生效） */
html[data-theme="mint"] {
  --brand-primary: #2a5f4a;
  --brand-primary-hover: #367a5e;
  --bg-page: #f2fbf7;
  --bg-card: #ffffff;
  --bg-soft: #e6f6ef;
  --bg-soft-2: #f0faf5;
  --text-primary: #1d3c2e;
  --text-secondary: #557767;
  --text-muted: #8aa89a;
  --text-heading: #1e4131;
  --border-soft: #e2f2ea;
  --border-input: #cde5d9;
  --border-hover: #a8cfbf;
}

/* ========== 新增主题：玫瑰粉 Rose ========== */
html[data-theme="rose"] {
  /* 主色 */
  --brand-primary:        #7a2846;
  --brand-primary-hover:  #993b5c;

  /* 页面背景 */
  --bg-page:   #fdf5f8;
  --bg-card:   #ffffff;
  --bg-soft:   #f9e7ee;
  --bg-soft-2: #fdf0f5;

  /* 文字 */
  --text-primary:   #3d1a2a;
  --text-secondary: #8a4c67;
  --text-muted:     #b98ba1;
  --text-heading:   #4a1f33;

  /* 边框 / 分割 */
  --border-soft:  #f6e2ea;
  --border-input: #ecd3de;
  --border-hover: #d9b0c2;

  /* 状态色（保持语义色，微调即可） */
  --color-success:    #27ae60;
  --color-success-bg: #e8f8f0;
  --color-warning:    #f7b731;
  --color-warning-bg: #fff8e6;
  --color-danger:     #e8437a;
  --color-danger-bg:  #fdeef4;
  --color-info:       #c84b7c;
}

/* ============================================================
   品类主题 1：Watch（手表）—— 精密 · 金属 · 冷静
   配色来源：拉丝不锈钢、深蓝表盘、齿轮铜色
   视觉关键词：锐利、克制、精密
   ============================================================ */
html[data-theme="watch"] {
  /* 主色：深钢蓝 */
  --brand-primary:        #1f3a4d;
  --brand-primary-hover:  #2d5069;

  /* 页面背景：冷灰 + 金属白 */
  --bg-page:   #eef1f5;
  --bg-card:   #ffffff;
  --bg-soft:   #e3e8ef;
  --bg-soft-2: #f3f5f8;

  /* 文字：近黑钢灰 */
  --text-primary:   #1c2833;
  --text-secondary: #4a5c72;
  --text-muted:     #7d8fa3;
  --text-heading:   #17222e;

  /* 边框：细腻金属灰 */
  --border-soft:  #dfe4ea;
  --border-input: #c9d2dc;
  --border-hover: #96a5b8;

  /* 状态色：机械表常见的琥珀/警告色 */
  --color-success:    #2e9e6b;
  --color-success-bg: #e6f6ef;
  --color-warning:    #c98f2b;   /* 铜色，配合表盘指针 */
  --color-warning-bg: #fbf3e2;
  --color-danger:     #c0392b;
  --color-danger-bg:  #fceceb;
  --color-info:       #4a8bd6;

  /* 圆角：锐利，几乎不做圆角 */
  --radius-sm: 0.25rem;
  --radius-md: 0.35rem;
  --radius-lg: 0.5rem;
  --radius-pill: 999px;

  /* 阴影：机械表的精准投影，短而硬 */
  --shadow-card:       0 2px 6px -2px rgba(20, 35, 55, 0.08), 0 0 0 1px rgba(20, 35, 55, 0.02);
  --shadow-card-hover: 0 6px 14px -4px rgba(20, 35, 55, 0.14);
  --shadow-popup:      0 10px 24px -10px rgba(20, 35, 55, 0.35);
}

/* ============================================================
   品类主题 2：Bag（包包）—— 皮革 · 大地 · 温度
   配色来源：焦糖皮革、驼色、黄铜扣
   视觉关键词：柔软、暖、高级
   ============================================================ */
html[data-theme="bag"] {
  /* 主色：焦糖棕 */
  --brand-primary:        #8a5a3b;
  --brand-primary-hover:  #a26c48;

  /* 页面背景：奶油色 + 驼色 */
  --bg-page:   #f8f2ea;
  --bg-card:   #ffffff;
  --bg-soft:   #f0e4d4;
  --bg-soft-2: #faf5ee;

  /* 文字：深咖啡 */
  --text-primary:   #2f231a;
  --text-secondary: #6e5846;
  --text-muted:     #a8947e;
  --text-heading:   #3e2f22;

  /* 边框：浅驼色 */
  --border-soft:  #ede0cf;
  --border-input: #ddc9b1;
  --border-hover: #c4a788;

  /* 状态色：皮具护理提示用色 */
  --color-success:    #2e8b57;
  --color-success-bg: #e9f5ee;
  --color-warning:    #c98a2b;   /* 黄铜色 */
  --color-warning-bg: #fbf1dd;
  --color-danger:     #b8452e;   /* 皮革划痕红 */
  --color-danger-bg:  #fbeae6;
  --color-info:       #8a6ab5;

  /* 圆角：皮革般柔和 */
  --radius-sm: 0.6rem;
  --radius-md: 0.8rem;
  --radius-lg: 1.1rem;
  --radius-pill: 999px;

  /* 阴影：轻柔绵软，像皮革垫起 */
  --shadow-card:       0 6px 18px -6px rgba(80, 55, 35, 0.08), 0 1px 3px rgba(80, 55, 35, 0.03);
  --shadow-card-hover: 0 12px 26px -8px rgba(80, 55, 35, 0.14);
  --shadow-popup:      0 12px 28px -10px rgba(80, 55, 35, 0.35);
}

/* ============================================================
   品类主题 4：Shoes（鞋子）—— 运动 · 活力 · 街头
   配色来源：橡胶白、跑道荧光黄、深石板灰、街头橙红
   视觉关键词：动感、年轻、有弹跳感
   ============================================================ */
html[data-theme="shoes"] {
  /* 主色：深石板灰（像跑鞋中底） */
  --brand-primary:        #2f3a44;
  --brand-primary-hover:  #45525f;

  /* 页面背景：橡胶白 + 浅灰 */
  --bg-page:   #f4f6f8;
  --bg-card:   #ffffff;
  --bg-soft:   #e8ecf0;
  --bg-soft-2: #f7f9fb;

  /* 文字：石板灰黑 */
  --text-primary:   #1f252b;
  --text-secondary: #525e6b;
  --text-muted:     #8a95a3;
  --text-heading:   #171c21;

  /* 边框：运动装备常见的浅金属灰 */
  --border-soft:  #e2e8ee;
  --border-input: #ccd4dc;
  --border-hover: #9aa5b1;

  /* 状态色：运动鞋专属的荧光感 */
  --color-success:    #16a34a;   /* 草地绿 */
  --color-success-bg: #e7f8ed;
  --color-warning:    #f59e0b;   /* 跑道黄 */
  --color-warning-bg: #fef4e2;
  --color-danger:     #ef4444;   /* 街头橙红 */
  --color-danger-bg:  #fdecec;
  --color-info:       #06b6d4;   /* 荧光青 */

  /* 圆角：适中的运动感圆角 */
  --radius-sm: 0.5rem;
  --radius-md: 0.7rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;

  /* 阴影：轻快的弹跳感 */
  --shadow-card:       0 4px 12px -4px rgba(30, 45, 60, 0.06), 0 1px 3px rgba(30, 45, 60, 0.03);
  --shadow-card-hover: 0 10px 22px -6px rgba(30, 45, 60, 0.12);
  --shadow-popup:      0 12px 26px -10px rgba(30, 45, 60, 0.3);
}

/* ============================================================
   品类主题 3：Jewelry（饰品：耳环 / 项链）—— 珍珠 · 玫瑰金 · 优雅
   配色来源：珍珠白、玫瑰金、深酒红
   视觉关键词：浪漫、细腻、闪耀
   ============================================================ */
html[data-theme="jewelry"] {
  /* 主色：玫瑰金 */
  --brand-primary:        #b76e79;
  --brand-primary-hover:  #c98790;

  /* 页面背景：珍珠白 + 香槟 */
  --bg-page:   #fbf6f6;
  --bg-card:   #ffffff;
  --bg-soft:   #f7e8ea;
  --bg-soft-2: #fcf3f4;

  /* 文字：深酒红 */
  --text-primary:   #3a1f2a;
  --text-secondary: #7d4a58;
  --text-muted:     #b3929b;
  --text-heading:   #4a2633;

  /* 边框：玫瑰金调浅 */
  --border-soft:  #f5e2e6;
  --border-input: #ecd2d8;
  --border-hover: #d9aab4;

  /* 状态色：珠宝专属 */
  --color-success:    #2ea57a;   /* 祖母绿 */
  --color-success-bg: #e6f7f1;
  --color-warning:    #d4a12c;   /* 黄金 */
  --color-warning-bg: #fbf3e0;
  --color-danger:     #c2185b;   /* 红宝石 */
  --color-danger-bg:  #fce8f0;
  --color-info:       #7d5ca5;   /* 紫水晶 */

  /* 圆角：珠宝般的圆润 */
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.4rem;
  --radius-pill: 999px;

  /* 阴影：柔和光晕，像珍珠反光 */
  --shadow-card:       0 6px 20px -8px rgba(140, 70, 90, 0.08), 0 1px 3px rgba(140, 70, 90, 0.03);
  --shadow-card-hover: 0 14px 30px -10px rgba(140, 70, 90, 0.16);
  --shadow-popup:      0 14px 30px -12px rgba(140, 70, 90, 0.35);
}


/* ========== 2. 全局基础 ========== */
* { box-sizing: border-box; }

body {
  background-color: var(--bg-page);
  font-family: var(--font-family);
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0;
}

a { transition: color 0.15s; }

/* ========== 3. 卡片 ========== */
.layui-card {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
  border: 1px solid var(--border-soft) !important;
  background: var(--bg-card);
  margin-bottom: 18px;
  transition: box-shadow 0.2s;
}
.layui-card:hover {
  box-shadow: var(--shadow-card-hover) !important;
}
.layui-card-body { padding: 18px 22px; }

/* ========== 4. 通用工具类 ========== */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-heading { color: var(--text-heading); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.font-mono { font-family: var(--font-mono); letter-spacing: 0.3px; }

.mt-0 { margin-top: 0 !important; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }

/* ========== 5. 按钮（统一圆角 + 主题色） ========== */
.btn-brand {
  height: 42px; line-height: 40px;
  border-radius: var(--radius-md) !important;
  background: var(--brand-primary) !important;
  border: 1px solid var(--brand-primary) !important;
  color: #fff !important;
  font-weight: 500;
  padding: 0 28px;
  transition: background 0.2s, transform 0.1s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-brand:hover {
  background: var(--brand-primary-hover) !important;
  border-color: var(--brand-primary-hover) !important;
}
.btn-brand:active { transform: translateY(1px); }

.btn-brand-ghost {
  height: 42px; line-height: 40px;
  border-radius: var(--radius-md) !important;
  background: var(--bg-soft) !important;
  border: 1px solid var(--border-input) !important;
  color: var(--text-heading) !important;
  font-weight: 500;
  padding: 0 28px;
  transition: all 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-brand-ghost:hover {
  background: var(--bg-card) !important;
  border-color: var(--border-hover) !important;
}

/* ========== 6. 面包屑 ========== */
.layui-breadcrumb a { color: var(--text-secondary) !important; }
.layui-breadcrumb a:hover { color: var(--text-heading) !important; }
.layui-breadcrumb cite { color: var(--text-heading); font-weight: 500; }

/* ========== 7. 引用块 ========== */
.layui-elem-quote {
  border-radius: var(--radius-md) !important;
  border-left: 5px solid var(--brand-primary) !important;
  background: var(--bg-card) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  padding: 14px 24px;
  margin-bottom: 18px;
  border: 1px solid var(--border-soft) !important;
}
.layui-elem-quote strong {
  font-size: 19px; font-weight: 600;
  color: var(--text-heading);
}
.layui-elem-quote em a {
  color: var(--text-secondary);
  font-style: normal; font-size: 14px;
}
.layui-elem-quote em a:hover {
  color: var(--text-heading);
  text-decoration: underline;
}

/* ========== 8. 搜索栏 ========== */
.search-bar {
  display: flex; align-items: stretch; flex-wrap: wrap; gap: 0;
}
.search-bar .layui-input {
  flex: 1 1 200px;
  border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
  border-color: var(--border-input);
  background: var(--bg-soft-2);
  height: 42px;
  padding: 0 16px;
  color: var(--text-primary);
}
.search-bar .layui-btn {
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  height: 42px; line-height: 40px; padding: 0 28px;
  font-weight: 500; color: #fff;
  transition: background 0.2s;
}
.search-bar .layui-btn:hover {
  background: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
}
@media (max-width: 480px) {
  .search-bar .layui-input {
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
  }
  .search-bar .layui-btn {
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
    width: 100%;
  }
}

/* ========== 9. 商品卡片（首页 / 列表页通用） ========== */
.cmdlist-container {
  border-radius: var(--radius-lg);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  padding: 4px 4px 0 4px;
  background: var(--bg-card);
  height: 100%;
}
.cmdlist-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -10px rgba(20, 40, 70, 0.12);
}
.container_img {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 1 / 1;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}
.container_img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.25s;
}
.cmdlist-container:hover .container_img img { transform: scale(1.02); }

.cmdlist-text { padding: 10px 4px 6px 4px; }
.cmdlist-text .info {
  font-size: 14px; font-weight: 500;
  color: var(--text-heading);
  margin: 0 0 6px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.price {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-heading);
  font-weight: 600; font-size: 14px;
}
.price b { font-weight: 600; }
.cart-add-icon {
  font-size: 17px;
  color: var(--border-hover);
  transition: color 0.2s, transform 0.15s; cursor: pointer;
}
.cart-add-icon:hover { color: var(--brand-primary); transform: scale(1.15); }
.cmdlist-container:hover .cart-add-icon { color: var(--text-secondary); }

/* ========== 10. 通用弹窗（圆角、无标题栏） ========== */
.site-popup {
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
}
.site-popup .layui-layer-title,
.site-popup .layui-layer-setwin { display: none !important; }
.site-popup .layui-layer-content {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.popup-inner {
  padding: 24px 22px 18px;
  text-align: center;
  background: var(--bg-card);
}
.popup-icon {
  width: 52px; height: 52px; line-height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.popup-title {
  font-size: 17px; font-weight: 600;
  color: var(--text-heading);
  margin: 0 0 6px;
}
.popup-sub {
  font-size: 13px; color: var(--text-muted);
  margin: 0 0 18px;
}
.popup-actions {
  display: flex; flex-direction: column; gap: 10px;
}
.popup-btn {
  height: 42px; line-height: 40px;
  border-radius: var(--radius-md) !important;
  font-weight: 500;
  padding: 0 20px !important;
  width: 100%;
}
.popup-btn-primary {
  background: var(--brand-primary) !important;
  border: 1px solid var(--brand-primary) !important;
  color: #fff !important;
}
.popup-btn-primary:hover {
  background: var(--brand-primary-hover) !important;
  border-color: var(--brand-primary-hover) !important;
}
.popup-btn-ghost {
  background: var(--bg-soft-2) !important;
  border: 1px solid var(--border-soft) !important;
  color: var(--text-heading) !important;
}
.popup-btn-ghost:hover {
  background: var(--bg-soft) !important;
  border-color: var(--border-input) !important;
}

/* ========== 11. 通用间距工具 ========== */
.layui-fluid { padding: 0 22px; }
.layui-row.layui-col-space12 { margin: -6px; }
.layui-row.layui-col-space12 > [class*="layui-col-"] { padding: 6px; }

/* ========== 12. 响应式基础 ========== */
@media (max-width: 768px) {
  .layui-card-body { padding: 14px 16px; }
  .layui-fluid { padding: 0 12px; }
  .layui-elem-quote strong { font-size: 17px; }
  .layui-elem-quote { padding: 12px 16px; }
}

/* ============================================================
   以下为完整的公共组件样式（导航 / 抽屉 / 卡片 / 搜索 / 页脚）
   请追加到 theme.css 末尾，与上面的变量部分配合使用
   ============================================================ */

/* ========== 顶部导航布局 ========== */
.desktop-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.desktop-logo img {
  border-radius: var(--radius-lg);
  height: 64px;
  width: auto;
  display: block;
}
.nav-desktop { width: 100%; }

/* 主导航（深色圆角条） */
.layui-nav.layui-bg-black {
  border-radius: var(--radius-md) !important;
  background: var(--brand-primary) !important;
  padding: 0 4px;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: center;
}
.layui-nav .layui-nav-item > a {
  color: #e9f0fa !important;
  font-weight: 480;
  padding: 0 16px;
  transition: background 0.15s;
  display: inline-block;
}
.layui-nav .layui-nav-item > a:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.4rem;
}
.layui-nav .layui-this > a {
  background: rgba(255, 255, 255, 0.16) !important;
  border-radius: 0.4rem;
  font-weight: 500;
}
.layui-nav-bar { display: none; }
.layui-nav-child .layui-nav-more { display: none !important; }

/* ========== 导航图标 ========== */
.nav-icon {
  font-size: 15px;
  margin-right: 6px;
  opacity: 0.85;
  vertical-align: middle;
  transition: opacity 0.15s;
}
.layui-nav-item > a:hover .nav-icon,
.layui-nav-item.layui-this > a .nav-icon { opacity: 1; }

.layui-nav .layui-nav-child dd > a .nav-icon {
  font-size: 12px;
  margin-right: 6px;
  opacity: 0.55;
  color: #7f93ad;
}
.layui-nav .layui-nav-child dd > a:hover .nav-icon {
  opacity: 1;
  color: #ffffff;
}

/* ========== 二级菜单 ========== */
.layui-nav .layui-nav-child {
  background: var(--brand-primary) !important;
  border: 1px solid #2b3e58 !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-popup) !important;
  padding: 6px 0;
  margin-top: 4px;
  min-width: 200px;
  display: none;
}
.layui-nav-item:hover > .layui-nav-child { display: block !important; }
.layui-nav .layui-nav-child dd > a {
  color: #dce6f5 !important;
  font-size: 13px;
  font-weight: 480;
  padding: 0 22px !important;
  line-height: 38px;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
}
.layui-nav .layui-nav-child dd > a:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-radius: 0.3rem;
}

/* ========== 三级菜单（向右弹出，无间隙桥接） ========== */
.layui-nav .layui-nav-child .layui-nav-child {
  position: absolute !important;
  left: 100% !important;
  top: 0 !important;
  margin: 0 !important;
  padding-left: 6px !important;
  min-width: 180px;
  border-radius: var(--radius-md) !important;
  display: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.layui-nav .layui-nav-child .layui-nav-child::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 6px;
  background: var(--brand-primary);
  border: 1px solid #2b3e58;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-popup);
  z-index: -1;
}
.layui-nav .layui-nav-child .layui-nav-child dd {
  padding-left: 6px;
  position: relative;
  z-index: 1;
}
.layui-nav .layui-nav-child dd:hover > .layui-nav-child { display: block !important; }
.layui-nav .layui-nav-child dd { position: relative; }
.layui-nav .layui-nav-child dd.has-sub > a::after {
  content: '\e602';
  font-family: 'layui-icon';
  font-size: 12px;
  margin-left: auto;
  padding-left: 8px;
  opacity: 0.7;
}
.layui-nav .layui-nav-child .layui-nav-child dd > a {
  padding: 0 22px !important;
  line-height: 34px;
  font-size: 12.5px;
}
.layui-nav .layui-nav-child .layui-nav-child dd.has-sub > a::after { display: none; }

/* ========== My Cart 徽章 ========== */
.cart-nav-item { position: relative; }
.cart-nav-item > a {
  position: relative;
  display: inline-block;
}
.cart-count-badge {
  position: static;
  display: inline-block;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 5px;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  background: var(--color-danger);
  border-radius: var(--radius-pill);
  text-align: center;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(243, 91, 91, 0.4);
  pointer-events: none;
  transition: transform 0.2s;
}
.cart-count-badge.bump { transform: scale(1.3); }
.cart-count-empty { display: none !important; }

/* ========== 移动端顶部 / 抽屉 ========== */
.mobile-header {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}
.mobile-header .drawer-toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--brand-primary);
  color: #e9f0fa;
  border: none;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mobile-header .drawer-toggle:hover { background: var(--brand-primary-hover); }
.mobile-header .mobile-logo img {
  height: 40px;
  width: auto;
  border-radius: var(--radius-sm);
  display: block;
}

.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 25, 40, 0.45);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  z-index: 9998;
}
.drawer-overlay.show { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 82%; max-width: 320px;
  background: var(--brand-primary);
  color: #e9f0fa;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px -8px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex: 0 0 auto;
}
.drawer-header .drawer-logo img {
  height: 36px; width: auto; border-radius: 0.5rem;
}
.drawer-close {
  background: transparent; border: none; color: #e9f0fa;
  font-size: 24px; width: 38px; height: 38px;
  border-radius: 0.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.drawer-close:hover { background: rgba(255,255,255,0.1); }

/* 抽屉菜单 */
.drawer-nav {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  width: 100%;
}
.drawer-nav li,
.drawer-nav dd { display: block; margin: 0; padding: 0; }
.drawer-nav > li { border-bottom: 1px solid rgba(255,255,255,0.06); }
.drawer-nav > li:last-child { border-bottom: none; }
.drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 18px;
  color: #e9f0fa !important;
  font-size: 15px;
  font-weight: 500;
  border-radius: 0.4rem;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}
.drawer-nav a:hover { background: rgba(255,255,255,0.08) !important; }
.drawer-nav a .drawer-arrow { margin-left: auto; }

.drawer-nav .sub-menu {
  display: none;
  margin: 0;
  padding: 0 0 0 14px;
  list-style: none;
}
.drawer-nav li.open > .sub-menu,
.drawer-nav dd.open > .sub-menu { display: block; }

.drawer-nav .sub-menu > dd > a,
.drawer-nav .sub-menu > li > a {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 480;
  color: #b6c8e0 !important;
}
.drawer-nav .sub-menu > dd > a:hover,
.drawer-nav .sub-menu > li > a:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,0.08) !important;
}

.drawer-nav .sub-menu .sub-menu { padding-left: 16px; }
.drawer-nav .sub-menu .sub-menu > dd > a {
  font-size: 13px;
  padding: 8px 14px;
  color: #9fb3cc !important;
}
.drawer-nav .sub-menu .sub-menu > dd > a:hover { color: #ffffff !important; }

.drawer-nav .drawer-arrow {
  font-size: 12px;
  opacity: 0.65;
  transition: transform 0.2s;
  flex: 0 0 auto;
  margin-left: 8px;
}
.drawer-nav li.open > a .drawer-arrow,
.drawer-nav dd.open > a .drawer-arrow { transform: rotate(90deg); }

.drawer-nav a .nav-icon {
  font-size: 15px;
  margin-right: 8px;
  opacity: 0.85;
  flex: 0 0 auto;
}
.drawer-nav .sub-menu a .nav-icon {
  font-size: 12px;
  margin-right: 6px;
  opacity: 0.55;
  color: #7f93ad;
}
.drawer-nav .sub-menu a:hover .nav-icon {
  opacity: 1;
  color: #ffffff;
}
.drawer .cart-count-badge {
  margin-left: 6px;
  vertical-align: middle;
}

/* ========== 搜索栏 ========== */
.search-bar {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
}
.search-bar .layui-input {
  flex: 1 1 200px;
  border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
  border-color: var(--border-input);
  background: var(--bg-soft-2);
  height: 42px;
  padding: 0 16px;
  color: var(--text-primary);
}
.search-bar .layui-btn {
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  height: 42px;
  line-height: 40px;
  padding: 0 28px;
  font-weight: 500;
  color: #fff;
  transition: background 0.2s;
}
.search-bar .layui-btn:hover {
  background: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
}

/* ========== 页脚 ========== */
.footer-nav-panel {
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  background: var(--brand-primary);
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.1);
}
.footer-nav-panel .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 4px 8px;
}
.footer-nav-panel .footer-links a {
  color: #b6c8e0;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 0.35rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer-nav-panel .footer-links a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.08);
}
.footer-nav-panel .footer-sep {
  color: #4d627c;
  font-size: 12px;
  padding: 0 2px;
  user-select: none;
}

/* ========== 响应式（移动端） ========== */
@media (max-width: 768px) {
  .desktop-header { display: none; }
  .mobile-header { display: flex; }

  .layui-card-body { padding: 14px 16px; }
  .layui-fluid { padding: 0 12px; }

  .layui-elem-quote strong { font-size: 17px; }
  .layui-elem-quote { padding: 12px 16px; }
  .news-list li { flex-direction: column; gap: 4px; }

  .footer-nav-panel .footer-links {
    flex-direction: column;
    align-items: stretch;
    padding: 6px 10px;
  }
  .footer-nav-panel .footer-links a {
    padding: 12px 14px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    justify-content: flex-start;
  }
  .footer-nav-panel .footer-links a:last-child { border-bottom: none; }
  .footer-nav-panel .footer-sep { display: none; }
  .footer-nav-panel .footer-links a::before {
    content: '\e602';
    font-family: 'layui-icon';
    font-size: 12px;
    color: #7f93ad;
    margin-right: 6px;
    transition: color 0.15s;
  }
  .footer-nav-panel .footer-links a:hover::before { color: #ffffff; }
}

@media (max-width: 480px) {
  .search-bar .layui-input {
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
  }
  .search-bar .layui-btn {
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
    width: 100%;
  }
}