/* ============ BiogradeTech 产品检索 · 简洁清爽风格 ============ */
:root {
  --purple: #6d4fc2;
  --purple-dark: #5a3fa5;
  --purple-soft: #f3f0fb;
  --blue: #1e88e5;
  --green: #2e9e5b;
  --ink: #1f2330;
  --muted: #6b7280;
  --faint: #9aa1ad;
  --line: #e8eaf0;
  --bg: #f7f8fa;
  --card: #ffffff;
  --amber: #b97d10;
  --amber-soft: #fdf3e0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(31,35,48,.06), 0 4px 14px rgba(31,35,48,.04);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
.dim { color: var(--muted); font-weight: 400; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 顶部条 ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo-amyjet { height: 34px; width: auto; display: block; }
.logo-amyjet-sm { height: 30px; width: auto; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.exclusive-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #fff6e8, #ffefd4);
  color: var(--amber);
  border: 1px solid #f0dcae;
  font-weight: 600; font-size: 12.5px;
  padding: 6px 12px; border-radius: 999px;
  white-space: nowrap;
}
.site-link { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.site-link:hover { color: var(--blue); }

/* ---------- 主视觉 ---------- */
.hero {
  background:
    radial-gradient(600px 220px at 18% -40px, rgba(109,79,194,.09), transparent 70%),
    radial-gradient(600px 220px at 85% -30px, rgba(30,136,229,.07), transparent 70%),
    #fff;
  border-bottom: 1px solid var(--line);
  padding: 24px 20px 22px;
}
.hero-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.logo-biograde { height: 44px; width: auto; margin-bottom: 6px; }
.hero h1 { font-size: 20px; letter-spacing: .5px; margin-bottom: 4px; }
.hero-sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.hero-sub b { color: var(--purple); font-weight: 600; }

.searchbox {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px 6px 18px;
  box-shadow: 0 2px 14px rgba(109,79,194,.08);
  transition: border-color .15s, box-shadow .15s;
  text-align: left;
}
.searchbox:focus-within {
  border-color: var(--purple);
  box-shadow: 0 2px 18px rgba(109,79,194,.16);
}
.search-icon { color: var(--faint); flex: none; }
.searchbox input {
  flex: 1; border: none; outline: none; font-size: 15px; padding: 8px 0;
  background: transparent; color: var(--ink); min-width: 0;
}
.btn-clear {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--bg); color: var(--muted); font-size: 13px;
}
.btn-clear:hover { background: var(--line); color: var(--ink); }
.hero-hint { margin-top: 14px; font-size: 12.5px; color: var(--faint); }

/* 搜索建议下拉 */
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden; z-index: 60; max-height: 320px; overflow-y: auto;
}
.suggest-item {
  padding: 9px 16px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px;
  font-size: 13.5px;
}
.suggest-item:hover, .suggest-item.active { background: var(--purple-soft); }
.suggest-item .sub { color: var(--faint); font-size: 12px; flex: none; }
.suggest-item b { color: var(--purple); }

/* ---------- 两栏布局：左筛选 / 右产品 ---------- */
.layout {
  max-width: 1280px; margin: 20px auto 60px; padding: 0 20px;
  display: grid; grid-template-columns: 296px minmax(0, 1fr);
  gap: 20px; align-items: start;
}
.content { min-width: 0; }

/* 侧栏 */
.sidebar {
  position: sticky; top: 70px;
  max-height: calc(100vh - 86px);
  overflow-y: auto;
  display: grid; gap: 12px;
  padding-right: 2px;
  scrollbar-width: thin; scrollbar-color: #d9dbe3 transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #d9dbe3; border-radius: 3px; }
.side-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 4px 0;
}
.side-head-title {
  font-size: 13px; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.side-head-title svg { color: var(--purple); }
.side-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 15px 16px 14px;
}
.side-title {
  font-size: 13px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.side-title svg { color: var(--purple); }

/* 品类导航 */
.cat-list { display: grid; gap: 4px; }
.cat-item {
  position: relative;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  width: 100%; border: 1px solid transparent; background: transparent;
  border-radius: 9px; padding: 8px 28px 8px 12px; font-size: 13.5px; color: var(--muted);
  text-align: left; transition: all .12s;
}
.cat-item:hover { background: var(--bg); color: var(--ink); }
.cat-item.active {
  background: var(--purple-soft); border-color: #ded4f5;
  color: var(--purple-dark); font-weight: 600;
}
.cat-item.active::after {
  content: ''; position: absolute; right: 11px; top: 50%;
  width: 8px; height: 5px; border-left: 2px solid var(--purple); border-bottom: 2px solid var(--purple);
  transform: translateY(-75%) rotate(-45deg);
}
.cat-item .cat-cnt { font-size: 11.5px; color: var(--faint); }
.cat-item.active .cat-cnt { color: var(--purple); opacity: .8; }
.side-tip {
  font-size: 12px; line-height: 1.7; padding: 0 6px;
}

/* 移动端筛选开关（桌面隐藏） */
.btn-filter-toggle {
  display: none; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 9px; padding: 7px 13px; font-size: 13px; align-items: center; gap: 6px;
}
.btn-filter-toggle svg { color: var(--purple); }

/* ---------- 主体 ---------- */
.main { max-width: 1180px; margin: 22px auto 60px; padding: 0 20px; }

/* 筛选面板 */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.btn-text {
  border: none; background: none; color: var(--muted); font-size: 12.5px; padding: 4px 6px; border-radius: 6px;
}
.btn-text:hover { color: var(--purple); background: var(--purple-soft); }
.filter-grid { display: grid; gap: 0; }
.filter-block { min-width: 0; padding: 12px 0; border-bottom: 1px solid #f1f2f6; }
.filter-block:first-of-type { padding-top: 6px; }
.filter-block:last-of-type { border-bottom: none; padding-bottom: 2px; }
.filter-label { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.filter-label .dim { font-weight: 400; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; line-height: 1.4;
  transition: all .12s; user-select: none;
}
.chip .cnt { color: var(--faint); font-size: 10.5px; margin-left: 3px; }
.chip:hover { border-color: #cfc6ea; color: var(--ink); }
.chip.on {
  background: var(--purple); border-color: var(--purple); color: #fff; font-weight: 500;
}
.chip.on .cnt { color: rgba(255,255,255,.75); }
.chip.toggle-green.on { background: var(--green); border-color: var(--green); }
.chip.disabled { opacity: .38; pointer-events: none; }

/* 指标输入 */
.target-input-wrap { position: relative; }
.target-input-wrap input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 9px;
  padding: 7px 11px; font-size: 13px; outline: none; background: #fff; color: var(--ink);
}
.target-input-wrap input:focus { border-color: var(--purple); }
#targetChips { margin-top: 8px; }
.chip.tchip { background: var(--purple-soft); border-color: #ded4f5; color: var(--purple-dark); font-weight: 500; }
.chip.tchip:hover { border-color: var(--purple); }

/* 提示条 */
.notice {
  border-radius: var(--radius); padding: 13px 16px; margin-bottom: 16px;
  font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid transparent;
}
.notice.warn { background: var(--amber-soft); border-color: #f0dcae; color: #7a5307; }
.notice.info { background: var(--purple-soft); border-color: #ded4f5; color: var(--purple-dark); }
.notice a { font-weight: 600; }
.notice .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; }

/* 结果区 */
.results-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; gap: 12px; flex-wrap: wrap;
}
.results-head-right { display: flex; align-items: center; gap: 12px; }
.results-count { font-size: 14.5px; font-weight: 600; }
.results-count b { color: var(--purple); }
.results-meta { font-size: 12px; color: var(--faint); }

.result-list { display: grid; gap: 10px; }

/* 产品卡片 */
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .15s, border-color .15s;
  overflow: hidden;
}
.pcard:hover { box-shadow: var(--shadow); border-color: #ded4f0; }
.pcard-main {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 18px;
  padding: 14px 18px; cursor: pointer; align-items: start;
}
.pcard-topline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.pcode {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px;
  color: var(--purple-dark); background: var(--purple-soft);
  padding: 1.5px 8px; border-radius: 6px; font-weight: 600; letter-spacing: .2px;
}
.badge {
  font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 500; line-height: 1.6;
}
.badge.cat   { background: #eef4fe; color: #3a6ea8; }
.badge.stock { background: #e8f6ee; color: var(--green); }
.badge.type  { background: #f1f2f5; color: #565d6b; }
.badge.neut  { background: #fdeeee; color: #c05252; }
.badge.bio   { background: #fff4e2; color: #b97d10; }
.pname { font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.pname em { font-style: normal; color: var(--purple); }
.pname-cn { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.ptags { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 7px; font-size: 12px; color: var(--muted); }
.ptags b { color: var(--ink); font-weight: 500; }
.ptags .lbl { color: var(--faint); margin-right: 4px; }
.pcard-price { text-align: right; flex: none; min-width: 118px; }
.price-from { font-size: 11.5px; color: var(--faint); }
.price-val { font-size: 16.5px; font-weight: 700; color: #c05252; white-space: nowrap; }
.price-val.inq { font-size: 13px; color: var(--muted); font-weight: 500; border: 1px dashed var(--line); border-radius: 7px; padding: 3px 10px; }
.exp-hint { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.exp-hint svg { vertical-align: -2px; transition: transform .18s; }
.pcard.open .exp-hint svg { transform: rotate(180deg); }

/* SKU 表 */
.pcard-skus { display: none; border-top: 1px solid var(--line); background: #fbfbfd; padding: 10px 18px 14px; }
.pcard.open .pcard-skus { display: block; }
.sku-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sku-table th {
  text-align: left; color: var(--faint); font-weight: 500; font-size: 12px;
  padding: 6px 10px; border-bottom: 1px solid var(--line);
}
.sku-table td { padding: 7px 10px; border-bottom: 1px solid #f0f1f5; }
.sku-table tr:last-child td { border-bottom: none; }
.sku-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.sku-price { font-weight: 600; color: #c05252; white-space: nowrap; }
.sku-price.inq { color: var(--muted); font-weight: 400; }
.btn-copy {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  font-size: 11.5px; color: var(--muted); padding: 2px 9px; margin-left: 8px;
}
.btn-copy:hover { border-color: var(--purple); color: var(--purple); }
.btn-copy.ok { border-color: var(--green); color: var(--green); }

/* 空状态 */
.empty { text-align: center; padding: 70px 20px; }
.empty-icon { font-size: 38px; margin-bottom: 10px; }
.empty p:first-of-type { font-size: 15px; font-weight: 600; margin-bottom: 6px; }

/* 分页 */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.pager button {
  min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 13px; padding: 0 10px;
}
.pager button:hover:not(:disabled) { border-color: var(--purple); color: var(--purple); }
.pager button.cur { background: var(--purple); border-color: var(--purple); color: #fff; font-weight: 600; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .gap { color: var(--faint); }

/* 页脚 */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 26px 20px 34px; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-info { font-size: 12.5px; text-align: right; line-height: 1.8; }

/* 响应式 */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 14px; }
  .sidebar { position: static; max-height: none; overflow: visible; display: none; padding-right: 0; }
  .sidebar.open { display: grid; }
  .btn-filter-toggle { display: inline-flex; }
}
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; justify-content: center; text-align: center; }
  .exclusive-badge { font-size: 11.5px; }
  .logo-biograde { height: 40px; }
  .pcard-main { grid-template-columns: 1fr; }
  .pcard-price { text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .exp-hint { display: none; }
  .footer-info { text-align: left; }
  .results-head-right { width: 100%; justify-content: space-between; }
}
