/* =========================================================
   修配速达 · H5 设计系统 (Design Tokens)
   升级要点：统一色彩/字号/圆角/阴影；新增商品卡、分类宫格、
   活动 Banner、底部抽屉、骨架屏、空态插画、物流进度、标签栏动效。
   业务逻辑与接口保持不变，仅样式与交互层升级。
   ========================================================= */
:root {
  /* 品牌 */
  --brand: #ff5a1f;
  --brand-d: #e8430a;
  --brand-soft: #fff1ea;
  --gold: #e6b422;
  --gold-d: #c79412;
  /* 中性文字 */
  --ink: #1f2329;
  --ink-2: #5b6168;
  --sub: #8a9099;
  --line: #eef0f3;
  --bg: #f5f6f8;
  --card: #ffffff;
  /* 语义色 */
  --ok: #07c160;
  --warn: #ff8f00;
  --danger: #e53935;
  --info: #2f6bff;
  /* 圆角 */
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-xl: 20px;
  /* 间距基准 */
  --sp: 8px;
  /* 阴影 */
  --sh-1: 0 1px 3px rgba(20,23,28,.06);
  --sh-2: 0 4px 16px rgba(20,23,28,.08);
  --sh-3: 0 8px 28px rgba(255,90,31,.18);
  /* 字号阶梯 */
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  /* 尺寸 */
  --tab-h: 56px;
  --top-h: 52px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: var(--fs-14); line-height: 1.5;
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  box-shadow: 0 0 28px rgba(0,0,0,.06);
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

/* -------------------- 顶部品牌头 -------------------- */
#topbar {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-d) 100%);
  color: #fff; height: var(--top-h);
  box-shadow: 0 2px 10px rgba(232,67,10,.25);
}
.top-inner { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 100%; }
#top-title { font-weight: 800; font-size: var(--fs-18); white-space: nowrap; letter-spacing: .5px;
  display: flex; align-items: center; gap: 6px; }
#top-title::before { content: "⚡"; font-size: 16px; }
#top-search {
  flex: 1; background: rgba(255,255,255,.95); color: var(--sub);
  border-radius: 18px; padding: 7px 14px; font-size: var(--fs-13);
  display: flex; align-items: center; gap: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
}
#top-search:active { transform: scale(.985); }
.top-scan { font-size: 20px; padding: 4px; opacity: .95; flex: 0 0 auto; }

/* -------------------- 内容区 -------------------- */
#view { flex: 1; padding-bottom: calc(var(--tab-h) + 14px); }
.page { padding: 12px; }
.section-title {
  font-size: var(--fs-15); font-weight: 800; margin: 16px 4px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title .more { font-size: var(--fs-12); color: var(--sub); font-weight: 500; }
.section-title .more::after { content: " ›"; }

/* 入场动画（卡片/区块随渲染淡入上滑） */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.anim-in { animation: fadeUp .42s cubic-bezier(.22,.61,.36,1) both; }

/* -------------------- 分类宫格 -------------------- */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 4px; padding: 14px 8px 6px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--ink); }
.cat .ci {
  width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: linear-gradient(135deg, #fff, var(--brand-soft));
  box-shadow: var(--sh-1); transition: transform .18s;
}
.cat:active .ci { transform: scale(.9); }
.cat em { font-style: normal; font-size: var(--fs-12); color: var(--ink-2); }

/* -------------------- 活动 Banner -------------------- */
.banner {
  margin: 10px 12px; border-radius: var(--r-l); overflow: hidden;
  background: linear-gradient(110deg, #ff7a3d, var(--brand) 55%, var(--gold));
  color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--sh-3);
}
.banner b { font-size: var(--fs-16); display: block; }
.banner p { margin: 3px 0 0; font-size: var(--fs-12); opacity: .92; }
.banner-go { background: rgba(255,255,255,.22); padding: 6px 12px; border-radius: 16px; font-size: var(--fs-12); font-weight: 700; }

/* -------------------- 商品卡（核心组件） -------------------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pc {
  background: var(--card); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--sh-1);
  display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.pc:active { transform: translateY(1px); box-shadow: var(--sh-2); }
.pc .ph {
  position: relative; aspect-ratio: 1 / 1; background: linear-gradient(135deg, #fdfdfe, #eef1f5);
  display: flex; align-items: center; justify-content: center; font-size: 52px;
  border-bottom: 1px solid var(--line);
}
.pc .ph img { width: 100%; height: 100%; object-fit: cover; }
.pc .badge {
  position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  box-shadow: 0 2px 6px rgba(232,67,10,.3);
}
.pc .badge.vip { background: linear-gradient(135deg, #f7d774, var(--gold-d)); color: #5a3d00; }
.pc .pi { padding: 9px 10px 11px; display: flex; flex-direction: column; flex: 1; }
.pc .pn { font-size: var(--fs-13); line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.pc .pm { font-size: var(--fs-12); color: var(--sub); margin: 4px 0 0; }
.pc .pr { display: flex; align-items: baseline; gap: 6px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.pc .pp { color: var(--brand); font-weight: 800; font-size: var(--fs-16); }
.pc .pp small { font-size: var(--fs-12); font-weight: 700; }
.pc .po { color: var(--sub); font-size: var(--fs-12); text-decoration: line-through; }
.pc .ps { color: var(--sub); font-size: var(--fs-12); margin-left: auto; }
.pc .ptag {
  align-self: flex-start; margin-top: 7px; font-size: 10px; color: var(--brand-d);
  background: var(--brand-soft); border-radius: 6px; padding: 2px 7px; font-weight: 600;
}

/* -------------------- 旧卡片（收藏/兼容） -------------------- */
.card { background: var(--card); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--sh-1); }
.card .thumb { height: 110px; background: linear-gradient(135deg,#fafbfc,#eef1f5); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.card .info { padding: 8px 10px 10px; }
.card .name { font-size: var(--fs-13); line-height: 1.35; height: 35px; overflow: hidden; }
.card .meta { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.price { color: var(--brand); font-weight: 800; }
.price small { font-size: var(--fs-12); }

/* -------------------- 机型快捷 -------------------- */
.models { display: flex; gap: 8px; overflow-x: auto; padding: 4px; scrollbar-width: none; }
.models::-webkit-scrollbar { display: none; }
.model-chip { flex: 0 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 7px 14px; font-size: var(--fs-13); white-space: nowrap; color: var(--ink-2); transition: transform .15s; }
.model-chip:active { transform: scale(.95); }

/* -------------------- 热销榜 -------------------- */
.rank { background: var(--card); border-radius: var(--r-m); padding: 4px 0; margin: 0; box-shadow: var(--sh-1); }
.rank li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); list-style: none; }
.rank li:last-child { border-bottom: none; }
.rank .no { width: 22px; height: 22px; border-radius: 7px; background: var(--bg); color: var(--sub);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: var(--fs-12); }
.rank .no.top { background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff; box-shadow: 0 2px 6px rgba(232,67,10,.3); }
.rank .rn { flex: 1; font-size: var(--fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.rank .rn:active { color: var(--brand); }
.rank .rp { color: var(--brand); font-weight: 800; }

/* -------------------- 底部 tab -------------------- */
#tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  height: var(--tab-h); background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: flex; z-index: 40; box-shadow: 0 -2px 12px rgba(0,0,0,.04);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
#tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--sub); font-size: 11px; gap: 3px; position: relative; transition: color .2s;
}
#tabbar a .ic { font-size: 21px; transition: transform .2s; filter: grayscale(.4); }
#tabbar a.active { color: var(--brand); }
#tabbar a.active .ic { transform: scale(1.18) translateY(-1px); filter: none; }
#tabbar a:active .ic { transform: scale(.9); }
#cart-badge {
  position: absolute; top: 4px; right: 50%; margin-right: -22px; background: var(--brand); color: #fff;
  font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: none; align-items: center;
  justify-content: center; padding: 0 4px; box-shadow: 0 1px 3px rgba(232,67,10,.4);
}

/* -------------------- 按钮 -------------------- */
.btn { background: var(--brand); color: #fff; border-radius: 22px; padding: 11px; width: 100%;
  font-size: var(--fs-15); font-weight: 700; box-shadow: 0 4px 12px rgba(255,90,31,.25); transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.98); opacity: .92; }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); box-shadow: none; }
.btn.gold { background: linear-gradient(135deg,#f7d774,#e6b422); color: #5a3d00; box-shadow: 0 4px 12px rgba(230,180,34,.3); }
.btn[disabled] { opacity: .5; box-shadow: none; }
.btn.sm { width: auto; padding: 6px 14px; font-size: var(--fs-13); border-radius: 16px; }
.btn.heart { background: var(--brand-soft); color: var(--brand-d); }
.btn.heart.on { background: var(--brand); color: #fff; }

/* -------------------- 表单 -------------------- */
.field { background: var(--card); border-radius: var(--r-m); padding: 4px 12px; margin-bottom: 10px; box-shadow: var(--sh-1); }
.field label { display: block; font-size: var(--fs-12); color: var(--sub); margin: 8px 0 2px; }
.field input, .field textarea, .field select { width: 100%; border: none; outline: none; padding: 8px 0;
  font-size: var(--fs-14); background: transparent; color: var(--ink); }
.row { display: flex; gap: 10px; }
.row .field { flex: 1; }

/* -------------------- 详情 -------------------- */
.pd-hero { background: linear-gradient(135deg,#fff,#f3f5f8); height: 210px; display: flex; align-items: center;
  justify-content: center; font-size: 80px; border-bottom: 1px solid var(--line); }
.pd-hero img { width: 100%; height: 100%; object-fit: cover; }
.pd-name { font-size: var(--fs-18); font-weight: 800; padding: 14px 14px 6px; color: var(--ink); }
.pd-price { padding: 0 14px 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pd-price .price { font-size: var(--fs-20); }
.pd-attrs { padding: 0 14px 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--bg); color: var(--ink-2); border-radius: 6px; padding: 4px 9px; font-size: var(--fs-12); }
.tag.sel { background: var(--brand); color: #fff; }
.sku-list { padding: 0 14px; }
.sku { display: flex; align-items: center; justify-content: space-between; padding: 11px; border: 1px solid var(--line);
  border-radius: var(--r-s); margin-bottom: 8px; transition: border-color .15s; }
.sku.sel { border-color: var(--brand); background: var(--brand-soft); }
.sku.disabled { opacity: .45; }
.sku-pick { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; margin: 0 12px;
  background: var(--card); border-radius: var(--r-m); box-shadow: var(--sh-1); font-size: var(--fs-14); }
.sku-pick:active { background: var(--bg); }
.svg-chart { width: 100%; height: 120px; background: var(--card); border-radius: var(--r-m); box-shadow: var(--sh-1); }

/* -------------------- 订单 -------------------- */
.order { background: var(--card); border-radius: var(--r-m); margin-bottom: 10px; overflow: hidden; box-shadow: var(--sh-1); }
.order .oh { display: flex; justify-content: space-between; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: var(--fs-12); color: var(--sub); }
.order .ob { padding: 11px 12px; }
.order .oi { display: flex; justify-content: space-between; padding: 5px 0; font-size: var(--fs-13); }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 10px; background: var(--bg); color: var(--sub); font-weight: 600; }
.badge.paid { background: #e8f8ee; color: var(--ok); }
.badge.unpaid { background: #fff3e0; color: var(--warn); }
.badge.shipping { background: #e6f0ff; color: var(--info); }
.badge.aftersale { background: #ffeaea; color: var(--danger); }
.badge.completed { background: #eef4ff; color: var(--info); }

/* 物流进度条 */
.track { display: flex; align-items: center; padding: 16px 8px 4px; }
.track .dot { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--bg);
  color: var(--sub); display: flex; align-items: center; justify-content: center; font-size: 12px; position: relative; z-index: 2; }
.track .dot.on { background: var(--brand); color: #fff; box-shadow: 0 2px 6px rgba(232,67,10,.35); }
.track .line { flex: 1; height: 3px; background: var(--line); position: relative; }
.track .line.on { background: linear-gradient(90deg, var(--brand), var(--brand-d)); }
.track .lab { display: flex; justify-content: space-between; margin: 6px 2px 0; }
.track .lab span { flex: 1; text-align: center; font-size: 10px; color: var(--sub); }
.track .lab span:first-child { text-align: left; } .track .lab span:last-child { text-align: right; }
.track .lab span.on { color: var(--brand); font-weight: 700; }

/* -------------------- 我的 / 会员 -------------------- */
.member-card { background: linear-gradient(135deg,#3a3f47,#1f2329); color: #fff; border-radius: var(--r-l);
  padding: 18px 16px; margin: 12px; box-shadow: var(--sh-2); position: relative; overflow: hidden; }
.member-card::after { content: "⚡"; position: absolute; right: -6px; bottom: -14px; font-size: 92px; opacity: .08; }
.member-card .lv { display: inline-block; background: linear-gradient(135deg,#f7d774,#e6b422); color: #5a3d00;
  border-radius: 10px; padding: 3px 11px; font-size: var(--fs-12); font-weight: 800; }
.member-card .bar { height: 6px; background: rgba(255,255,255,.2); border-radius: 3px; margin: 12px 0 6px; overflow: hidden; }
.member-card .bar i { display: block; height: 100%; background: linear-gradient(90deg,#f7d774,#e6b422); }
.member-card .stat { display: flex; gap: 10px; margin-top: 12px; }
.member-card .stat .s { flex: 1; background: rgba(255,255,255,.08); border-radius: var(--r-s); padding: 9px 10px; }
.member-card .stat .s b { display: block; font-size: var(--fs-16); }
.member-card .stat .s span { font-size: 10px; opacity: .75; }
.menu { background: var(--card); border-radius: var(--r-m); margin: 10px 12px; overflow: hidden; box-shadow: var(--sh-1); }
.menu a { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px; border-bottom: 1px solid var(--line); font-size: var(--fs-14); }
.menu a:last-child { border-bottom: none; }
.menu a:active { background: var(--bg); }
.menu .arrow { color: var(--sub); }
/* 功能宫格 */
.fgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 4px; background: var(--card);
  margin: 10px 12px; border-radius: var(--r-m); padding: 14px 8px; box-shadow: var(--sh-1); }
.fgrid a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-2); font-size: var(--fs-12); }
.fgrid .fi { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: linear-gradient(135deg,#fff,var(--brand-soft)); box-shadow: var(--sh-1); }

/* -------------------- 通用 -------------------- */
.empty { text-align: center; color: var(--sub); padding: 50px 20px; font-size: var(--fs-13); }
.empty::before { content: "📦"; font-size: 48px; display: block; opacity: .4; margin-bottom: 10px; }
.empty.box::before { content: "📭"; }
.empty.cart::before { content: "🛒"; }
.empty.order::before { content: "🧾"; }
.empty.fav::before { content: "⭐"; }
.empty.search::before { content: "🔍"; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.muted { color: var(--sub); font-size: var(--fs-12); }
.flex { display: flex; } .between { justify-content: space-between; } .center-y { align-items: center; }
.notice { background: #fff8e1; color: #a36b00; padding: 9px 12px; border-radius: var(--r-s); font-size: var(--fs-12); margin: 10px 12px; box-shadow: var(--sh-1); }
.toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.82); color: #fff;
  padding: 9px 16px; border-radius: 20px; font-size: var(--fs-13); z-index: 99; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 80%; }
.toast.show { opacity: 1; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.stepper button { width: 30px; height: 30px; background: #fff; font-size: var(--fs-16); color: var(--ink); }
.stepper button:active { background: var(--bg); }
.stepper span { width: 38px; text-align: center; font-size: var(--fs-14); }
.add-cart { position: fixed; bottom: calc(var(--tab-h) + 10px); left: 50%; transform: translateX(-50%); width: calc(100% - 24px);
  max-width: 456px; display: flex; gap: 10px; z-index: 35; }
.add-cart .btn { flex: 1; }
.bar-search { padding: 10px 12px; }
.bar-search input { width: 100%; border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px; outline: none; font-size: var(--fs-14); }

/* -------------------- 底部抽屉（bottom sheet） -------------------- */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; opacity: 0; transition: opacity .25s; pointer-events: none; }
.mask.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 100%; max-width: 480px;
  background: var(--card); border-radius: var(--r-l) var(--r-l) 0 0; z-index: 51; padding: 16px 16px calc(16px + env(safe-area-inset-bottom,0));
  transition: transform .28s cubic-bezier(.22,.61,.36,1); max-height: 78vh; overflow-y: auto; box-shadow: 0 -6px 24px rgba(0,0,0,.12); }
.sheet.show { transform: translate(-50%, 0); }
.sheet .sh-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet .sh-hd b { font-size: var(--fs-16); }
.sheet .sh-close { font-size: 20px; color: var(--sub); }
.sheet .sh-sku { display: flex; align-items: center; gap: 12px; }
.sheet .sh-sku .img { width: 64px; height: 64px; border-radius: var(--r-s); background: linear-gradient(135deg,#fff,var(--brand-soft));
  display: flex; align-items: center; justify-content: center; font-size: 30px; }
.sheet .sh-sku .p { color: var(--brand); font-weight: 800; font-size: var(--fs-18); }

/* -------------------- 骨架屏（shimmer） -------------------- */
.sk { background: linear-gradient(90deg,#eef0f3 25%,#f6f7f9 37%,#eef0f3 63%); background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite; border-radius: var(--r-s); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-card { background: var(--card); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--sh-1); }
.sk-card .sk-ph { aspect-ratio: 1/1; border-radius: 0; }
.sk-card .sk-ln { height: 12px; margin: 9px 10px; }
.sk-card .sk-ln.s { width: 50%; }

/* -------------------- AI 找货 -------------------- */
.ai-entry { margin: 10px 12px 2px; border-radius: var(--r-l); overflow: hidden;
  background: linear-gradient(110deg, #2b2f36, #1f2329); color: #fff; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--sh-2); }
.ai-entry .ai-ico { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #ff7a3d, var(--brand));
  display: flex; align-items: center; justify-content: center; font-size: 20px; }
.ai-entry .ai-txt { flex: 1; display: flex; flex-direction: column; }
.ai-entry .ai-txt b { font-size: var(--fs-15); }
.ai-entry .ai-txt span { font-size: var(--fs-12); opacity: .82; margin-top: 2px; }
.ai-entry .ai-go { font-size: var(--fs-12); opacity: .85; }
.ai-entry:active { transform: scale(.99); }

.ai-page { position: relative; min-height: 100%; display: flex; flex-direction: column; }
/* 消息区用 fixed 脱离父级高度依赖，与底部固定的输入栏对齐，避免父级 height:100% 塌陷导致气泡溢出屏幕外 */
.ai-msgs { position: fixed; top: var(--top-h); bottom: calc(var(--tab-h) + 58px);
  left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  overflow-y: auto; padding: 12px; -webkit-overflow-scrolling: touch; }
.ai-row { display: flex; margin-bottom: 10px; }
.ai-row.user { justify-content: flex-end; }
.ai-bubble { max-width: 86%; padding: 10px 12px; font-size: var(--fs-13); line-height: 1.55; border-radius: 14px; }
.ai-bubble.user { background: var(--brand); color: #fff; border-radius: 14px 14px 4px 14px; }
.ai-bubble.ai { background: #fff; border-radius: 14px 14px 14px 4px; box-shadow: var(--sh-1); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ai-chip { background: var(--brand-soft); color: var(--brand-d); border-radius: 10px; padding: 3px 9px; font-size: var(--fs-12); font-weight: 600; }
.ai-reason { font-size: var(--fs-12); color: var(--ink-2); margin-bottom: 8px; }
.ai-sug { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-sug-chip { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 5px 10px; font-size: var(--fs-12); color: var(--ink-2); }
.ai-sug-chip:active { background: var(--bg); }
/* AI 找货：商品结果直接全宽网格呈现（不再套气泡），与对话行保持间距 */
.ai-goods { margin-bottom: 10px; }
.ai-input { position: fixed; left: 50%; transform: translateX(-50%); bottom: var(--tab-h); width: 100%; max-width: 480px;
  display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); z-index: 36; }
.ai-mic { font-size: 20px; padding: 0 4px; display: flex; align-items: center; opacity: .7; }
.ai-mic.on { opacity: 1; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.ai-text { flex: 1; border: 1px solid var(--line); border-radius: 20px; padding: 9px 14px; outline: none; font-size: var(--fs-14); background: var(--bg); }
.ai-send { background: var(--brand); color: #fff; border-radius: 20px; padding: 0 18px; font-weight: 700; font-size: var(--fs-13); }
