:root {
  --primary: #2563eb;
  --primary-2: #06b6d4;
  --primary-light: #e0f2fe;
  --bg: #f4f8ff;
  --surface: #ffffff;
  --text: #1e293b;
  --text-2: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(37, 99, 235, 0.08);
  --shadow-lg: 0 20px 60px rgba(37, 99, 235, 0.12);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
}
a { color: var(--primary); text-decoration: none; }
button, input, textarea, select {
  font-family: inherit; font-size: 15px;
}
button { cursor: pointer; border: none; outline: none; }

/* ---------- 布局 ---------- */
.app-shell {
  /* 电脑端铺满不留左右空白；手机端同步自适应 */
  width: 100%; max-width: none;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--surface);
  position: relative;
  overflow-x: hidden;
}
@media (min-width: 768px) {
  .app-shell { min-height: 100vh; border-radius: 0; }
  /* 宽屏下聊天区/商品网格自动伸展铺满 */
  .app-shell .chat-messages, .app-shell .product-grid, .app-shell .detail-body { max-width: none; }
}

.admin-shell {
  /* 后台端全宽铺满 */
  width: 100%; max-width: none;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

/* ---------- 顶部栏 ---------- */
.topbar {
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  position: sticky; top: 0; z-index: 100;
}
.topbar.transparent { background: transparent; color: var(--text); position: absolute; width: 100%; }
.topbar .title { font-weight: 600; font-size: 17px; }
.topbar .icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.18); color: inherit;
}

/* ---------- AI 导购页 ---------- */
.chat-hero {
  background: linear-gradient(180deg, #dbeafe 0%, #ffffff 100%);
  padding: 72px 16px 20px;
  text-align: center;
  position: relative;
}
.chat-hero .robot {
  width: 140px; height: 140px; margin: 0 auto 12px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.chat-hero .robot img {
  width: 120px; height: 120px; object-fit: cover; border-radius: 50%;
  position: relative; z-index: 2;
  filter: drop-shadow(0 8px 20px rgba(37,99,235,0.25));
}
.chat-hero .robot::before {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--primary-2), var(--primary));
  animation: spin 4s linear infinite;
  opacity: .22;
  z-index: 1;
}
.chat-hero .robot::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  filter: blur(16px);
  opacity: .35;
  z-index: 0;
  animation: pulse 2.5s infinite;
}
.chat-hero h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.chat-hero p { margin: 8px 0 0; color: var(--text-2); font-size: 15px; font-weight: 500; }

.suggestion-chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 16px; white-space: nowrap;
}
.suggestion-chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 20px;
  background: #fff; border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; box-shadow: var(--shadow);
}
.chip:active { transform: scale(0.98); }

.chat-messages {
  padding: 12px 16px 120px;
  display: flex; flex-direction: column; gap: 14px;
}
.msg-row { display: flex; gap: 10px; }
.msg-row.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: #fff; box-shadow: var(--shadow);
}
.msg-avatar.robot-avatar {
  padding: 2px; overflow: hidden;
}
.msg-avatar.robot-avatar img.ai-avatar-img {
  width: 32px; height: 32px; object-fit: cover; border-radius: 50%;
}
.msg-bubble {
  max-width: 78%; padding: 12px 14px; border-radius: var(--radius);
  line-height: 1.6; font-size: 15px; word-break: break-word;
  box-shadow: var(--shadow);
}
.msg-row.ai .msg-bubble {
  background: #fff; border-top-left-radius: 4px; color: var(--text);
}
.msg-row.user .msg-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; border-top-right-radius: 4px;
}
.msg-time { font-size: 11px; color: var(--text-2); margin-top: 4px; text-align: right; }

.ai-product-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ai-product-card {
  display: flex; gap: 10px; padding: 10px; background: #f8fafc;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.ai-product-card:active { transform: scale(0.99); }
.ai-product-card img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.ai-product-card .info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ai-product-card .title { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.4; }
.ai-product-card .price { font-size: 15px; color: var(--danger); font-weight: 700; margin-top: 4px; }
.ai-product-card .stock { font-size: 12px; color: var(--text-2); font-weight: 400; margin-left: 6px; }
/* AI 导购推荐 · 销冠式推荐理由 */
.ai-product-card .rec-reason {
  font-size: 12px; color: #92400e; line-height: 1.6; margin-top: 6px;
  background: linear-gradient(90deg, #fffbeb, #fef3c7);
  border-left: 3px solid #f59e0b; padding: 5px 9px; border-radius: 0 8px 8px 0;
}
/* AI 导购推荐 · 换一批按钮 */
.ai-rec-more {
  padding: 8px 26px; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff;
  border: none; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 14px rgba(37,99,235,.28); transition: transform .15s;
}
.ai-rec-more:active { transform: scale(.96); }

/* ---------- 快捷入口 ---------- */
.quick-actions {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 0 16px calc(110px + env(safe-area-inset-bottom, 0px));
}
.quick-card {
  background: #fff; border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border);
}
.quick-card .icon { font-size: 26px; }
.quick-card .txt { flex: 1; }
.quick-card .txt b { display: block; font-size: 15px; }
.quick-card .txt span { font-size: 12px; color: var(--text-2); }
.quick-card .arrow { color: var(--text-2); }

/* ---------- 底部输入栏 ---------- */
.input-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: #fff;
  padding: 10px 14px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: center; z-index: 101;
}
.input-bar input {
  flex: 1; height: 44px; border-radius: 22px; border: 1px solid var(--border);
  padding: 0 16px; background: #f8fafc; outline: none;
}
.input-bar input:focus { border-color: var(--primary); background: #fff; }
.input-bar .mic, .input-bar .send {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.input-bar .mic { background: var(--primary-light); color: var(--primary); font-size: 20px; }
.input-bar .send { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-size: 20px; }

/* ---------- 页面切换 ---------- */
.page { display: none; animation: fadeIn .25s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 产品页 ---------- */
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; font-size: 18px; font-weight: 700;
}
.search-bar {
  padding: 0 16px 12px; display: flex; gap: 8px;
}
.search-bar input {
  flex: 1; height: 42px; border-radius: 21px; border: 1px solid var(--border);
  padding: 0 16px; background: #f8fafc;
}
.search-bar button {
  height: 42px; padding: 0 18px; border-radius: 21px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff;
}
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  padding: 0 16px 100px;
}
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.product-card img { width: 100%; height: 150px; object-fit: cover; }
.product-card .body { padding: 12px; }
.product-card .name { font-size: 14px; font-weight: 500; line-height: 1.35; height: 40px; overflow: hidden; }
.product-card .price { color: var(--danger); font-size: 16px; font-weight: 700; margin-top: 6px; }
.product-card .price .market { font-size: 12px; color: var(--text-2); text-decoration: line-through; margin-left: 6px; font-weight: 400; }

/* ---------- 商品详情 ---------- */
.detail-hero img { width: 100%; max-height: 320px; object-fit: cover; }
.detail-body { padding: 16px; }
.detail-body h2 { margin: 0 0 8px; font-size: 20px; }
.detail-body .price-line { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.detail-body .price { font-size: 28px; color: var(--danger); font-weight: 800; }
.detail-body .market { font-size: 15px; color: var(--text-2); text-decoration: line-through; }
.detail-body .stock { font-size: 13px; color: var(--success); background: #ecfdf5; padding: 4px 10px; border-radius: 12px; }
.sku-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.sku { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.sku.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.btn-primary {
  width: 100%; height: 48px; border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-size: 16px; font-weight: 600; margin-top: 16px;
  box-shadow: 0 8px 24px rgba(37,99,235,0.25);
}
.btn-secondary {
  width: 100%; height: 46px; border-radius: 23px;
  background: #fff; color: var(--primary); border: 1px solid var(--primary);
  font-size: 15px; font-weight: 600; margin-top: 10px;
}

/* ---------- 表单 ---------- */
.form-card {
  background: #fff; margin: 16px; padding: 18px; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.form-card h3 { margin: 0 0 16px; font-size: 17px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #f8fafc;
}
.form-row textarea { min-height: 90px; resize: vertical; }

/* ---------- 管理后台 ---------- */
.admin-layout {
  display: grid; grid-template-columns: 220px 1fr; min-height: 100vh;
}
.admin-sidebar {
  background: #fff; border-right: 1px solid var(--border); padding: 20px 0;
  position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .brand {
  display: flex; align-items: center; gap: 10px; padding: 0 20px 24px; font-weight: 800; font-size: 20px;
}
.admin-sidebar .nav-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px;
  color: var(--text-2); cursor: pointer; transition: .15s;
}
.admin-sidebar .nav-item:hover, .admin-sidebar .nav-item.active {
  background: var(--primary-light); color: var(--primary); border-right: 3px solid var(--primary);
}
.admin-main { padding: 24px; }
.admin-topbar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.admin-topbar h1 { margin: 0; font-size: 24px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.stat-card .label { color: var(--text-2); font-size: 14px; }
.stat-card .value { font-size: 28px; font-weight: 800; margin-top: 6px; }
.stat-card .trend { font-size: 12px; color: var(--success); margin-top: 4px; }

.admin-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 20px;
}
.admin-card h3 { margin: 0 0 16px; font-size: 17px; display: flex; align-items: center; gap: 8px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; color: #1e293b; font-weight: 700; }
td { color: #1e293b; font-weight: 500; }
tr:hover { background: #f8fafc; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; }
.badge.green { background: #d1fae5; color: #065f46; }
.badge.yellow { background: #fef3c7; color: #92400e; }
.badge.red { background: #fee2e2; color: #991b1b; }
.badge.gray { background: #f1f5f9; color: #475569; }
.badge.blue { background: #dbeafe; color: #1e40af; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.btn-blue { background: var(--primary); color: #fff; }
.btn-light { background: #f1f5f9; color: var(--text); }
.btn-red { background: var(--danger); color: #fff; }

/* ---------- 登录 ---------- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  padding: 20px;
}
.login-box {
  width: 100%; max-width: 420px; background: #fff; border-radius: 28px;
  padding: 36px; box-shadow: var(--shadow-lg);
}
.login-box .logo { text-align: center; margin-bottom: 24px; }
.login-box .logo h1 { margin: 0; font-size: 26px; background: linear-gradient(90deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; color: transparent; }
.login-box .logo p { margin: 6px 0 0; color: var(--text-2); }

/* ---------- 辅助 ---------- */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 10px 18px; border-radius: 24px;
  font-size: 14px; z-index: 200; box-shadow: var(--shadow-lg);
}
.loading {
  display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 10px 100px; }
  .quick-actions { padding: 0 10px calc(110px + env(safe-area-inset-bottom, 0px)); gap: 8px; }
  .form-card { margin: 10px; padding: 14px; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* ---------- 精品推荐 / 平台优惠 ---------- */
.rec-card, .promo-card {
  background: #fff; border-radius: var(--radius);
  padding: 16px; margin: 12px 0;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: transform .15s;
}
.rec-card:active, .promo-card:active { transform: scale(0.99); }
.rec-card .icon { font-size: 32px; }
.rec-card .body, .promo-card .body { flex: 1; }
.rec-card .title, .promo-card .title { font-weight: 700; font-size: 16px; }
.rec-card .subtitle, .promo-card .desc { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.rec-card .arrow { color: var(--text-2); font-size: 20px; }
.promo-card { cursor: default; }

/* ---------- 门户页 ---------- */
.portal-shell {
  /* 电脑端全宽铺满，不留左右空白；手机端自适应 */
  width: 100%; max-width: none; margin: 0 auto; min-height: 100vh; background: var(--bg);
}
.portal-topbar {
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  /* 悬浮透明：覆盖在视频/背景之上，不再遮挡内容，电影级沉浸 */
  position: fixed; top: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.62) 0%, rgba(15,23,42,.32) 55%, rgba(15,23,42,0) 100%);
  color: #fff; border: none; backdrop-filter: none;
  z-index: 100;
}
.portal-topbar .title {
  color: #fff; font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.portal-topbar .contact-btn {
  background: rgba(255,255,255,.22); color: #fff;
  border: 1px solid rgba(255,255,255,.35); padding: 7px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.portal-hero {
  background: linear-gradient(180deg, #dbeafe 0%, var(--bg) 100%);
  padding: 48px 20px 28px; text-align: center;
}
.portal-hero h1 { margin: 0; font-size: 28px; font-weight: 800; }
.portal-hero p { margin: 10px 0 0; color: var(--text-2); font-size: 15px; }
.portal-section { padding: 16px 20px 24px; }
.portal-section-title {
  font-size: 18px; font-weight: 700; margin-bottom: 14px; padding-left: 10px;
  border-left: 4px solid var(--primary); color: var(--text);
}
.portal-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.portal-card {
  background: #fff; border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
}
.portal-card-icon { font-size: 40px; text-align: center; }
.portal-card-body { text-align: center; }
.portal-card-name { font-size: 18px; font-weight: 700; }
.portal-card-meta { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.portal-card .btn { width: 100%; justify-content: center; }

/* ---------- 订单聊天明细 ---------- */
.order-chatlog { font-size: 14px; }

/* ---------- 动画 ---------- */
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{ opacity: 1; transform: scale(1); } 50%{ opacity: .65; transform: scale(1.02); } }

/* ===================== 集市门户 · 商城模式 ===================== */
.portal-topbar .contact-btn {
  background: rgba(255,255,255,0.18); color: #fff;
  border: none; padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.portal-topbar .contact-btn:active { transform: scale(0.97); }

/* 横屏分类树（可左右滑动 + 指引按钮） */
.category-tree-wrap {
  display: flex; align-items: center; gap: 6px;
  position: sticky; top: 56px; z-index: 90;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
}
.category-tree {
  display: flex; gap: 10px; overflow-x: auto; flex: 1; padding: 6px 4px;
  -webkit-overflow-scrolling: touch;
}
.category-tree::-webkit-scrollbar { height: 0; }
.cat-scroll-btn {
  flex: 0 0 auto; width: 32px; height: 32px; border: none; border-radius: 50%;
  background: #fff; color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 14px rgba(15,23,42,0.18);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, background .15s; z-index: 5;
}
.cat-scroll-btn:hover { background: var(--primary); color: #fff; transform: scale(1.08); }
.cat-scroll-btn:active { transform: scale(0.92); }
.cat-tab {
  flex: 0 0 auto; padding: 8px 16px; border-radius: 20px;
  background: #fff; border: 1px solid var(--border); color: var(--text-2);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: .15s;
}
.cat-tab.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff; border-color: transparent; box-shadow: var(--shadow);
}

/* 店铺卡片——电脑端一排 5-8 个自动填满（按视口宽度自适应），卡片紧凑不留空白 */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.portal-card {
  background: #fff; border-radius: var(--radius); padding: 16px 12px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: transform .15s, box-shadow .15s;
}
.portal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.portal-card-logo {
  width: 76px; height: 76px; border-radius: 18px; object-fit: cover;
  box-shadow: 0 6px 16px rgba(37,99,235,0.14);
}
.portal-card-logo.placeholder {
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  background: linear-gradient(135deg, #dbeafe, #eff6ff); color: var(--primary);
}
.portal-card-body { text-align: center; width: 100%; }
.portal-card-name {
  font-size: 15px; font-weight: 800; letter-spacing: -0.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.portal-card-services {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px;
}
.sv-chip {
  font-size: 11px; padding: 3px 8px; border-radius: 10px;
  background: var(--primary-light); color: var(--primary); font-weight: 500;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sv-chip.muted { background: #f1f5f9; color: #94a3b8; }
.portal-card .btn { width: 100%; justify-content: center; font-size: 13px; padding: 9px 12px; }

@media (max-width: 1024px) {
  .portal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .portal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .portal-card { padding: 14px 10px; }
}
@media (max-width: 480px) {
  .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .portal-card { padding: 12px 8px; }
  .portal-card-logo { width: 56px; height: 56px; border-radius: 14px; }
  .portal-card-name { font-size: 13px; }
}

/* ===================== 用户端 · AI 快捷语卡片 ===================== */
.quick-prompt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 20px; margin: 0 8px 0 0;
  background: #fff; border: 1px solid var(--border); color: var(--text);
  font-size: 13px; box-shadow: var(--shadow); cursor: pointer; white-space: nowrap;
  max-width: 100%;
}
.quick-prompt:active { transform: scale(0.98); }
.quick-prompt.has-img { padding-left: 6px; }
.quick-prompt .qp-img {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border);
}
.quick-prompt .qp-text { overflow: hidden; text-overflow: ellipsis; }

/* ===================== 管理端 · 通用补充 ===================== */
.form-row input[type="file"] { padding: 6px; background: #f8fafc; }
.admin-card h3 .badge { margin-left: 8px; }

/* ===================== 管理端 · 商户内联秘钥 ===================== */
.merchant-ops { white-space: normal; }
.merchant-ops .btn { margin: 2px 4px 2px 0; }
.creds-expand > td { background: #f8fafc; padding: 0 !important; }
.creds-panel { padding: 18px; border: 1px solid var(--border); border-radius: 14px; margin: 10px; background: #fff; }
.creds-panel .form-row label { font-size: 13px; color: #475569; }
.creds-panel select, .creds-panel input { width: 100%; }

/* ===================== 门户 · 搜索框 ===================== */
.portal-search {
  display: flex; align-items: center; gap: 8px;
  margin: 0 16px 10px; padding: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 24px;
  box-shadow: var(--shadow);
  position: relative; z-index: 80;
}
.search-box { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 0 14px; }
.portal-search-icon { font-size: 16px; opacity: .6; }
.portal-search input {
  flex: 1; border: none; outline: none; background: transparent;
  padding: 12px 0; font-size: 15px; color: var(--text);
}
.portal-search-clear {
  border: none; background: #e2e8f0; color: #475569; cursor: pointer;
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.portal-search-clear:hover { background: #cbd5e1; }

/* ===================== 门户 · 搜索结果（店铺 + 商品） ===================== */
.portal-result-title {
  font-size: 16px; font-weight: 800; color: var(--text);
  padding: 18px 20px 12px; letter-spacing: -0.2px;
}
.portal-product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
  padding: 0 20px 24px;
}
.portal-product-card {
  display: flex; gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow); text-decoration: none; color: var(--text);
  transition: transform .15s, box-shadow .15s;
}
.portal-product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pp-img {
  width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
  background: #f1f5f9;
}
.pp-img.placeholder { display: flex; align-items: center; justify-content: center; font-size: 26px; }
.pp-body { min-width: 0; flex: 1; }
.pp-tag { margin-bottom: 4px; }
.pp-tag .store-tag { font-size: 10px; padding: 2px 8px; border-radius: 9px; }
.pp-name {
  font-size: 13px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pp-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.pp-price { color: #ef4444; font-weight: 800; font-size: 15px; }
.pp-shop { font-size: 11px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-green {
  background: linear-gradient(90deg, #10b981, #059669); color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(16,185,129,0.25);
}
.btn-green:hover { filter: brightness(1.05); }
@media (max-width: 480px) {
  .portal-product-grid { grid-template-columns: repeat(2, 1fr); padding: 0 14px 18px; gap: 10px; }
  .portal-product-card { flex-direction: column; align-items: flex-start; padding: 10px; }
  .pp-img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .pp-img.placeholder { height: auto; }
  .pp-name { -webkit-line-clamp: 2; }
  .pp-body { padding-right: 0; }
}

/* ===================== 门户 · 购物车 + 价格筛选 ===================== */
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; margin-left: 4px;
}
.portal-product-card { cursor: pointer; position: relative; }
.pp-body { padding-right: 34px; }
.btn-add-cart {
  position: absolute; right: 10px; top: 10px;
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(37,99,235,0.35); transition: transform .15s;
  z-index: 3;
}
.btn-add-cart:hover { transform: scale(1.1); }
.btn-add-cart:active { transform: scale(0.92); }

/* 价格区间筛选 */
.price-filter {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 16px 12px; padding: 8px 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow);
  position: sticky; top: 152px; z-index: 75;
}
.pf-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.price-chip {
  padding: 5px 12px; border-radius: 14px; font-size: 13px; cursor: pointer;
  background: #f1f5f9; color: #475569; border: 1px solid transparent; transition: .15s;
}
.price-chip:hover { background: var(--primary-light); color: var(--primary); }
.price-chip.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #fff;
  box-shadow: var(--shadow);
}

/* 购物车弹窗 */
.cart-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; background: #fff;
}
.cart-item-img {
  width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: #f1f5f9;
}
.cart-item-img.placeholder { display: flex; align-items: center; justify-content: center; font-size: 26px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-shop { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.cart-item-price { color: #ef4444; font-weight: 800; font-size: 15px; margin-top: 4px; }
.cart-item-ops { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.qty-stepper { display: flex; align-items: center; gap: 2px; }
.qty-stepper button {
  width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 8px;
  background: #f8fafc; color: var(--text); font-size: 15px; line-height: 1; cursor: pointer;
}
.qty-stepper button:hover { background: var(--primary-light); }
.qty-stepper span { min-width: 28px; text-align: center; font-weight: 700; font-size: 14px; }
.cart-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-top: 14px; margin-top: 4px; border-top: 1px dashed var(--border); flex-wrap: wrap;
}
.cart-total { font-size: 14px; color: var(--text-2); }
.cart-total b { color: #ef4444; font-size: 20px; margin-left: 4px; }
.cart-footer-btns { display: flex; gap: 8px; }

/* 价格自定义区间 */
.pf-custom { display: inline-flex; align-items: center; gap: 6px; }
.pf-custom input {
  width: 86px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px; color: var(--text); outline: none; background: #f8fafc;
}
.pf-custom input:focus { border-color: var(--primary); background: #fff; }
.pf-custom .pf-sep { color: #94a3b8; font-size: 13px; }

/* 批量结算 · 逐店分组 */
.cart-shop-groups {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; margin-bottom: 12px;
}
.csg-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.cart-shop-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px;
}
.cart-shop-row:last-child { margin-bottom: 0; }
.csr-info { min-width: 0; flex: 1; }
.csr-name { font-size: 14px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csr-meta { font-size: 12px; color: #64748b; margin-top: 3px; }
.cart-shop-row .btn { flex-shrink: 0; }

/* 用户端 · 小域主动带出的服务政策卡片 */
.service-card {
  background: linear-gradient(135deg, #eff6ff, #f8fafc) !important;
  border: 1px solid #bfdbfe; border-radius: 14px !important; padding: 12px 14px !important;
}
.service-card-title { font-size: 14px; font-weight: 800; color: #1e3a8a; margin-bottom: 6px; }
.service-card-body { font-size: 13px; color: #334155; line-height: 1.7; }
.service-card-foot { font-size: 12px; color: #64748b; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #c7d2fe; }

/* 商户后台 · 同步失败红色警示 */
.sync-error-banner {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, #fef2f2, #fff1f2);
  border: 1px solid #fca5a5; border-left: 4px solid #dc2626;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
  color: #991b1b; box-shadow: 0 4px 14px rgba(220,38,38,0.12);
}

/* 提示词模板库 chips */
.prompt-tpl {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px 8px 14px; border-radius: 20px; cursor: pointer;
  background: var(--primary-light); color: var(--primary);
  border: 1px solid #bfdbfe; font-size: 13px; font-weight: 600;
  transition: transform .15s, box-shadow .15s;
}
.prompt-tpl:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.prompt-tpl-use {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
  background: var(--primary); color: #fff;
}
.prompt-tpl.custom { background: #fefce8; color: #a16207; border-color: #fde68a; }
.prompt-tpl.save { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.prompt-tpl-del {
  font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 8px;
  background: #fee2e2; color: #dc2626; cursor: pointer;
}
.prompt-tpl-del:hover { background: #fecaca; }

/* 商户表标签下拉 */
.tag-select {
  padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 12px; color: var(--text); background: #fff; max-width: 150px;
}

/* ===================== 店铺标签（黑标/红标/绿标） ===================== */
.store-tag {
  display: inline-block; padding: 3px 12px; border-radius: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px; white-space: nowrap;
}
.store-tag.black { background: #1e293b; color: #f8fafc; box-shadow: 0 2px 8px rgba(15,23,42,.3); }
.store-tag.red { background: linear-gradient(90deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 2px 8px rgba(239,68,68,.35); }
.store-tag.green { background: linear-gradient(90deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 2px 8px rgba(34,197,94,.35); }
.store-tag.pink { background: linear-gradient(90deg, #ec4899, #db2777); color: #fff; box-shadow: 0 2px 8px rgba(236,72,153,.35); }

/* 门户卡标签（logo 正上方） */
.portal-card-tag { min-height: 0; margin-bottom: 8px; }
.portal-card-tag:empty { display: none; margin-bottom: 0; }

/* AI 导购端标签（店名与「正在为您服务」之间） */
#storefrontTag { margin: 8px 0 2px; min-height: 0; }
#storefrontTag:empty { display: none; margin: 0; }
.chat-hero #storefrontTag .store-tag { font-size: 13px; padding: 4px 14px; }

/* 用户端 topbar 按钮组 + 购物车角标 */
.topbar .topbar-actions { display: flex; align-items: center; gap: 2px; }
.topbar .topbar-actions .icon-btn { position: relative; }
#appCartBadge {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ===================== 集市 · 左侧标签分类树 ===================== */
.portal-body {
  display: grid; grid-template-columns: 170px 1fr; gap: 18px;
  align-items: start;
  /* 分类树贴左、商品网格贴近右侧边缘，整体饱满不留空白 */
  padding: 0 14px 20px 0;
  width: 100%;
}
.portal-tag-tree {
  position: sticky; top: 200px;
  display: flex; flex-direction: column; gap: 6px;
}
.tag-tree-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text);
  background: #fff; border: 1px solid var(--border);
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.tag-tree-item:hover { border-color: var(--primary); transform: translateX(2px); }
.tag-tree-item.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #fff;
  border-color: transparent; box-shadow: var(--shadow);
}
.tag-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.tag-count {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: #e2e8f0; color: #475569; font-size: 11px; font-weight: 700;
}
.tag-tree-item.active .tag-count { background: rgba(255,255,255,.25); color: #fff; }
@media (max-width: 768px) {
  .portal-body { grid-template-columns: 1fr; padding: 0 12px; gap: 8px; }
  .portal-tag-tree {
    position: static; flex-direction: row; overflow-x: auto;
    padding: 0 16px; padding-bottom: 4px; -webkit-overflow-scrolling: touch;
  }
  .tag-tree-item { white-space: nowrap; flex-shrink: 0; }
  .tag-tree-item:hover { transform: none; }
}

/* ===================== 集市 v2.0 改版 · 顶部轮播/视频 + 左侧分类树 ===================== */

/* ----- 顶部 hero 长体横幅（轮播图/大长视频，文字悬浮） ----- */
.portal-hero {
  position: relative;
  width: 100%;
  /* 电影级 21:9 大长体：桌面 40vw 高度 ≈ 2.5:1 影院比例 */
  height: clamp(220px, 40vw, 560px);
  overflow: hidden;
  background: #0f172a;
  color: #fff;
  isolation: isolate;
}
/* 视频画面重心略下移：cover 裁切时保留下方主体（电影感更完整） */
.hero-video { object-position: 50% 60%; }
/* 手机端：hero 更高（画面更大更完整），视频画面重心下移，顺畅观影 */
@media (max-width: 768px) {
  .portal-hero { height: clamp(240px, 60vw, 420px); }
  .hero-content { padding: 44px 16px 16px; }
  /* 视频画面整体下移：cover 裁切时保留画面下方主体（更完整观感） */
  .hero-video { object-position: 50% 68%; }
}
/* hero 顶部额外内边距，避开悬浮顶栏 */
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 48px 20px 20px;   /* 顶部 48px 留给悬浮 topbar */
}
.hero-bg {
  position: absolute; inset: 0;
  background: #0f172a;
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.1s ease;
  will-change: opacity;
}
.hero-slide.active { opacity: 1; }
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;        /* 视频裁剪居中，长体铺满 */
  display: block;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.45);   /* 由 JS 根据 overlay 配置动态设置 */
  pointer-events: none;
}
.hero-content h1 {
  margin: 0;
  font-size: clamp(22px, 4.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 18px rgba(0,0,0,.4);
}
.hero-content p {
  margin: 10px 0 0;
  font-size: clamp(13px, 1.8vw, 16px);
  font-weight: 500;
  color: rgba(255,255,255,.92);
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.hero-dots {
  position: absolute;
  bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 3;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: background .2s, transform .2s, width .2s;
}
.hero-dot:hover { background: rgba(255,255,255,.7); }
.hero-dot.active {
  background: #fff;
  width: 22px;
  border-radius: 5px;
}

/* ----- 视频加载中占位（避免黑屏） ----- */
.hero-video-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  z-index: 2; color: #e2e8f0; font-size: 14px; font-weight: 500;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}
.hvl-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: hvl-spin .8s linear infinite;
}
@keyframes hvl-spin { to { transform: rotate(360deg); } }

/* ----- 顶部 · 店铺标签树（水平 chips，带左右滑按钮） ----- */
.tag-tree-wrap {
  display: flex; align-items: center; gap: 6px;
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  -webkit-overflow-scrolling: touch;
}
.tag-tree-inner {
  display: flex; gap: 8px; overflow-x: auto; flex: 1; padding: 4px 2px;
  scrollbar-width: none;
}
.tag-tree-inner::-webkit-scrollbar { height: 0; }
.tag-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: .15s;
}
.tag-chip:hover { border-color: var(--primary); color: var(--primary); }
.tag-chip.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(37,99,235,.28);
}
.tag-chip.active .tag-count { background: rgba(255,255,255,.25); color: #fff; }

/* ----- 主体（左侧分类树 + 右侧主内容）—— 全宽贴边，分类树靠左、网格铺满右侧 */
.portal-body {
  display: grid;
  grid-template-columns: 168px 1fr;    /* 桌面：左侧 168px 分类树 + 右侧主内容 */
  gap: 16px;
  align-items: start;
  padding: 16px 14px 24px 0;          /* 左 0：分类树贴左；右 14：留点呼吸感 */
  width: 100%;
  margin: 0;
}

/* ----- 左侧 · 商品分类树（竖排可滚动） ----- */
.portal-cat-tree {
  position: sticky;
  top: 120px;                  /* topbar 56 + 标签树 ~64 */
  align-self: start;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 6px;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.portal-cat-tree::-webkit-scrollbar { width: 4px; }
.portal-cat-tree::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
.portal-cat-tree::-webkit-scrollbar-track { background: transparent; }
.cat-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  transition: background .15s, color .15s, transform .15s;
  margin-bottom: 2px;
  word-break: keep-all;
}
.cat-item:hover { background: var(--primary-light); color: var(--primary); }
.cat-item.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,.25);
  font-weight: 700;
}
.cat-item.active .cat-ico { transform: scale(1.1); }
.cat-ico { font-size: 16px; line-height: 1; flex-shrink: 0; }
.cat-name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-empty { padding: 18px 12px; color: #94a3b8; font-size: 13px; text-align: center; }

/* ----- 移动端适配（≤ 768px） ----- */
@media (max-width: 768px) {
  .portal-hero { height: clamp(150px, 40vw, 220px); }
  .portal-body { grid-template-columns: 1fr; padding: 0 12px 20px; gap: 10px; }

  /* 标签树：取消左右滑动按钮改手动滑，显示条左右两头拉满 */
  .tag-tree-wrap { top: 56px; padding: 8px 0; gap: 0; }
  .tag-tree-inner { padding: 2px 12px; gap: 8px; }

  /* 分类树：与标签树一致的滑动条比例 + 左右两头拉满 + 缩小上下间距 */
  .portal-cat-tree {
    position: static;
    max-height: none;
    overflow-x: auto; overflow-y: hidden;
    display: flex; flex-direction: row; align-items: center; gap: 8px;
    padding: 8px 0;
    margin: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.95);
    box-shadow: none;
    scrollbar-width: none;
  }
  .portal-cat-tree::-webkit-scrollbar { height: 0; }
  .cat-item {
    flex: 0 0 auto;
    padding: 7px 14px;             /* 与标签 chip 一致的比例 */
    font-size: 13px;               /* 与标签 chip 一致字号 */
    border-radius: 18px;           /* 与标签 chip 一致圆角 */
    margin-bottom: 0;
    background: #f8fafc;
    border: 1px solid var(--border);
  }
  .cat-item:first-child { margin-left: 12px; }
  .cat-item:last-child { margin-right: 12px; }
  .cat-item.active { background: linear-gradient(90deg, var(--primary), var(--primary-2)); }
  .cat-ico { font-size: 14px; }
  /* 分类树标题：横滑容器里横排显示（不挤压成竖排），作为首个固定项 */
  .cat-tree-title {
    flex: 0 0 auto; white-space: nowrap; align-self: center;
    font-size: 13px; font-weight: 700; color: var(--text-2);
    padding: 7px 2px 7px 12px; margin: 0;
  }

  /* ----- 搜索条 + 集市在线客服并列一行（蓝搜索块 + 黄客服块，分离留距、功能分明、减少误点） ----- */
  .portal-search {
    margin: 0 12px 10px; padding: 0;
    background: transparent; border: none; box-shadow: none;
    gap: 10px;  /* 搜索块与客服块之间留距 */
  }
  /* 蓝色搜索块：纯色、胶囊、长度随内容（flex:1 但被客服占位后自然缩短） */
  .search-box {
    flex: 1; min-width: 0;
    background: #2563eb;
    border-radius: 999px; padding: 3px 14px;
    box-shadow: 0 4px 14px rgba(37,99,235,.28);
    gap: 7px;
  }
  .portal-search-icon { font-size: 15px; opacity: 1; color: rgba(255,255,255,.95); flex: 0 0 auto; }
  .portal-search input { flex: 1; min-width: 0; padding: 7px 0; font-size: 13px; color: #fff; background: transparent; }
  .portal-search input::placeholder { color: rgba(255,255,255,.72); }
  .portal-search-clear { background: rgba(255,255,255,.25); color: #fff; width: 20px; height: 20px; font-size: 11px; flex: 0 0 auto; }
  .portal-search-clear:hover { background: rgba(255,255,255,.4); }
  /* 黄色客服块：纯色、胶囊、独立在右，与蓝搜索块色阶分明 */
  .portal-search .market-service-btn {
    flex: 0 0 auto; padding: 9px 14px; border-radius: 999px;
    font-size: 12px; letter-spacing: 0; gap: 4px; white-space: nowrap;
    background: #f59e0b;
    border: none; box-shadow: 0 4px 12px rgba(245,158,11,.34);
  }
  .portal-search .market-service-btn:hover { transform: none; box-shadow: 0 4px 12px rgba(245,158,11,.34); }
  .portal-search .market-service-btn .ms-badge { font-size: 9px; padding: 0 5px; margin-left: 1px; background: #fff; color: #b45309; }

  /* 客服按钮已下移到搜索条，顶部 topbar 空了 → 手机端隐藏（缩小空间占比） */
  .portal-topbar { display: none; }
  /* topbar 隐藏后 hero 内容顶部留白缩小，视频占比更饱满 */
  .portal-hero .hero-content { padding: 18px 16px 14px; }
}


/* ===================== 集市在线客服（总平台官方 · 撮合式服务） ===================== */
/* 入口按钮：醒目、大气 */
.market-service-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.25);
  padding: 8px 16px; border-radius: 22px;
  font-size: 14px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(30,58,138,.35);
  transition: transform .15s, box-shadow .15s;
}
.market-service-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(30,58,138,.45); }
.market-service-btn:active { transform: scale(.97); }
.market-service-btn .ms-badge {
  background: #f59e0b; color: #1e3a8a; font-size: 10px; font-weight: 800;
  padding: 1px 7px; border-radius: 10px; margin-left: 2px;
}

/* 悬浮面板 */
.ms-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 999;
  width: 400px; max-width: calc(100vw - 24px);
  height: min(600px, calc(100vh - 40px));
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(15,23,42,.35);
  display: flex; flex-direction: column;
  transform: translateY(24px) scale(.96); opacity: 0; pointer-events: none;
  transition: transform .25s ease, opacity .2s ease;
  border: 1px solid #dbeafe;
}
.ms-panel.show { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

/* 头部：官方深蓝金 */
.ms-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
  color: #fff; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.ms-brand { display: flex; align-items: center; gap: 12px; }
.ms-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.ms-title { font-size: 17px; font-weight: 800; letter-spacing: .3px; }
.ms-sub { font-size: 11px; color: rgba(255,255,255,.85); margin-top: 2px; }
.ms-official {
  display: inline-block; background: #f59e0b; color: #1e3a8a;
  font-size: 10px; font-weight: 800; padding: 1px 8px; border-radius: 9px; margin-left: 4px;
}
.ms-close {
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff; font-size: 15px;
  cursor: pointer; flex-shrink: 0;
}
.ms-close:hover { background: rgba(255,255,255,.32); }

/* 撮合式平台提示条 */
.ms-badge-strip {
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  color: #92400e; font-size: 12px; line-height: 1.6;
  padding: 8px 16px; border-bottom: 1px solid #fde68a;
}
.ms-badge-strip b { color: #b45309; }

/* 聊天区 */
.ms-body {
  flex: 1; overflow-y: auto; padding: 16px 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  -webkit-overflow-scrolling: touch;
}
.ms-loading { text-align: center; color: #64748b; font-size: 13px; padding: 24px 0; }
.ms-spinner {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #dbeafe; border-top-color: #2563eb;
  animation: hvl-spin .7s linear infinite; vertical-align: middle; margin-right: 6px;
}
.ms-msg { display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start; }
.ms-msg.ms-user { flex-direction: row-reverse; }
.ms-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.ms-avatar.user { background: #e2e8f0; color: #475569; }
.ms-msg-bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.7;
  border: 1px solid var(--border);
}
.ms-msg-bubble.ai {
  background: #fff; color: #dc2626;   /* 官方服务：回复红色字体 */
  border-color: #fecaca; border-top-left-radius: 4px;
  box-shadow: 0 2px 10px rgba(15,23,42,.06);
  font-weight: 500;
}
.ms-msg-bubble.ai b { color: #b91c1c; }
.ms-msg-bubble.user {
  background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff;
  border-color: transparent; border-top-right-radius: 4px;
}
.ms-dots span { animation: ms-blink 1.2s infinite; }
.ms-dots span:nth-child(2) { animation-delay: .2s; }
.ms-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes ms-blink { 0%,80%,100% {opacity:.3} 40% {opacity:1} }

/* 店铺推荐卡片 */
.ms-shop-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ms-shop-card {
  background: #fff; border: 1px solid #dbeafe; border-radius: 12px;
  padding: 10px 12px; box-shadow: 0 2px 8px rgba(37,99,235,.08);
}
.ms-shop-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ms-shop-name { font-size: 14px; font-weight: 800; color: #1e3a8a; }
.ms-shop-card .store-tag { font-size: 10px; padding: 2px 8px; }
.ms-shop-meta { font-size: 12px; color: #475569; margin-top: 4px; }
.ms-shop-svc { font-size: 12px; color: #64748b; margin-top: 2px; }
.ms-shop-btn {
  display: inline-block; margin-top: 8px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff;
  font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 14px;
  text-decoration: none;
}
.ms-shop-more { font-size: 12px; color: #94a3b8; margin-top: 6px; }

/* 企业微信 */
.ms-wechat-box { margin-top: 10px; text-align: center; background: #fff; border: 1px solid #dbeafe; border-radius: 12px; padding: 12px; }
.ms-wechat-qr { width: 160px; height: 160px; object-fit: contain; border-radius: 10px; background: #fff; }
.ms-wechat-qr.placeholder { display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 13px; }
.ms-wechat-link {
  display: inline-block; margin-top: 10px;
  background: #07c160; color: #fff; font-weight: 700; font-size: 13px;
  padding: 8px 20px; border-radius: 20px; text-decoration: none;
}
.ms-wechat-tip { font-size: 11px; color: #94a3b8; margin-top: 8px; }

/* 快捷提问 + 输入栏 */
.ms-quick {
  display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px;
  background: #f8fafc; border-top: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.ms-quick button {
  flex: 0 0 auto; border: 1px solid #bfdbfe; background: #eff6ff; color: #1e3a8a;
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 16px;
  cursor: pointer; white-space: nowrap; transition: .15s;
}
.ms-quick button:hover { background: #dbeafe; }
.ms-inputbar {
  display: flex; gap: 8px; padding: 10px 12px;
  background: #fff; border-top: 1px solid var(--border);
}
.ms-inputbar input {
  flex: 1; border: 1px solid #dbeafe; border-radius: 20px;
  padding: 10px 14px; font-size: 14px; outline: none; color: var(--text);
}
.ms-inputbar input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.ms-send {
  border: none; border-radius: 20px; padding: 0 20px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.ms-send:hover { filter: brightness(1.08); }

@media (max-width: 480px) {
  /* 手机端：全屏抽屉式，避免键盘弹出时遮挡输入/快捷按钮；JS 会按 visualViewport 进一步微调 */
  .ms-panel {
    right: 0; bottom: 0; left: 0; top: 0; width: 100%; max-width: 100%;
    height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .ms-header { padding: 8px 12px; flex-shrink: 0; }
  .ms-logo { width: 32px; height: 32px; font-size: 17px; border-radius: 10px; }
  .ms-brand { gap: 8px; }
  .ms-title { font-size: 15px; }
  .ms-sub { font-size: 10px; margin-top: 1px; }
  .ms-official { font-size: 9px; padding: 0 5px; margin-left: 3px; }
  .ms-close { width: 28px; height: 28px; font-size: 14px; }
  .ms-badge-strip { font-size: 11px; line-height: 1.45; padding: 6px 12px; flex-shrink: 0; }
  .ms-body { padding: 10px 10px 4px; flex: 1 1 auto; min-height: 0; }
  .ms-msg { margin-bottom: 10px; gap: 6px; }
  .ms-avatar { width: 30px; height: 30px; font-size: 15px; }
  .ms-msg-bubble { font-size: 13px; line-height: 1.6; padding: 8px 11px; border-radius: 12px; max-width: 82%; }
  .ms-quick { padding: 6px 10px; gap: 5px; flex-shrink: 0; }
  .ms-quick button { font-size: 11px; padding: 5px 9px; border-radius: 14px; }
  .ms-inputbar { gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0)); flex-shrink: 0; }
  .ms-inputbar input { padding: 8px 12px; font-size: 13px; border-radius: 18px; }
  .ms-send { padding: 0 14px; font-size: 13px; border-radius: 18px; }
  .ms-loading { padding: 16px 0; font-size: 12px; }
}
  /* 快捷语：允许横滑且不被裁切，底部输入框避开手机安全区 */
  .ms-quick { padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0)); }
  .ms-inputbar { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0)); }
  .ms-msg-bubble { max-width: 82%; }
}

/* ===================== 店铺 AI 导购 · 企业微信卡片（二维码 + 按钮） ===================== */
.ai-wechat-box {
  margin-top: 10px; text-align: center;
  background: #fff; border: 1px solid #dbeafe; border-radius: 14px;
  padding: 14px; box-shadow: 0 2px 10px rgba(37,99,235,.08);
  max-width: 240px;
}
.ai-wechat-qr {
  width: 150px; height: 150px; object-fit: contain;
  border-radius: 10px; background: #fff; display: block; margin: 0 auto;
}
.ai-wechat-qr.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 12px; line-height: 1.7;
  background: #f8fafc; border: 1px dashed #cbd5e1;
}
.ai-wechat-btn {
  display: inline-block; margin-top: 12px;
  background: #07c160; color: #fff !important; font-weight: 700; font-size: 14px;
  padding: 10px 28px; border-radius: 22px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(7,193,96,.3);
  transition: transform .15s, box-shadow .15s;
}
.ai-wechat-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(7,193,96,.4); }
.ai-wechat-tip { font-size: 11px; color: #94a3b8; margin-top: 10px; line-height: 1.6; }

/* ===================== 集市店铺分页 ===================== */
.portal-pages {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 22px 0 8px; flex-wrap: wrap;
}
.pg-num {
  min-width: 34px; height: 34px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #fff; border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
  transition: .15s;
}
.pg-num:hover { border-color: var(--primary); color: var(--primary); }
.pg-num.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.portal-pagination {
  display: flex; justify-content: center; align-items: center; gap: 14px;
  padding: 10px 0 6px; flex-wrap: wrap;
}
.pp-btn {
  padding: 8px 20px; border-radius: 18px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s;
}
.pp-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pp-btn:disabled { opacity: .45; cursor: not-allowed; }
.pp-info { font-size: 13px; color: var(--text-2); }

/* 店铺备案合规信息（AI 导购页底部，小字体；上移避开底部固定输入框 ~70-80px） */
#shopCompliance {
  padding: 18px 16px 90px !important;   /* bottom 90px 预留 input-bar + 安全区，避免被输入框/虚拟键盘遮挡 */
  text-align: center; font-size: 11px; color: #94a3b8; line-height: 1.9;
  background: #fff; border-top: 1px solid #f1f5f9;
}
@media (max-width: 480px) {
  #shopCompliance { padding: 16px 14px 96px !important; }   /* 手机端虚拟键盘弹出更高 */
}

/* ===================== 商品详情 · 电商化（主图大图 + 缩略图 + 视频 + 详情大图） ===================== */
.pd-gallery { background: #fff; border-bottom: 1px solid var(--border); }
.pd-main {
  width: 100%; background: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pd-main img, .pd-main video { width: 100%; display: block; }
/* 缩略图横滑列表 */
.pd-thumbs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 12px; background: #fff;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.pd-thumbs::-webkit-scrollbar { height: 0; }
.pd-thumb {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s;
}
.pd-thumb.active { border-color: var(--primary); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb-video { background: #0f172a; position: relative; }
.pd-thumb-play { color: #fff; font-size: 22px; text-shadow: 0 2px 8px rgba(0,0,0,.5); }

/* 商品详情区（多张大图 + 视频 + 文本，传统电商风格） */
.pd-detail-section { margin-top: 22px; }
.pd-detail-title {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 14px;
}
.pd-detail-title span { flex: 1; height: 1px; background: #e2e8f0; }
.pd-detail-text { font-size: 14px; line-height: 1.8; color: #334155; margin-bottom: 14px; white-space: pre-wrap; }
.pd-detail-img { width: 100%; display: block; border-radius: 10px; margin-bottom: 10px; background: #f8fafc; }
.pd-detail-video { width: 100%; border-radius: 10px; background: #000; margin-bottom: 10px; max-height: 480px; }

@media (max-width: 480px) {
  .pd-main img, .pd-main video { max-height: 320px; }
  .pd-thumb { width: 56px; height: 56px; }
}

/* ===================== 商品详情 · 高标准电商 UI（价格栏/服务条/按钮组） ===================== */
.pd-title { font-size: 18px; font-weight: 700; color: #0f172a; line-height: 1.4; margin: 0 0 4px; }
.pd-price-bar { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 4px; gap: 10px; }
.pd-price-main { display: flex; align-items: baseline; gap: 8px; }
.pd-price { font-size: 27px; font-weight: 800; color: #dc2626; letter-spacing: .5px; }
.pd-market { font-size: 14px; color: #94a3b8; text-decoration: line-through; }
.pd-stock { font-size: 12px; color: #16a34a; background: #f0fdf4; padding: 3px 10px; border-radius: 12px; white-space: nowrap; }
.pd-stock.out { color: #dc2626; background: #fef2f2; }
.pd-service-bar {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin: 10px 0; padding: 9px 12px; background: #f8fafc; border-radius: 10px;
  font-size: 12px; color: #16a34a; font-weight: 600;
}
.pd-meta { font-size: 13px; color: #64748b; margin: 8px 0; }
.pd-spec-title { font-size: 14px; font-weight: 700; color: #1e293b; margin: 14px 0 8px; }
.pd-actions { display: flex; gap: 10px; margin: 16px 0 10px; }
.pd-btn-buy {
  flex: 1.2; padding: 13px; background: linear-gradient(135deg, #f59e0b, #dc2626);
  color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px rgba(220,38,38,.28); transition: transform .15s;
}
.pd-btn-buy:active { transform: scale(.97); }
.pd-btn-cart {
  flex: 1; padding: 13px; background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 18px rgba(37,99,235,.26); transition: transform .15s;
}
.pd-btn-cart:active { transform: scale(.97); }
.pd-btn-inquiry {
  width: 100%; padding: 11px; background: #fff; color: #2563eb;
  border: 1px solid #2563eb; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer;
}
@media (max-width: 480px) {
  .pd-price { font-size: 24px; }
  .pd-title { font-size: 17px; }
}

/* ===================== 订单明细 · 电商化（状态标签页 + 商品卡） ===================== */
.od-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 14px; scrollbar-width: none; }
.od-tabs::-webkit-scrollbar { height: 0; }
.od-tab { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; font-size: 13px; color: #475569; cursor: pointer; background: #f1f5f9; font-weight: 600; white-space: nowrap; transition: all .15s; }
.od-tab.active { background: var(--primary); color: #fff; }
.od-tab-n { display: inline-block; margin-left: 5px; background: #dc2626; color: #fff; font-size: 10px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 999px; padding: 0 4px; }
.od-tab.active .od-tab-n { background: rgba(255,255,255,.25); }
.od-card { padding: 14px 16px; }
.od-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); margin-bottom: 12px; }
.od-no { font-weight: 700; font-size: 13.5px; }
.od-time { font-size: 11.5px; color: #94a3b8; margin-left: 8px; }
.od-prod { display: flex; gap: 12px; align-items: center; }
.od-prod img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: #f1f5f9; }
.od-prod-info { flex: 1; min-width: 0; }
.od-prod-name { font-size: 14px; font-weight: 600; color: #1e293b; line-height: 1.4; }
.od-prod-spec { font-size: 12px; color: #94a3b8; margin-top: 3px; }
.od-prod-price { text-align: right; flex-shrink: 0; font-size: 14px; font-weight: 700; color: #334155; }
.od-qty { font-size: 12px; color: #94a3b8; font-weight: 400; margin-top: 3px; }
.od-total { text-align: right; font-size: 13px; color: #475569; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.od-total b { color: #dc2626; font-size: 16px; }
.od-line { font-size: 12px; color: #64748b; margin-top: 6px; }
.od-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
@media (max-width: 480px) { .od-prod img { width: 52px; height: 52px; } .od-no { font-size: 12.5px; } .od-total b { font-size: 15px; } }
