/* ===== 库存查询站 · 新版前台样式 =====
   仅使用 st- 前缀，避免与旧 style.css 冲突
   ===================================== */

.st-page {
  --st-bg: #f5f6f8;
  --st-card: #ffffff;
  --st-line: #e5e7eb;
  --st-text: #1f2328;
  --st-muted: #6b7280;
  --st-accent: #d92b2b;
  --st-accent-soft: #fdecec;
  --st-brand: #2563eb;
  --st-type: #7c3aed;
  --st-loc: #059669;
  background: var(--st-bg);
  color: var(--st-text);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
               "Yu Gothic", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  padding-bottom: 40px;
}
.st-page * { box-sizing: border-box; }
.st-page a { text-decoration: none; color: inherit; }
.st-page img { display: block; }

.st-container { max-width: 1220px; margin: 0 auto; padding: 0 18px; }

/* ---------- 顶部 ---------- */
.st-header {
  background: #fff;
  border-bottom: 1px solid var(--st-line);
  position: sticky; top: 0; z-index: 50;
}
.st-header-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.st-logo { display: flex; align-items: baseline; gap: 8px; flex: 0 0 auto; }
.st-logo b { font-size: 19px; letter-spacing: .5px; color: var(--st-accent); font-weight: 700; }
.st-logo span { font-size: 12px; color: var(--st-muted); }
.st-nav { display: flex; gap: 4px; flex: 0 0 auto; }
.st-nav a { padding: 6px 12px; border-radius: 8px; color: #374151; font-size: 13.5px; }
.st-nav a:hover { background: #f3f4f6; }
.st-nav a.on { background: var(--st-accent-soft); color: var(--st-accent); font-weight: 600; }
.st-search { margin-left: auto; display: flex; gap: 0; width: 300px; max-width: 42vw; }
.st-search input {
  flex: 1; height: 36px; padding: 0 12px; border: 1px solid var(--st-line);
  border-right: none; border-radius: 8px 0 0 8px; font-size: 13.5px; outline: none;
  color: var(--st-text); background: #fff;
}
.st-search input:focus { border-color: #c7cbd1; }
.st-search button {
  height: 36px; padding: 0 16px; border: none; border-radius: 0 8px 8px 0;
  background: var(--st-accent); color: #fff; font-size: 13.5px; cursor: pointer;
}
.st-search button:hover { background: #bd2424; }

/* ---------- 统计条 ---------- */
.st-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 18px 0 4px; color: var(--st-muted); font-size: 13px; }
.st-stats b { color: var(--st-text); font-size: 16px; font-weight: 700; margin-right: 3px; }

/* ---------- 维度筛选区 ---------- */
.st-dim { background: #fff; border: 1px solid var(--st-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.st-dim-row { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #eef0f2; }
.st-dim-row:last-child { border-bottom: none; }
.st-dim-label {
  flex: 0 0 74px; color: var(--st-muted); font-size: 13px; padding-top: 5px; font-weight: 600;
}
.st-chips { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; }
.st-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--st-line); background: #fbfcfd; color: #374151; font-size: 13px;
  transition: all .15s ease; white-space: nowrap;
}
.st-chip:hover { border-color: #cfd4da; background: #f3f5f7; }
.st-chip i { font-style: normal; color: #9ca3af; font-size: 11.5px; }
.st-chip.on { background: var(--st-accent); border-color: var(--st-accent); color: #fff; font-weight: 600; }
.st-chip.on i { color: rgba(255,255,255,.75); }

/* ---------- 结果头 ---------- */
.st-result-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 20px 0 12px; }
.st-result-head h2 { font-size: 17px; margin: 0; font-weight: 700; }
.st-result-head .sub { color: var(--st-muted); font-size: 13px; }
.st-clear { margin-left: auto; font-size: 13px; color: var(--st-brand); }
.st-clear:hover { text-decoration: underline; }

/* ---------- 卡片网格 ---------- */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.st-card {
  background: var(--st-card); border: 1px solid var(--st-line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s;
}
.st-card:hover { box-shadow: 0 6px 18px rgba(17,24,39,.09); transform: translateY(-2px); }
.st-card-thumb { position: relative; aspect-ratio: 1/1; background: #f3f4f6; overflow: hidden; }
.st-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.st-card-thumb .st-qty {
  position: absolute; left: 8px; top: 8px; background: rgba(17,24,39,.78); color: #fff;
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px; backdrop-filter: blur(2px);
}
.st-card-thumb .st-qty.zero { background: rgba(107,114,128,.75); }
.st-card-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.st-card-name { font-size: 14px; font-weight: 600; line-height: 1.35; min-height: 38px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-card-sn { font-size: 12px; color: var(--st-muted); }
.st-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.st-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 5px; background: #f3f4f6; color: #4b5563; white-space: nowrap; }
.st-tag.brand { background: #eff4ff; color: var(--st-brand); }
.st-tag.type { background: #f5f0ff; color: var(--st-type); }
.st-tag.loc { background: #ecfdf5; color: var(--st-loc); }
.st-tag.loc.none { background: #f3f4f6; color: #9ca3af; }
.st-card-models { font-size: 11.5px; color: #6b7280; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-card-colors { font-size: 11.5px; color: #374151; border-top: 1px dashed #eef0f2; padding-top: 6px; margin-top: auto; }
.st-card-colors span { display: inline-block; margin-right: 8px; }
.st-card-colors em { font-style: normal; color: var(--st-accent); font-weight: 600; }

/* ---------- 空结果 ---------- */
.st-empty { background: #fff; border: 1px dashed var(--st-line); border-radius: 12px; padding: 60px 20px; text-align: center; color: var(--st-muted); }

/* ---------- 分页 ---------- */
.st-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 26px 0 0; flex-wrap: wrap; }
.st-pager a, .st-pager span {
  min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--st-line); border-radius: 8px; background: #fff; font-size: 13px; color: #374151;
}
.st-pager a:hover { border-color: #c7cbd1; background: #f9fafb; }
.st-pager .cur { background: var(--st-accent); border-color: var(--st-accent); color: #fff; font-weight: 600; }
.st-pager .gap { border: none; background: transparent; color: #9ca3af; }

/* ---------- 首页：三维入口 ---------- */
.st-hero { background: linear-gradient(135deg, #fff 0%, #fdf7f7 100%); border: 1px solid var(--st-line);
  border-radius: 14px; padding: 26px 24px; margin: 22px 0 16px; }
.st-hero h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.3px; }
.st-hero p { margin: 0; color: var(--st-muted); font-size: 13.5px; }
.st-quick { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.st-quick a { padding: 7px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--st-line); font-size: 13px; }
.st-quick a:hover { border-color: var(--st-accent); color: var(--st-accent); }

.st-section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 10px; }
.st-section-title h3 { font-size: 16px; margin: 0; font-weight: 700; }
.st-section-title span { color: var(--st-muted); font-size: 12.5px; }
.st-section-title a.more { margin-left: auto; font-size: 13px; color: var(--st-brand); }

/* 大号维度卡 */
.st-dims3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.st-dimcard { background: #fff; border: 1px solid var(--st-line); border-radius: 12px; padding: 16px; }
.st-dimcard h4 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.st-dimcard h4 em { font-style: normal; font-size: 11.5px; color: var(--st-muted); font-weight: 400; }
.st-dimcard .st-chips { gap: 6px; }

.st-footer { margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--st-line);
  color: var(--st-muted); font-size: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.st-footer a { color: var(--st-muted); }
.st-footer a:hover { color: var(--st-text); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .st-dims3 { grid-template-columns: 1fr; }
  .st-header-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 10px; }
  .st-search { width: 100%; max-width: none; margin-left: 0; order: 3; }
  .st-nav { order: 2; }
}
@media (max-width: 560px) {
  .st-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .st-container { padding: 0 12px; }
  .st-dim-label { flex-basis: 100%; padding-top: 0; }
  .st-dim-row { flex-direction: column; gap: 6px; }
  .st-card-name { font-size: 13px; min-height: 35px; }
  .st-hero { padding: 20px 16px; }
  .st-hero h1 { font-size: 19px; }
}
