/* hub.css —— 壳层：顶部导航、品牌、模块卡、页脚 */

.hub-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 76px;
  padding: 0 32px;
  background: rgba(246, 244, 239, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.hub-brand { display: flex; align-items: center; gap: 10px; }
.hub-brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.hub-brand-name { font-size: 16px; font-weight: 700; line-height: 1.2; }
.hub-brand-sub { font-size: 12px; color: var(--text-muted); line-height: 1.2; }

.hub-nav { display: flex; align-items: center; gap: 4px; }
.hub-nav a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.hub-nav a:hover { background: rgba(53, 81, 60, 0.06); color: var(--text); }
.hub-nav a.active { background: var(--accent-soft); color: var(--accent); }

.hub-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.hub-badge .dot { background: #4c9a5f; }

.hub-main { padding: 24px 32px 64px; max-width: 1560px; margin: 0 auto; }
.hub-footer {
  padding: 20px 32px 40px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}

/* ── 模块卡（总览 01~04）─────────────────────────── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.module-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s, box-shadow 0.15s;
}
.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(32, 48, 79, 0.09);
}
.module-card-top { display: flex; align-items: center; justify-content: space-between; }
.module-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
}
.module-card-index {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.module-card h2 { font-size: 18px; }
.module-card p { font-size: 13px; color: var(--text-muted); }
.module-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.module-card-cta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* ── 流程步骤 ────────────────────────────────────── */
.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-muted);
}
.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.steps strong { color: var(--text); font-weight: 600; }

/* ── 商品卡片（抖店数据库）───────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.product-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-card); }
.product-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.product-thumb {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  background: var(--surface-sunk);
  display: block;
}
.product-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-title {
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.product-price { font-size: 17px; font-weight: 700; color: var(--accent); }
.product-shop { font-size: 12px; color: var(--text-muted); }
.product-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-faint); }
.product-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.product-actions { display: flex; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

/* ── 库存表行缩略图 ──────────────────────────────── */
.thumb-sm {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-sunk);
  display: block;
}

/* ── 响应式 ──────────────────────────────────────── */
@media (max-width: 960px) {
  .hub-header { gap: 14px; padding: 0 16px; overflow-x: auto; }
  .hub-nav a { padding: 0 10px; }
  .hub-badge { display: none; }
  .hub-main { padding: 16px; }
}
