/*
 * Bazaar 主题样式：参考 shadcn/ui 的中性色设计（zinc 色板、1px 边框、0.5rem 圆角、轻阴影）。
 * 页面内复用的系统模板（商品页、结算页、购物车、订单查询、插件页）使用 OneUI/Bootstrap 类名，
 * 这里统一用 .bz-body 前缀覆盖成同一套视觉。
 */
:root {
    --bz-background: #ffffff;
    --bz-foreground: #09090b;
    --bz-card: #ffffff;
    --bz-muted: #f4f4f5;
    --bz-muted-foreground: #71717a;
    --bz-accent: #f4f4f5;
    --bz-border: #e4e4e7;
    --bz-input: #e4e4e7;
    --bz-ring: #60a5fa;
    /* 蓝色表示可操作，橙色只用于价格和热销，绿色只用于有库存 */
    --bz-primary: #2563eb;
    --bz-primary-hover: #1d4ed8;
    --bz-primary-soft: #eff6ff;
    --bz-primary-border: #bfdbfe;
    --bz-price: #ea580c;
    --bz-page: #f5f6f8;
    --bz-primary-foreground: #fafafa;
    --bz-destructive: #ef4444;
    --bz-success: #16a34a;
    --bz-warning: #f59e0b;
    --bz-radius: 0.5rem;
    --bz-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --bz-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    --bz-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.06);
    --bz-h1: 28px; --bz-h2: 20px; --bz-h3: 16px; --bz-h4: 15px; --bz-h5: 14px; --bz-h6: 13px;
    --bz-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    /* 兼容旧变量名（店铺生态插件等仍在使用） */
    --bz-brand: var(--bz-primary);
    --bz-brand-dark: var(--bz-primary-hover);
    --bz-ink: var(--bz-foreground);
    --bz-line: var(--bz-border);
    --bz-bg: var(--bz-background);
}

body.bz-body {
    background: var(--bz-background);
    color: var(--bz-foreground);
    font-family: var(--bz-font);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
.bz-body a { color: inherit; text-decoration: none; }
.bz-body ::selection { background: #e4e4e7; }
.bz-body #page-container.bz-page { background: transparent; min-height: 100vh; }
.bz-body #main-container { display: block; width: 100%; }
/* 站点 index.min.css 中 #main-container 为 flex 容器，需显式占满宽度，否则内容会按内容宽度收缩 */
.bz-wrap { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
@media (min-width: 768px) { .bz-wrap { padding: 0 24px; } }
.bz-main { padding-top: 24px; padding-bottom: 16px; }
.bz-ico { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bz-ico-sm { width: 14px; height: 14px; }

/* ---------- 基础组件 ---------- */
.bz-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 36px; padding: 0 16px; border-radius: calc(var(--bz-radius) - 2px);
    font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer;
    border: 1px solid transparent; transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}
.bz-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bz-background), 0 0 0 4px var(--bz-ring); }
.bz-btn-primary { background: var(--bz-primary); color: var(--bz-primary-foreground) !important; box-shadow: var(--bz-shadow-sm); }
.bz-btn-primary:hover { background: var(--bz-primary-hover); }
.bz-btn-outline { background: var(--bz-background); border-color: var(--bz-input); color: var(--bz-foreground) !important; box-shadow: var(--bz-shadow-sm); }
.bz-btn-outline:hover { background: var(--bz-accent); }
.bz-btn-ghost { background: transparent; color: var(--bz-foreground) !important; }
.bz-btn-ghost:hover { background: var(--bz-accent); }
.bz-btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.bz-btn-icon { width: 36px; padding: 0; position: relative; }
.bz-badge-dot {
    position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--bz-destructive); color: #fff; font-size: 12px; font-weight: 600; line-height: 16px; text-align: center;
    box-shadow: 0 0 0 2px var(--bz-background);
}
.bz-badge {
    display: inline-flex; align-items: center; gap: 4px; border-radius: calc(var(--bz-radius) - 2px);
    border: 1px solid var(--bz-border); padding: 1px 8px; font-size: 12px; font-weight: 500; line-height: 18px;
    color: var(--bz-foreground); background: var(--bz-background); white-space: nowrap;
}
.bz-badge-secondary { border-color: transparent; background: var(--bz-muted); }
.bz-badge-success { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.bz-badge-warning { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.bz-card { background: var(--bz-card); border: 1px solid var(--bz-border); border-radius: calc(var(--bz-radius) + 4px); box-shadow: var(--bz-shadow-sm); }
.bz-input {
    height: 36px; width: 100%; border: 1px solid var(--bz-input); border-radius: calc(var(--bz-radius) - 2px);
    background: var(--bz-background); padding: 0 12px; font-size: 14px; color: var(--bz-foreground); box-shadow: var(--bz-shadow-sm); outline: none;
}
.bz-input::placeholder { color: var(--bz-muted-foreground); }
.bz-input:focus { box-shadow: 0 0 0 1px var(--bz-ring); border-color: var(--bz-ring); }

/* ---------- 顶栏 ---------- */
.bz-header {
    position: sticky; top: 0; z-index: 1030; border-bottom: 1px solid var(--bz-border);
    background: rgb(255 255 255 / 0.92); -webkit-backdrop-filter: saturate(180%) blur(8px); backdrop-filter: saturate(180%) blur(8px);
}
.bz-header .bz-wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.bz-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; color: var(--bz-foreground) !important; margin-right: 8px; }
.bz-logo img { height: 28px; width: 28px; flex-shrink: 0; object-fit: contain; border-radius: 6px; }
.bz-nav { display: flex; align-items: center; gap: 2px; }
.bz-nav a { padding: 6px 10px; font-size: 15px; font-weight: 500; color: #3f3f46; border-radius: calc(var(--bz-radius) - 2px); white-space: nowrap; }
.bz-nav a:hover { color: var(--bz-primary); }
.bz-search { position: relative; flex: 1; min-width: 0; max-width: 420px; margin-left: auto; }
.bz-search .bz-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--bz-muted-foreground); pointer-events: none; }
.bz-search .bz-input { padding-left: 32px; background: var(--bz-muted); border-color: transparent; box-shadow: none; }
.bz-search .bz-input:focus { background: var(--bz-background); border-color: var(--bz-ring); }
.bz-actions { display: flex; align-items: center; gap: 4px; }
.bz-avatar {
    width: 24px; height: 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--bz-muted); border: 1px solid var(--bz-border); color: var(--bz-foreground); font-size: 11px; font-weight: 600; overflow: hidden;
}
.bz-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bz-avatar.seller { background: var(--bz-primary); border-color: var(--bz-primary); color: var(--bz-primary-foreground); }
.bz-account-btn { padding: 0 10px 0 6px; gap: 8px; }
.bz-count { font-size: 12px; font-weight: 600; line-height: 16px; padding: 0 5px; border-radius: 999px; background: var(--bz-destructive); color: #fff; }
.bz-body .bz-catalog-menu { width: 390px; max-width: calc(100vw - 32px); max-height: min(70vh, 620px); margin-top: 8px !important; padding: 6px; overflow-y: auto; border-radius: 14px; scrollbar-width: thin; }
.bz-body .bz-catalog-menu .dropdown-item { gap: 10px; white-space: normal; }
.bz-body .bz-catalog-menu .bz-cm-item { min-height: 44px; padding: 7px 8px; border-radius: 10px; font-weight: 600; }
.bz-body .bz-catalog-menu .bz-cm-child { min-height: 32px; padding: 5px 8px; border-radius: 8px; font-size: 13px; font-weight: 400; color: #52525b; }
.bz-body .bz-catalog-menu .dropdown-item:hover, .bz-body .bz-catalog-menu .dropdown-item:focus { background: var(--bz-primary-soft); color: var(--bz-primary); }
.bz-cm-ico { position: relative; flex-shrink: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--bz-border); border-radius: 8px; background: var(--bz-background); font-size: 15px; font-weight: 700; color: var(--bz-primary); }
.bz-cm-ico img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 4px; box-sizing: border-box; object-fit: contain; background: var(--bz-background); }
.bz-cm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-cm-count { flex-shrink: 0; min-width: 26px; padding: 1px 7px; border-radius: 999px; background: var(--bz-muted); text-align: center; font-size: 12px; font-weight: 500; line-height: 16px; color: var(--bz-muted-foreground); font-variant-numeric: tabular-nums; }
.bz-cm-children { margin: 0 0 4px 22px; padding-left: 8px; border-left: 1px solid var(--bz-border); }
@media (max-width: 1023px) {
    .bz-nav { display: none; }
}
@media (max-width: 767px) {
    .bz-header .bz-wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
    .bz-search { order: 5; flex-basis: 100%; max-width: none; margin-left: 0; }
    .bz-actions { margin-left: auto; }
    .bz-account-btn .bz-pill-text { display: none; }
    .bz-account-btn { padding: 0 6px; }
}

/* ---------- 下拉菜单（Bootstrap） ---------- */
.bz-body .dropdown-menu {
    border: 1px solid var(--bz-border); border-radius: var(--bz-radius); padding: 4px; min-width: 12rem;
    box-shadow: var(--bz-shadow-lg); background: var(--bz-background); font-size: 14px;
}
.bz-body .dropdown-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border-radius: calc(var(--bz-radius) - 4px); padding: 6px 8px; font-size: 14px; color: var(--bz-foreground);
}
.bz-body .dropdown-item:hover, .bz-body .dropdown-item:focus { background: var(--bz-accent); color: var(--bz-foreground); }
.bz-body .dropdown-item.active, .bz-body .dropdown-item:active { background: var(--bz-accent); color: var(--bz-foreground); }
.bz-body .dropdown-divider { margin: 4px -4px; border-color: var(--bz-border); opacity: 1; }
.bz-menu-label { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--bz-foreground); }
.bz-menu-label small { display: block; font-weight: 400; color: var(--bz-muted-foreground); }
.bz-menu-hint { font-size: 12px; color: var(--bz-muted-foreground); font-variant-numeric: tabular-nums; }

/* ---------- 首页 ---------- */
body.bz-body { background: var(--bz-page); }
.bz-header { background: var(--bz-background); -webkit-backdrop-filter: none; backdrop-filter: none; }
.bz-alert { display: block; margin: 0 0 16px; padding: 0; overflow: hidden; background: var(--bz-background); border: 1px solid var(--bz-border); border-radius: 16px; box-shadow: none; }
.bz-alert-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.bz-alert-body img { max-width: 100%; height: auto; }
@media (max-width: 767px) { .bz-alert { margin-bottom: 12px; } }

/* 分类：一行图标方块，放不下时左右滑动 */
.bz-cat-panel { padding: 20px 24px 20px; border-radius: 16px; box-shadow: none; scroll-margin-top: 76px; }
.bz-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 32px; margin-bottom: 14px; }
.bz-cat-head h2 { font-size: var(--bz-h2); font-weight: 700; margin: 0; }
.bz-cat-nav { display: flex; gap: 6px; }
.bz-cat-arrow { width: 32px; height: 32px; padding: 0; border: 1px solid var(--bz-border); border-radius: 8px; background: var(--bz-background); color: var(--bz-foreground); font-size: 12px; cursor: pointer; transition: background-color .15s, color .15s; }
.bz-cat-arrow:hover:not(:disabled) { background: var(--bz-primary-soft); color: var(--bz-primary); }
.bz-cat-arrow:disabled { opacity: .4; cursor: default; }
.bz-cat-arrow[hidden] { display: none; }
/* 分类居左排列，放不下时横向滚动 */
.bz-cats { display: grid; grid-auto-flow: column; grid-auto-columns: 72px; gap: 12px; padding: 2px 0; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.bz-cats::-webkit-scrollbar { display: none; }
.bz-cat { display: block; min-width: 0; border-radius: 16px; scroll-snap-align: start; }
.bz-cat .ico {
    position: relative; width: 100%; height: 72px; border-radius: 16px; overflow: hidden;
    display: flex; align-items: center; justify-content: center; font-size: 32px;
    background: var(--bz-muted); background: color-mix(in srgb, var(--bz-cat, #71717a) 9%, #fff); border: 1px solid transparent;
    transition: background-color .15s, border-color .15s;
}
.bz-cat .ico img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 16px; box-sizing: border-box; object-fit: contain; }
.bz-cat .ico-letter { font-size: 26px; font-weight: 700; }
.bz-cat .ico.c0 .ico-letter { color: #2563eb; } .bz-cat .ico.c1 .ico-letter { color: #ea580c; } .bz-cat .ico.c2 .ico-letter { color: #16a34a; }
.bz-cat .ico.c3 .ico-letter { color: #9333ea; } .bz-cat .ico.c4 .ico-letter { color: #db2777; } .bz-cat .ico.c5 .ico-letter { color: #0891b2; }
.bz-cat .ico.c0 { --bz-cat: #2563eb; } .bz-cat .ico.c1 { --bz-cat: #ea580c; } .bz-cat .ico.c2 { --bz-cat: #16a34a; }
.bz-cat .ico.c3 { --bz-cat: #9333ea; } .bz-cat .ico.c4 { --bz-cat: #db2777; } .bz-cat .ico.c5 { --bz-cat: #0891b2; }
.bz-cat:hover .ico, .bz-cat:focus-visible .ico { background: color-mix(in srgb, var(--bz-cat, #71717a) 16%, #fff); border-color: color-mix(in srgb, var(--bz-cat, #71717a) 35%, #fff); }

/* 免费工具与站点介绍 */
.bz-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.bz-tool { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; padding: 20px 12px; border: 1px solid var(--bz-border); border-radius: 14px; background: var(--bz-background); text-align: center; font-size: 13px; line-height: 1.45; transition: box-shadow .15s, border-color .15s; }
.bz-tool .ico { width: 52px; height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--bz-primary-soft); color: var(--bz-primary); font-size: 24px; }
.bz-tool .name { min-width: 0; overflow-wrap: anywhere; }
.bz-body .bz-tool:hover { color: var(--bz-primary); border-color: var(--bz-primary-border); box-shadow: var(--bz-shadow-md); }
.bz-about { margin-top: 32px; padding: 24px; border-radius: 16px; box-shadow: none; }
.bz-about h2 { font-size: var(--bz-h2); font-weight: 700; margin: 0 0 8px; }
.bz-about p { margin: 0; color: #52525b; font-size: 14px; line-height: 1.75; }
@media (max-width: 767px) {
    .bz-cat-panel { padding: 10px 12px; }
    .bz-cat-head { position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
    .bz-cats { grid-auto-columns: 46px; gap: 8px; }
    .bz-cat, .bz-cat .ico { border-radius: 12px; }
    .bz-cat .ico { height: 46px; font-size: 24px; }
    .bz-cat .ico img { padding: 10px; }
    .bz-cat .ico-letter { font-size: 20px; }
    .bz-about { margin-top: 24px; padding: 16px; }
}

.bz-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.bz-h h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.bz-body .bz-h a { font-size: 14px; font-weight: 500; color: var(--bz-muted-foreground); white-space: nowrap; }
.bz-body .bz-h a:hover { color: var(--bz-primary); }
.bz-tags { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 12px; }
.bz-body .bz-tag { flex-shrink: 0; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--bz-border); border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--bz-background); transition: background-color .15s; }
.bz-body .bz-tag:hover { background: var(--bz-primary-soft); border-color: var(--bz-primary-border); color: var(--bz-primary); }
.bz-body .bz-tag.active { background: var(--bz-primary); border-color: var(--bz-primary); color: var(--bz-primary-foreground); }

/* 商品：按分类分组的表格，价格/库存/操作各占一列 */
.bz-section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 32px 0 12px; }
.bz-section-title h2 { font-size: var(--bz-h2); font-weight: 700; margin: 0; }
.bz-body .bz-section-title a { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: var(--bz-muted-foreground); white-space: nowrap; }
.bz-body .bz-section-title a:hover { color: var(--bz-primary); }
.bz-table { margin-top: 20px; border-radius: 14px; overflow: hidden; box-shadow: var(--bz-shadow-sm); scroll-margin-top: 76px; }
.bz-table-title { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.bz-table-title .ico { width: 28px; height: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--bz-primary-soft); color: var(--bz-primary); font-size: 16px; font-weight: 700; }
.bz-table-title h3 { flex: 1; min-width: 0; margin: 0; font-size: var(--bz-h3); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-body .bz-table-title a { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--bz-primary); white-space: nowrap; }
.bz-table-title > h3 { flex: 0 1 auto; }
.bz-table-title > a { margin-left: auto; }
.bz-table-stock { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; background: #f0fdf4; font-size: 12px; font-weight: 600; color: #15803d; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bz-table-stock i { font-size: 12px; }
.bz-table-stock.is-out { background: var(--bz-muted); color: var(--bz-muted-foreground); }
/* 商品行：图片、名称、操作图标，右侧价格、库存、已售和购买 */
.bz-cols, .bz-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 96px 104px 84px 72px 92px; column-gap: 14px; align-items: center; }
.bz-cols { height: 38px; padding: 0 16px; font-size: 13px; font-weight: 600; color: #52525b; background: #f8fafc; border-top: 1px solid var(--bz-border); border-bottom: 1px solid var(--bz-border); }
.bz-cols > :first-child { grid-column: span 3; }
.bz-cols .c { text-align: center; }
.bz-body .bz-sort { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: inherit; white-space: nowrap; transition: color .15s; }
.bz-sort i { font-size: 12px; color: #a1a1aa; }
.bz-body .bz-sort:hover, .bz-body .bz-sort.is-active, .bz-sort:hover i, .bz-sort.is-active i { color: var(--bz-primary); }
.bz-row { padding: 10px 16px; border-bottom: 1px solid #f1f1f3; transition: background-color .15s; }
.bz-row:last-child { border-bottom: 0; }
.bz-row:hover { background: #f8fbff; }

.bz-row-name[data-ribbon]::before { content: attr(data-ribbon); display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; background: #fff3e0; color: #e65100; font-size: 12px; font-weight: 600; line-height: 18px; vertical-align: 1px; white-space: nowrap; }
.bz-row-thumb { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; padding: 4px; border-radius: 8px; background: var(--bz-muted); overflow: hidden; }
.bz-row-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }

.bz-row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.bz-body .bz-row-act { flex: none; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: var(--bz-muted); color: #52525b; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; opacity: 0; transition: background-color .15s, color .15s, opacity .15s; }
/* 电脑端鼠标移到这一行才显示；已收藏的始终显示，键盘切换到时也要能看见 */
.bz-body .bz-row:hover .bz-row-act, .bz-body .bz-row:focus-within .bz-row-act, .bz-body .bz-row-act.is-active { opacity: 1; }
@media (hover: none) { .bz-body .bz-row-act { opacity: 1; } }
.bz-body .bz-row-act:hover { background: var(--bz-primary-soft); color: var(--bz-primary); }
.bz-body .bz-row-act.bz-fav:hover, .bz-body .bz-row-act.bz-fav.is-active, .bz-body .bz-row-act.is-block:hover { background: #ffe4e6; color: #e11d48; }
.bz-row-act.bz-fav.is-active .bz-ico { fill: currentColor; }
.bz-row-act .bz-ico { width: 15px; height: 15px; }
.bz-row-menu { display: contents; }
.bz-row-act span { display: none; }
.bz-body .bz-row-act.bz-row-more { display: none; }
.bz-row-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bz-body .bz-row-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; margin: 0; font-size: 15px; font-weight: 500; line-height: 1.5; letter-spacing: 0; overflow-wrap: anywhere; }
.bz-body .bz-row-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bz-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--bz-muted); font-size: 12px; font-weight: 600; color: #3f3f46; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bz-chip i { font-size: 12px; color: #71717a; }
.bz-chip.is-rating i { color: #f59e0b; }
.bz-chip.is-reviews i { color: var(--bz-primary); }
.bz-chip.is-stock { background: #dcfce7; color: #15803d; }
.bz-chip.is-out { color: var(--bz-muted-foreground); }
.bz-chip.is-wholesale { background: var(--bz-primary-soft); color: var(--bz-primary); }
.bz-chip-mobile { display: none; }
/* 电脑端库存和已售在表格列里，这一行没内容时不占位，商品名才能垂直居中 */
.bz-chips:not(:has(> :not(.bz-chip-mobile))) { display: none; }

.bz-cell { text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.bz-cell.price b { font-size: 18px; font-weight: 700; color: var(--bz-price); }
.bz-cell.stock b { display: inline-block; min-width: 40px; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #dcfce7; color: #15803d; }
.bz-cell.stock.is-out b { background: var(--bz-muted); color: var(--bz-muted-foreground); }
.bz-cell.sold { color: var(--bz-muted-foreground); }
.bz-buy { width: 100%; }

/* 平板和手机：同一张卡片里用分隔线分行。左边图片，右边名称、库存已售，最下面一行价格、图标、购买 */
@media (max-width: 991px) {
    .bz-cols { display: none; }
    .bz-table-title { padding: 12px; }
    .bz-row { grid-template-columns: 44px minmax(0, 1fr) auto auto; grid-template-areas: "media body body body" "media price actions buy"; column-gap: 10px; row-gap: 8px; align-items: center; padding: 12px; }
    .bz-row:hover { background: transparent; }
    .bz-row-thumb { grid-area: media; align-self: start; width: 44px; height: 44px; padding: 3px; }
    .bz-row-body { grid-area: body; gap: 3px; }
    .bz-body .bz-row-name { font-size: 14px; line-height: 1.4; }
    .bz-row-name[data-ribbon]::before { padding: 0 4px; font-size: 11px; line-height: 16px; }
    .bz-chips, .bz-chips:not(:has(> :not(.bz-chip-mobile))) { display: flex; flex-wrap: wrap; gap: 2px 10px; }
    .bz-chip, .bz-chip.is-stock, .bz-chip.is-out, .bz-chip.is-wholesale { height: auto; padding: 0; border-radius: 0; background: transparent; font-size: 12px; font-weight: 400; line-height: 18px; color: var(--bz-muted-foreground); }
    .bz-chip.is-stock { color: #15803d; }
    .bz-chip.is-wholesale { color: var(--bz-primary); }
    .bz-chip-mobile { display: inline-flex; }
    .bz-cell { text-align: left; }
    .bz-cell.price { grid-area: price; min-width: 0; }
    .bz-cell.price b { font-size: 16px; }
    .bz-cell.stock, .bz-cell.sold { display: none; }
    .bz-row-actions { position: relative; grid-area: actions; gap: 0; margin: 0 -4px; }
    .bz-body .bz-row .bz-row-act { width: 36px; height: 36px; background: transparent; color: #a1a1aa; opacity: 1; }
    .bz-body .bz-row .bz-row-act.bz-row-more { display: flex; }
    .bz-body .bz-row .bz-row-act.bz-fav.is-active { color: #e11d48; }
    .bz-row-menu { position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 5; display: none; min-width: 124px; padding: 4px; border: 1px solid var(--bz-border); border-radius: 10px; background: var(--bz-background); box-shadow: var(--bz-shadow-md); }
    .bz-row-actions.is-open .bz-row-menu { display: block; }
    .bz-body .bz-row .bz-row-menu .bz-row-act { justify-content: flex-start; gap: 8px; width: 100%; height: 40px; padding: 0 10px; color: #3f3f46; font-size: 14px; }
    .bz-row-menu .bz-row-act span { display: inline; }
    .bz-buy { grid-area: buy; width: auto; min-width: 58px; height: 30px; padding: 0 12px; font-size: 13px; }
}
/* 很窄的手机上，“到货通知”和价格都要放得下 */
@media (max-width: 359px) {
    .bz-row { column-gap: 8px; }
    .bz-buy { min-width: 52px; padding: 0 8px; font-size: 12px; }
}
}
.bz-empty { text-align: center; color: var(--bz-muted-foreground); padding: 56px 16px; }

.bz-pager { display: flex; justify-content: center; gap: 4px; padding: 16px 0; flex-wrap: wrap; }
.bz-pager a, .bz-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: calc(var(--bz-radius) - 2px); font-size: 14px; font-weight: 500; color: var(--bz-foreground); border: 1px solid transparent; }
.bz-body .bz-pager a:hover { background: var(--bz-background); border-color: var(--bz-border); }
.bz-body .bz-pager a.active { background: var(--bz-primary); border-color: var(--bz-primary); color: var(--bz-primary-foreground); }
.bz-pager a.disabled { pointer-events: none; opacity: .5; }

.bz-blog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1099px) { .bz-blog { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bz-post { overflow: hidden; display: flex; flex-direction: column; border-radius: 14px; box-shadow: none; transition: box-shadow .15s, border-color .15s; }
.bz-post:hover { box-shadow: var(--bz-shadow-md); border-color: var(--bz-primary-border); }
.bz-post .cover { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; display: block; background: var(--bz-primary-soft); border-bottom: 1px solid var(--bz-border); }
.bz-post .body { padding: 16px; }
.bz-post h3 { font-size: var(--bz-h3); font-weight: 600; margin: 0 0 6px; line-height: 1.4; }
.bz-post:hover h3 { color: var(--bz-primary); }
.bz-post p { font-size: 13px; color: var(--bz-muted-foreground); margin: 0 0 10px; line-height: 1.6; }
.bz-post small { color: var(--bz-muted-foreground); font-size: 12px; }

/* 手机端底部导航 */
.bz-tabbar { display: none; }
@media (max-width: 767px) {
    body.bz-body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
    .bz-actions .bz-btn-icon { display: none; }
    .bz-tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
        height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: var(--bz-background); border-top: 1px solid var(--bz-border);
    }
    .bz-body .bz-tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--bz-muted-foreground); }
    .bz-body .bz-tabbar a:active { color: var(--bz-primary); }
    .bz-tabbar .bz-ico { width: 20px; height: 20px; }
    .bz-tabbar .bz-badge-dot { top: 4px; right: calc(50% - 20px); }
    .bz-main { padding-top: 12px; }
    .bz-blog { grid-template-columns: 1fr; }
}

/* ---------- 页脚 ---------- */
.bz-footer { margin-top: 48px; padding: 48px 0 24px; background: #0f172a; color: #94a3b8; font-size: 14px; }
.bz-footer-main { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 48px; }
.bz-body .bz-footer-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: #fff; }
.bz-footer-logo img { height: 32px; width: auto; border-radius: 8px; }
.bz-footer-brand p { margin: 14px 0 0; font-size: 13px; line-height: 1.75; }
.bz-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 32px; }
.bz-body .bz-footer h2 { font-size: 14px; font-weight: 600; color: #fff; margin: 0 0 14px; }
.bz-body .bz-footer-cols a { display: block; margin-bottom: 10px; font-size: 13px; color: #94a3b8; transition: color .15s; }
.bz-body .bz-footer-cols a:hover { color: #fff; }
.bz-footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgb(148 163 184 / 0.2); font-size: 13px; }
.bz-body .bz-footer-bottom a:hover { color: #fff; }
.bz-body .bz-footer-top { color: #60a5fa; font-weight: 500; }
@media (max-width: 767px) {
    .bz-footer { padding: 32px 0 20px; }
    .bz-footer-main { grid-template-columns: 1fr; gap: 28px; }
    .bz-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
}

/* ---------- 系统模板（OneUI / Bootstrap）统一外观 ---------- */
.bz-body .content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 24px 16px 16px; box-sizing: border-box; }
@media (min-width: 768px) { .bz-body .content { padding: 24px 24px 16px; } }
/* 全站标题层级：字号走变量，手机端在下方媒体查询里缩小。块标题、卡片标题由各自规则覆盖 */
.bz-body h1, .bz-body h2, .bz-body h3, .bz-body h4, .bz-body h5, .bz-body h6, .bz-body .h4 { color: var(--bz-foreground); letter-spacing: -0.01em; }
.bz-body h1 { font-size: var(--bz-h1); font-weight: 700; line-height: 1.3; }
.bz-body h2 { font-size: var(--bz-h2); font-weight: 700; line-height: 1.4; }
.bz-body h3 { font-size: var(--bz-h3); font-weight: 600; line-height: 1.45; }
.bz-body h4 { font-size: var(--bz-h4); font-weight: 600; line-height: 1.5; }
.bz-body h5 { font-size: var(--bz-h5); font-weight: 600; line-height: 1.5; }
.bz-body h6 { font-size: var(--bz-h6); font-weight: 600; line-height: 1.5; }
@media (max-width: 767px) { :root { --bz-h1: 22px; --bz-h2: 18px; --bz-h3: 15px; --bz-h4: 14px; } }
.bz-body h1.bz-page-title { margin: 0 0 16px; }
.bz-body h1.bz-store-name { font-size: var(--bz-h2); }
.bz-body .block, .bz-body .block.block-rounded {
    background: var(--bz-card); border: 1px solid var(--bz-border); border-radius: calc(var(--bz-radius) + 4px);
    box-shadow: var(--bz-shadow-sm); margin-bottom: 24px; overflow: hidden;
}
.bz-body .block.no-bg { border: 0; box-shadow: none; background: transparent; margin-bottom: 0; }
.bz-body .block-header, .bz-body .block-header-default { background: transparent !important; border-bottom: 1px solid var(--bz-border); padding: 16px 20px; }
.bz-body .block-title { font-size: 16px; font-weight: 600; color: var(--bz-foreground) !important; }
.bz-body .bg-gradient-blue { background: var(--bz-card) !important; color: var(--bz-foreground) !important; }
.bz-body .bg-gradient-blue * { color: inherit; }
.bz-body .block-content { padding: 20px; }
.bz-body .btn {
    border-radius: calc(var(--bz-radius) - 2px); font-weight: 500; font-size: 14px; box-shadow: var(--bz-shadow-sm);
    transition: background-color .15s, color .15s, border-color .15s;
}
.bz-body .btn-sm { font-size: 13px; }
.bz-body .btn-primary, .bz-body .btn-dark { background: var(--bz-primary); border-color: var(--bz-primary); color: var(--bz-primary-foreground); }
.bz-body .btn-primary:hover, .bz-body .btn-dark:hover { background: var(--bz-primary-hover); border-color: var(--bz-primary-hover); color: var(--bz-primary-foreground); }
.bz-body .btn-success, .bz-body .btn-info, .bz-body .btn-warning, .bz-body .btn-secondary, .bz-body .btn-alt-secondary, .bz-body .btn-alt-primary, .bz-body .btn-light, .bz-body .btn-outline-primary, .bz-body .btn-outline-secondary {
    background: var(--bz-background); border: 1px solid var(--bz-input); color: var(--bz-foreground);
}
.bz-body .btn-success:hover, .bz-body .btn-info:hover, .bz-body .btn-warning:hover, .bz-body .btn-secondary:hover, .bz-body .btn-alt-secondary:hover, .bz-body .btn-alt-primary:hover, .bz-body .btn-light:hover, .bz-body .btn-outline-primary:hover, .bz-body .btn-outline-secondary:hover {
    background: var(--bz-accent); border-color: var(--bz-input); color: var(--bz-foreground);
}
.bz-body .btn-danger { background: var(--bz-destructive); border-color: var(--bz-destructive); color: #fff; }
.bz-body .form-control, .bz-body .form-select {
    border: 1px solid var(--bz-input); border-radius: calc(var(--bz-radius) - 2px); box-shadow: var(--bz-shadow-sm);
    font-size: 14px; color: var(--bz-foreground); background-color: var(--bz-background); min-height: 36px;
}
.bz-body .form-control:focus, .bz-body .form-select:focus { border-color: var(--bz-ring); box-shadow: 0 0 0 1px var(--bz-ring); }
.bz-body .input-group-text { background: var(--bz-muted); border-color: var(--bz-input); color: var(--bz-muted-foreground); }
.bz-body .table { --bs-table-bg: transparent; --bs-table-striped-bg: #fafafa; --bs-table-hover-bg: #fafafa; --bs-table-active-bg: var(--bz-muted); color: var(--bz-foreground); font-size: 14px; }
.bz-body .table > :not(caption) > * > * { border-bottom-color: var(--bz-border); padding: 10px 12px; }
.bz-body .table thead th { font-size: 12px; font-weight: 500; color: var(--bz-muted-foreground); text-transform: none; letter-spacing: 0; background: #fafafa; }
.bz-body .alert { border-radius: var(--bz-radius); border: 1px solid var(--bz-border); background: var(--bz-background); color: var(--bz-foreground); box-shadow: none; }
.bz-body .alert-danger { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }
.bz-body .alert-warning { border-color: #fde68a; color: #92400e; background: #fffbeb; }
.bz-body .nav-tabs { border-bottom: 1px solid var(--bz-border); gap: 4px; }
.bz-body .nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--bz-muted-foreground); font-weight: 500; font-size: 14px; padding: 10px 12px; background: transparent; }
.bz-body .nav-tabs .nav-link.active, .bz-body .nav-tabs .nav-link:hover { color: var(--bz-foreground); border-bottom-color: var(--bz-foreground); background: transparent; }
.bz-body .badge { border-radius: calc(var(--bz-radius) - 2px); font-weight: 500; }
.bz-body .pagination .page-link { border-radius: calc(var(--bz-radius) - 2px); border-color: var(--bz-border); color: var(--bz-foreground); margin: 0 2px; }
.bz-body .pagination .active .page-link { background: var(--bz-primary); border-color: var(--bz-primary); color: var(--bz-primary-foreground); }
.bz-body .layui-layer { border-radius: var(--bz-radius) !important; }

/* 商品详情页 */
.bz-body .item-title-content h1 { font-size: 22px !important; font-weight: 600 !important; line-height: 1.35; letter-spacing: -0.02em; }
.bz-body .item-amount, .bz-body .item-amount span { color: var(--bz-foreground) !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.bz-body .item-amount { margin-top: 10px; font-size: 14px !important; }
.bz-body .item-amount span { font-size: 30px !important; letter-spacing: -0.02em; }
.bz-body .item-title-content, .bz-body .item-image-main, .bz-body .item-image-list { background: none !important; box-shadow: none !important; padding: 0 !important; }
.bz-body .item-title-content { padding-bottom: 8px !important; }
.bz-body .item-image-list { padding-top: 8px !important; }
.bz-body .item-image-main img { border-radius: var(--bz-radius); border: 1px solid var(--bz-border); background: var(--bz-muted); }
.bz-body .item-image-list .item-image-sku-mini { box-shadow: none; border: 1px solid var(--bz-border); border-radius: calc(var(--bz-radius) - 2px); overflow: hidden; }
.bz-body .item-image-list .item-image-sku-mini.image-active { border-color: var(--bz-foreground); }
.bz-body .item-controls .table > :not(caption) > * > * { border: 0; padding: 12px 0; }
.bz-body .sku-cate-td .cate-name { font-size: 14px; color: var(--bz-muted-foreground); font-weight: 500; }
.bz-body .sku-wrapper { display: flex; flex-wrap: wrap; gap: 8px; }
.bz-body .sku-item {
    margin: 0; padding: 0 12px; min-height: 36px; border-radius: calc(var(--bz-radius) - 2px); animation: none;
    background: var(--bz-background) !important; border: 1px solid var(--bz-input); box-shadow: var(--bz-shadow-sm);
    font-size: 14px; color: var(--bz-foreground); transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.bz-body .sku-item:not(article):hover { transform: none; box-shadow: var(--bz-shadow-sm); background: var(--bz-accent) !important; }
.bz-body .sku-item.sku-current { border-color: var(--bz-foreground); box-shadow: 0 0 0 1px var(--bz-foreground); background: var(--bz-background) !important; }
.bz-body .sku-wrapper .sku-item .sku-icon img { height: 20px; box-shadow: none; }
.bz-body .sku-quantity-wrapper { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.bz-body .sku-quantity-wrapper .quantity-input { width: 96px; height: 36px; border: 1px solid var(--bz-input); border-radius: calc(var(--bz-radius) - 2px); box-shadow: var(--bz-shadow-sm); font-size: 14px; }
.bz-body .sku-quantity-wrapper .quantity-input:focus { outline: none; border-color: var(--bz-ring); box-shadow: 0 0 0 1px var(--bz-ring); }
.bz-body .sku-stock, .bz-body .sku-wholesale { border: 1px solid var(--bz-border) !important; border-radius: calc(var(--bz-radius) - 2px); padding: 2px 10px; font-size: 12px; font-weight: 500; line-height: 20px; color: var(--bz-foreground) !important; background: var(--bz-muted) !important; }
.bz-body .sku-stock.bg-lime-green { background: #f0fdf4 !important; border-color: #bbf7d0 !important; color: #15803d !important; }
.bz-body .shop-checkout-btn { gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.bz-body .shop-checkout-btn .checkout-btn {
    width: auto; min-width: 140px; height: 40px; padding: 0 20px; border-radius: calc(var(--bz-radius) - 2px) !important;
    font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--bz-shadow-sm);
}
.bz-body .shop-checkout-btn .btn-buy-now { background: var(--bz-primary); color: var(--bz-primary-foreground); border: 1px solid var(--bz-primary); }
.bz-body .shop-checkout-btn .btn-buy-now:hover { background: var(--bz-primary-hover); }
.bz-body .shop-checkout-btn .btn-add-cart, .bz-body .shop-checkout-btn .btn-add-stock { background: var(--bz-background); color: var(--bz-foreground); border: 1px solid var(--bz-input); }
.bz-body .shop-checkout-btn .btn-add-cart:hover { background: var(--bz-accent); }
.bz-body .shop-checkout-btn .btn-no-stock { background: var(--bz-muted); color: var(--bz-muted-foreground); border: 1px solid var(--bz-border); cursor: not-allowed; }
.bz-body .shop-checkout-btn svg, .bz-body .shop-checkout-btn .icon { fill: currentColor; }
.bz-body .introduce-content { font-size: 15px; line-height: 1.75; color: var(--bz-foreground); overflow-wrap: anywhere; }

/* 结算 / 购物车 / 订单查询 */
.bz-body .pay-item { border: 1px solid var(--bz-input) !important; border-radius: var(--bz-radius) !important; box-shadow: var(--bz-shadow-sm) !important; background: var(--bz-background) !important; color: var(--bz-foreground) !important; transition: border-color .15s, box-shadow .15s; }
.bz-body .pay-item:hover { background: var(--bz-accent) !important; }
.bz-body .pay-item.active, .bz-body .pay-item.pay-current, .bz-body .pay-item.checked { border-color: var(--bz-foreground) !important; box-shadow: 0 0 0 1px var(--bz-foreground) !important; }
.bz-body .btn-pay-now, .bz-body .btn-cart-bill { background: var(--bz-primary) !important; color: var(--bz-primary-foreground) !important; border: 0 !important; border-radius: calc(var(--bz-radius) - 2px) !important; box-shadow: var(--bz-shadow-sm) !important; font-weight: 500; }
.bz-body .btn-cancel-order, .bz-body .btn-cart-clear { background: var(--bz-background) !important; color: var(--bz-foreground) !important; border: 1px solid var(--bz-input) !important; border-radius: calc(var(--bz-radius) - 2px) !important; box-shadow: var(--bz-shadow-sm) !important; font-weight: 500; }
.bz-body .order-card { border: 1px solid var(--bz-border) !important; border-radius: calc(var(--bz-radius) + 4px) !important; box-shadow: var(--bz-shadow-sm) !important; background: var(--bz-card) !important; }
.bz-body .order-header { border-bottom: 1px solid var(--bz-border) !important; background: #fafafa !important; color: var(--bz-foreground) !important; }
/* 订单号 38 位没有空格，卡片又是 overflow: hidden，不换行后面几位就看不到了 */
.bz-body .order-header h2 { margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.bz-order-items .item-logo { flex-shrink: 0; }
.bz-order-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 13px; }
.bz-order-meta b { color: var(--bz-price); font-size: 15px; font-weight: 700; }
.bz-order-meta .paid { color: var(--bz-primary); font-weight: 600; }
/* 状态、数量、金额列在这个宽度已经隐藏，剩下两列改成上下排，按钮才放得下 */
@media (max-width: 991px) {
    .bz-order-items, .bz-order-items tbody, .bz-order-items tr { display: block; width: 100%; }
    .bz-order-items thead { display: none; }
    .bz-order-items tbody tr { padding: 12px 0; border-bottom: 1px solid var(--bz-border); }
    .bz-order-items tbody tr:last-child { border-bottom: 0; }
    .bz-body .bz-order-items.table > tbody > tr > td { border: 0; padding: 0 !important; background: transparent; box-shadow: none; }
    .bz-order-items td.item-info { display: flex; align-items: flex-start; gap: 10px; }
    .bz-order-items .item-info .item-logo { width: 48px; height: 48px; margin: 0; }
    .bz-order-items .item-info .item-content { flex: 1; min-width: 0; height: auto; }
    .bz-order-items .item-info .item-content .item-name { font-size: 15px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
    .bz-order-items td[data-tradeNo] { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; text-align: left !important; }
    .bz-order-items td[data-tradeNo] .btn { flex: 1 1 auto; margin: 0 !important; white-space: nowrap; }
}

/* 店铺生态插件区块 */
.bz-body .mkt-block { border-color: var(--bz-border); border-radius: calc(var(--bz-radius) + 4px); box-shadow: var(--bz-shadow-sm); }
.bz-body .mkt-score { color: var(--bz-foreground); font-weight: 700; letter-spacing: -0.02em; }
.bz-body .mkt-fav-btn { border-radius: calc(var(--bz-radius) - 2px); border-color: var(--bz-input); box-shadow: var(--bz-shadow-sm); color: var(--bz-foreground); height: 32px; }
.bz-body .mkt-fav-btn:hover { background: var(--bz-accent); }
.bz-body .mkt-grid { gap: 16px; }
.bz-body .mkt-goods { border-color: var(--bz-border); border-radius: calc(var(--bz-radius) + 4px); box-shadow: var(--bz-shadow-sm); transition: box-shadow .15s; }
.bz-body .mkt-goods:hover { box-shadow: var(--bz-shadow-md); }
.bz-body .mkt-goods > a img { background: var(--bz-muted); border-bottom: 1px solid var(--bz-border); }
.bz-body .mkt-goods .body { padding: 12px; }
.bz-body .mkt-goods .name { font-weight: 500; font-size: 14px; line-height: 20px; }
.bz-body .mkt-goods .name:hover { text-decoration: underline; text-underline-offset: 3px; }
.bz-body .mkt-goods .price { color: var(--bz-foreground); font-weight: 600; font-variant-numeric: tabular-nums; }
.bz-body .mkt-goods .meta, .bz-body .mkt-goods .store { color: var(--bz-muted-foreground); }
.bz-body .mkt-tier { border-radius: calc(var(--bz-radius) - 2px); font-weight: 500; color: var(--bz-foreground); background: var(--bz-muted); border: 1px solid var(--bz-border); }
.bz-body .mkt-tier-3 { color: var(--bz-primary-foreground); background: var(--bz-primary); border-color: var(--bz-primary); }
.bz-body .mkt-review { border-top-color: var(--bz-border); }
.bz-body .mkt-reply { background: var(--bz-muted); color: var(--bz-foreground); }
.bz-body .text-primary, .bz-body a.link-primary { color: var(--bz-foreground) !important; }
.bz-body .btn-primary, .bz-body .btn-primary:focus { --bs-btn-bg: var(--bz-primary); --bs-btn-border-color: var(--bz-primary); }

/* ---------- 重点色 ---------- */
.bz-body .bz-logo { color: var(--bz-primary) !important; }
.bz-body .bz-nav a:hover { color: var(--bz-primary); }
.bz-body .text-primary, .bz-body a.link-primary { color: var(--bz-primary) !important; }
.bz-body .nav-tabs .nav-link.active, .bz-body .nav-tabs .nav-link:hover { color: var(--bz-primary); border-bottom-color: var(--bz-primary); }
.bz-body .item-amount, .bz-body .item-amount span { color: var(--bz-price) !important; font-weight: 700; }
.bz-body .item-image-list .item-image-sku-mini.image-active { border-color: var(--bz-primary); }
.bz-body .sku-item.sku-current { border-color: var(--bz-primary); box-shadow: 0 0 0 1px var(--bz-primary); background: var(--bz-primary-soft) !important; color: var(--bz-primary); }
.bz-body .pay-item.active, .bz-body .pay-item.pay-current, .bz-body .pay-item.checked { border-color: var(--bz-primary) !important; box-shadow: 0 0 0 1px var(--bz-primary) !important; background: var(--bz-primary-soft) !important; }
.bz-body .mkt-score { color: var(--bz-warning); }
.bz-body .mkt-goods:hover { border-color: var(--bz-primary-border); }
.bz-body .mkt-goods .name:hover { color: var(--bz-primary); }
.bz-body .mkt-goods .price { color: var(--bz-price); font-weight: 700; }

/* ---------- 语言选择 ---------- */
.bz-lang-btn { padding: 0 8px; gap: 6px; height: 32px; font-size: 13px; }
.bz-lang-btn img, .bz-lang-item img { width: 20px; height: 15px; flex-shrink: 0; border-radius: 2px; object-fit: cover; }
.bz-lang-menu { min-width: 170px; max-height: min(70vh, 460px); overflow-y: auto; }
.bz-lang-item { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.bz-body .bz-lang-menu .dropdown-item.active { background: var(--bz-primary-soft); color: var(--bz-primary); }

/* ---------- 面包屑 ---------- */
.bz-crumbs { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; padding-top: 16px; font-size: 13px; line-height: 1.5; color: var(--bz-muted-foreground); }
.bz-body .bz-crumbs a { overflow-wrap: anywhere; color: var(--bz-muted-foreground); }
.bz-body .bz-crumbs a:hover { color: var(--bz-primary); }
.bz-crumbs .sep { flex-shrink: 0; color: #d4d4d8; }
.bz-crumbs .current { min-width: 0; overflow-wrap: anywhere; color: var(--bz-foreground); font-weight: 500; }
.bz-crumbs + .bz-main, .bz-crumbs + .content { padding-top: 12px; }

/* ---------- 商品筛选 ---------- */
.bz-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; scroll-margin-top: 76px; }
.bz-crumbs + .bz-main > .bz-toolbar:first-child { margin-top: 0; }
.bz-toolbar h1, .bz-toolbar h2 { min-width: 0; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.bz-toolbar h1 { font-size: var(--bz-h1); }
.bz-toolbar h2 { font-size: var(--bz-h2); }
.bz-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.bz-segment { display: inline-flex; padding: 3px; border-radius: 10px; background: #e9ebef; }
.bz-body .bz-segment a { height: 32px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 13px; font-weight: 500; color: #52525b; white-space: nowrap; transition: color .15s; }
.bz-body .bz-segment a:hover { color: var(--bz-primary); }
.bz-body .bz-segment a.active { background: var(--bz-background); color: var(--bz-primary); box-shadow: var(--bz-shadow-sm); }
.bz-select { display: block; margin: 0; }
.bz-select select {
    width: 190px; height: 38px; padding: 0 34px 0 12px; border: 1px solid var(--bz-border); border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--bz-foreground); cursor: pointer;
    -webkit-appearance: none; appearance: none; text-overflow: ellipsis; outline: none; transition: border-color .15s;
    background: var(--bz-background) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 10px center / 14px 14px;
}
.bz-select select:hover, .bz-select select:focus { border-color: var(--bz-ring); }
.bz-toolbar + .bz-tags { margin-top: 14px; margin-bottom: 0; }
@media (max-width: 767px) {
    .bz-toolbar { margin-top: 12px; gap: 8px; }
    .bz-toolbar h1 { width: 100%; }
    /* 首页下面紧跟分类标题，这一行只留给读屏软件 */
    .bz-toolbar h2 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
    .bz-table { margin-top: 12px; }
    .bz-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
    .bz-segment { grid-column: 1 / -1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
    .bz-body .bz-segment a { padding: 0 6px; }
    .bz-select select { width: 100%; }
    .bz-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .bz-tool { flex-direction: row; align-items: center; gap: 10px; padding: 10px; text-align: left; font-size: 12px; }
    .bz-tool .ico { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
}

/* ---------- 商品页：评价与收藏 ---------- */
.bz-body .mkt-block { box-sizing: border-box; width: 100%; max-width: none; margin: 0 0 24px; padding: 20px; border-radius: calc(var(--bz-radius) + 4px); }
.bz-body .mkt-fav-btn { display: none; }
.bz-body .shop-checkout-btn .bz-item-fav { min-width: 0; background: var(--bz-background); color: var(--bz-foreground); border: 1px solid var(--bz-input); }
.bz-body .shop-checkout-btn .bz-item-fav:hover { background: #fff1f2; border-color: #fecdd3; color: #e11d48; }
.bz-body .shop-checkout-btn .bz-item-fav.is-active { background: #fff1f2; border-color: #fecdd3; color: #e11d48; }
.bz-body .shop-checkout-btn .bz-item-fav.is-active .bz-ico { fill: currentColor; }
.bz-body .shop-checkout-btn .bz-item-fav .bz-ico { fill: none; }
.bz-body .shop-checkout-btn .bz-item-fav.is-active .bz-ico { fill: currentColor; }
@media (max-width: 767px) {
    .bz-tool:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- 商品页：两栏布局、商品信息、相关推荐 ---------- */
.bz-item-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto auto auto 1fr; grid-template-areas: "head side" "detail side" "related side" "reviews side"; column-gap: 24px; align-items: start; }
.bz-item-head { grid-area: head; display: flex; align-items: center; gap: 18px; min-width: 0; padding: 20px; margin-bottom: 16px; border-radius: 14px; }
.bz-item-thumb { flex-shrink: 0; width: 96px; }
.bz-body .item-image-main { width: 96px; height: 96px !important; overflow: hidden; border-radius: 12px; }
.bz-body .item-image-main img.item-image-show { display: block; width: 100%; height: 100%; object-fit: contain; }
.bz-body .item-image-list { display: none; }
.bz-item-title { flex: 1; min-width: 0; }
.bz-item-title h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.bz-item-title-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 13px; color: #52525b; }
.bz-item-title-rating .stars { color: #f59e0b; font-size: 15px; letter-spacing: 1px; }
.bz-item-detail { grid-area: detail; min-width: 0; margin-bottom: 24px; }
.bz-item-side { grid-area: side; position: sticky; top: 84px; min-width: 0; }
.bz-item-buy { padding: 20px; margin-bottom: 16px; border-radius: 14px; }
.bz-body .bz-item-buy .item-amount { margin-top: 0; }
.bz-body .bz-item-buy .item-controls { width: 100%; margin: 0; padding: 0; }
.bz-body .bz-item-buy .sku-cate-td { text-align: left; }
.bz-body .bz-item-buy .item-controls .table { margin-bottom: 8px; }
.bz-body .bz-item-buy .item-controls .table, .bz-body .bz-item-buy .item-controls .table > tbody, .bz-body .bz-item-buy .item-controls .table > tbody > tr, .bz-body .bz-item-buy .item-controls .table > tbody > tr > td { display: block; width: 100%; }
.bz-body .bz-item-buy .item-controls .table > tbody > tr { padding: 8px 0; }
.bz-body .bz-item-buy .item-controls .table > tbody > tr > td { padding: 0; }
.bz-body .bz-item-buy .item-controls .table > tbody > tr > td.sku-quantity-wrapper { display: flex; }
.bz-body .bz-item-buy .sku-cate-td { padding-left: 0 !important; padding-bottom: 6px !important; }
.bz-body .bz-item-buy .sku-wrapper { max-height: 228px; overflow-y: auto; padding: 2px; }
.bz-body .bz-item-buy .shop-checkout-btn .checkout-btn { flex: 1 1 calc(50% - 4px); min-width: 0; padding: 0 12px; margin: 0; white-space: nowrap; }
.bz-body .bz-item-buy .shop-checkout-btn .btn-buy-now, .bz-body .bz-item-buy .shop-checkout-btn .btn-no-stock { flex-basis: 100%; height: 44px; font-size: 15px; font-weight: 600; }
.bz-item-info { padding: 20px; margin-bottom: 24px; border-radius: 14px; }
.bz-item-info h2, .bz-related h2 { margin: 0 0 12px; font-weight: 700; }
.bz-item-info h2 { font-size: var(--bz-h3); }
.bz-related h2 { font-size: var(--bz-h2); }
.bz-item-detail-title { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--bz-border); }
.bz-item-detail-body { padding-bottom: 20px; }
.bz-info-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 13px; }
.bz-info-row + .bz-info-row { border-top: 1px dashed #f1f1f3; }
.bz-info-row span { flex-shrink: 0; color: #71717a; }
.bz-info-row b { min-width: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.bz-body .bz-info-row a { color: var(--bz-primary); }
.bz-related { grid-area: related; min-width: 0; padding: 20px 20px 8px; margin-bottom: 24px; border-radius: 14px; }
.bz-body .bz-related-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-radius: 8px; transition: background-color .15s; }
.bz-body .bz-related-row + .bz-related-row { border-top: 1px solid #f1f1f3; }
.bz-body .bz-related-row:hover { background: #f8fbff; }
.bz-related-row img { width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: var(--bz-muted); border: 1px solid var(--bz-border); }
.bz-related-row .name { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.4; }
.bz-related-row .stock { flex-shrink: 0; min-width: 40px; padding: 2px 8px; border-radius: 999px; text-align: center; font-size: 12px; font-weight: 600; background: #dcfce7; color: #15803d; }
.bz-related-row .stock.is-out { background: var(--bz-muted); color: var(--bz-muted-foreground); }
.bz-related-row .price { flex-shrink: 0; min-width: 72px; text-align: right; font-size: 15px; font-weight: 700; color: var(--bz-price); }
.bz-item-reviews { grid-area: reviews; min-width: 0; }
@media (max-width: 1099px) {
    .bz-item-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "buy" "detail" "info" "related" "reviews"; }
    .bz-item-side { display: contents; }
    .bz-item-buy { grid-area: buy; }
    .bz-item-info { grid-area: info; }
    .bz-item-detail { margin-bottom: 16px; }
    .bz-item-info, .bz-related { margin-bottom: 16px; }
    .bz-body .bz-item-buy .sku-wrapper { max-height: none; overflow: visible; }
}
@media (max-width: 767px) {
    .bz-item-head { gap: 12px; padding: 14px; margin-bottom: 12px; }
    .bz-item-thumb { width: 64px; }
    .bz-body .item-image-main { width: 64px; height: 64px !important; border-radius: 10px; }
    .bz-item-title h1 { font-size: 18px; line-height: 1.45; }
    .bz-item-buy { padding: 16px; margin-bottom: 12px; }
    .bz-item-info { padding: 16px; }
    .bz-related { padding: 16px 16px 6px; }
    .bz-related-row .stock { display: none; }
}

/* iPhone 上输入框字号小于 16px 时，一点就会放大页面 */
@media (max-width: 767px) {
    .bz-body input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .bz-body select, .bz-body textarea { font-size: 16px; }
    /* 商品名就在下面，面包屑不重复，也不占两行 */
    .bz-crumbs.is-item .current, .bz-crumbs.is-item .sep:nth-last-child(2) { display: none; }
}
.bz-buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--bz-border); background: var(--bz-background); box-shadow: 0 -4px 12px rgba(0, 0, 0, .06); }
.bz-buybar[hidden] { display: none; }
.bz-buybar-price { min-width: 0; color: var(--bz-price); font-size: 14px; font-weight: 600; white-space: nowrap; }
.bz-buybar-price b { font-size: 20px; font-weight: 700; }
.bz-buybar .bz-btn { flex: none; min-width: 120px; height: 40px; }
@media (max-width: 767px) { .bz-buybar { bottom: calc(56px + env(safe-area-inset-bottom)); padding-bottom: 8px; } }
/* 后台页脚引入的客服挂件默认离底 20px，避开底部导航和购买栏。手机上挂件的聊天面板是全屏的，不用动 */
.bz-body:has(.bz-buybar:not([hidden])) .sg-launcher { bottom: calc(68px + env(safe-area-inset-bottom)); }
.bz-body:has(.bz-buybar:not([hidden])) .sg-teaser { bottom: calc(136px + env(safe-area-inset-bottom)); }
@media (max-width: 767px) {
    .bz-body .sg-launcher { right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
    .bz-body .sg-teaser { right: 12px; bottom: calc(124px + env(safe-area-inset-bottom)); }
    .bz-body:has(.bz-buybar:not([hidden])) .sg-launcher { bottom: calc(124px + env(safe-area-inset-bottom)); }
    .bz-body:has(.bz-buybar:not([hidden])) .sg-teaser { bottom: calc(180px + env(safe-area-inset-bottom)); }
}

/* X（原 Twitter）标志：图标库版本较旧没有这个图标，用内联 SVG 蒙版，颜色取 currentColor */
.bz-brand-x { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") center / contain no-repeat; }
