* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f6f8; color: #222; }

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

.topbar { background: #1f2937; color: #fff; padding: 12px 0; }
.topbar-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { color: #fff; font-size: 20px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.search { display: flex; gap: 8px; flex: 1; min-width: 320px; }
.search select, .search input {
  padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; background: #fff;
}
.search select { max-width: 180px; }
.search input { flex: 1; }
.search button {
  padding: 8px 18px; background: #2563eb; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px;
}
.search button:hover { background: #1d4ed8; }

main { padding: 24px 16px 40px; }
.page-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.muted { color: #6b7280; font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: #fff; border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.card-img { aspect-ratio: 1/1; background: #f3f4f6; display: flex; align-items: center; justify-content: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.badge {
  display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: #eef2ff; color: #4338ca;
}
.badge.ghost { background: #f3f4f6; color: #374151; }
.card-row { display: flex; justify-content: space-between; align-items: baseline; }
.price { color: #dc2626; font-weight: 700; font-size: 16px; }
.stock { color: #059669; font-size: 12px; }
.card-sku { margin-top: 6px; font-size: 12px; }

.empty { grid-column: 1 / -1; text-align: center; padding: 60px 0; color: #9ca3af; }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 24px; }
.pager a { color: #2563eb; text-decoration: none; font-size: 14px; }

.detail { display: grid; grid-template-columns: minmax(280px, 440px) 1fr; gap: 32px; background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.detail-img { border-radius: 10px; overflow: hidden; background: #f3f4f6; }
.detail-img img { width: 100%; display: block; }
.detail-info h1 { font-size: 24px; margin-bottom: 10px; }
.detail-price { font-size: 28px; font-weight: 700; color: #dc2626; margin-bottom: 16px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 20px; }
.info-table th, .info-table td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; text-align: left; vertical-align: top; }
.info-table th { width: 90px; color: #6b7280; font-weight: 500; white-space: nowrap; }
.btn {
  display: inline-block; padding: 8px 16px; border-radius: 6px; background: #2563eb; color: #fff;
  text-decoration: none; font-size: 14px; margin-right: 8px;
}
.btn.ghost { background: #f3f4f6; color: #374151; }

.footer { background: #1f2937; color: #9ca3af; padding: 16px 0; font-size: 13px; text-align: center; }

@media (max-width: 720px) {
  .detail { grid-template-columns: 1fr; }
  .search { min-width: 100%; }
}
/* 语义搜索相似度徽标 */
.badge.score { background: #ecfdf5; color: #059669; }
/* 分割线与推荐区 */
.divider {
  display: flex; align-items: center; gap: 12px; margin: 28px 0 8px; color: #9ca3af; font-size: 13px;
}
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px dashed #d1d5db; }
.rec-title { font-size: 18px; margin: 4px 0 14px; color: #374151; }