/* ================================================
   产品列表测试页独立布局样式
   视觉借鉴店小秘 smtProductList/offline + Ant Design
   通用组件（filter-card / chips / table 等）在
   pl-components.css 里，本文件只保留独立页的
   body 重置 + 顶部蓝 bar / 左侧分类树 / 右侧主内容 /
   浮动按钮 等"整页"级样式。
   ================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  background: #f5f6f8;
  min-width: 1280px;
}

a { color: #1677ff; text-decoration: none; }
a:hover { color: #4096ff; }

input, select, button { font-family: inherit; font-size: inherit; }

/* ============ 布局外壳 ============ */
.pl-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============ 顶部蓝色导航 ============ */
.pl-topbar {
  height: 56px;
  background: #4084eb;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  flex-shrink: 0;
}

.pl-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: #fff;
  text-decoration: none;
  min-width: 72px;
}
.pl-logo:hover { color: #fff; }
.pl-logo-mark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}
.pl-logo-sub {
  font-size: 11px;
  opacity: 0.85;
}

.pl-topnav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.pl-topnav-item {
  padding: 0 16px;
  height: 56px;
  line-height: 56px;
  color: #fff;
  font-size: 15px;
  position: relative;
  transition: background 0.15s;
}
.pl-topnav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.pl-topnav-item.active {
  background: rgba(255,255,255,0.18);
  font-weight: 500;
}

.pl-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
}
.pl-topbar-hint {
  padding: 2px 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  font-size: 12px;
}
.pl-topbar-back {
  color: #fff;
  opacity: 0.9;
}
.pl-topbar-back:hover { color: #fff; opacity: 1; }

/* ============ 主体栅格 ============ */
.pl-body {
  flex: 1;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0;
  background: #f5f6f8;
}

/* ============ 左侧分类树 ============ */
.pl-sidebar {
  background: #fff;
  border-right: 1px solid #ebedf0;
  padding: 16px 0;
}

.pl-side-group {
  margin-bottom: 20px;
}

.pl-side-title {
  padding: 4px 20px;
  font-size: 13px;
  color: #666;
  font-weight: 600;
}

.pl-side-item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 20px 8px 32px;
  text-align: left;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.pl-side-item:hover {
  background: #f5f7fa;
  color: #1677ff;
}
.pl-side-item.active {
  background: #e6f4ff;
  color: #1677ff;
  font-weight: 500;
}
.pl-side-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #1677ff;
}

.pl-side-count {
  color: #999;
  font-weight: 400;
  font-size: 12px;
  margin-left: 6px;
}
.pl-side-item.active .pl-side-count {
  color: #1677ff;
}

/* ============ 主内容 ============ */
.pl-main {
  padding: 12px 16px 24px;
  min-width: 0;
}

.pl-crumbs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 10px;
}
.pl-crumbs {
  font-size: 13px;
  color: #666;
}
.pl-crumbs .sep {
  margin: 0 6px;
  color: #bbb;
}
.pl-crumbs .current {
  color: #333;
  font-weight: 500;
}
.pl-crumbs-tools {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* ============ 按钮（测试页独占）============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 30px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 2px;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #444;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { color: #1677ff; border-color: #1677ff; }
.btn-primary {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}
.btn-primary:hover {
  background: #4096ff;
  border-color: #4096ff;
  color: #fff;
}
.btn-default { /* 同默认 .btn */ }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn .caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.6;
  margin-left: 2px;
}
.btn .help {
  display: inline-flex;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 10px;
  line-height: 12px;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}
.btn .help::before { content: "?"; }

/* ============ 浮动按钮 ============ */
.pl-float-chat {
  position: fixed;
  right: 12px;
  bottom: 120px;
  width: 44px;
  padding: 10px 8px;
  background: #1677ff;
  color: #fff;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(22,119,255,0.35);
  z-index: 30;
}
.pl-float-chat:hover { background: #4096ff; }
