/* ==========================================================================
   淘京拼 精选导购 — 样式
   ========================================================================== */
:root {
    --c-bg: #f5f6f8;
    --c-card: #ffffff;
    --c-text: #1a1d24;
    --c-text-sub: #8a909c;
    --c-line: #ebedf0;
    --c-primary: #ff4d4f;
    --c-primary-dark: #d9363e;
    --c-tb: #ff5000;
    --c-jd: #e1251b;
    --c-pdd: #e02e24;
    --c-success: #07c160;
    --c-warn: #ff8f1f;
    --radius: 14px;
    --shadow: 0 2px 12px rgba(20, 24, 40, .06);
    --shadow-hover: 0 8px 28px rgba(20, 24, 40, .13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 14px; }

/* ---------------------------------------------------------------- 顶部 */
.topbar {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7a45 55%, #ffa940 100%);
    color: #fff;
    /* 默认收紧：无搜索框的页面（个人中心/订单/团队等）不该有大块空白渐变 */
    padding: 22px 0 20px;
    position: relative;
    overflow: hidden;
}
/* 仅当页面含上浮搜索框时才留出叠层空间 */
.topbar.has-hero { padding-bottom: 46px; }
.topbar::after {
    content: "";
    position: absolute; inset: auto -20% -60% -20%; height: 140px;
    background: rgba(255, 255, 255, .10);
    border-radius: 50%;
}
.brand { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.brand-logo {
    width: 34px; height: 34px; border-radius: 10px;
    background: rgba(255, 255, 255, .22);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; backdrop-filter: blur(4px);
}
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.brand-slogan { font-size: 12px; opacity: .88; margin-top: 1px; }

.topbar-right { margin-left: auto; display: flex; gap: 8px; position: relative; z-index: 1; }
.topbar-right a {
    font-size: 12px; padding: 5px 12px; border-radius: 20px;
    background: rgba(255, 255, 255, .18); transition: background .2s;
}
.topbar-right a:hover { background: rgba(255, 255, 255, .32); }

/* ---------------------------------------------------------------- 搜索 */
.searchbar {
    position: relative; z-index: 2;
    margin: -32px auto 0;
    background: var(--c-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    display: flex; gap: 10px;
}
.searchbar input {
    flex: 1; border: none; outline: none; font-size: 15px;
    padding: 10px 12px; background: #f7f8fa; border-radius: 10px; color: var(--c-text);
}
.searchbar input::placeholder { color: #b0b5bf; }
.btn {
    /* ★ 必须显式 inline-block：<a> 默认是 inline，inline 元素的 width 不生效，
       且垂直 padding 不会撑开高度。缺这一行时 .btn-block 的 width:100% 会失效，
       按钮缩成文字宽度挤在角落。此坑曾真实出现，勿删。 */
    display: inline-block;
    border: none; cursor: pointer; font-size: 15px; font-weight: 600;
    padding: 10px 22px; border-radius: 10px;
    background: linear-gradient(135deg, var(--c-primary), #ff7a45);
    color: #fff; transition: transform .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255, 77, 79, .32); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
    background: #fff; color: var(--c-text);
    border: 1px solid var(--c-line);
}
.btn-ghost:hover { box-shadow: var(--shadow); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }

/* ------------------------------------------------------------ 平台筛选 */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
.chip {
    padding: 6px 15px; border-radius: 20px; font-size: 13px; cursor: pointer;
    background: var(--c-card); border: 1px solid var(--c-line);
    color: var(--c-text-sub); transition: all .18s; user-select: none;
}
.chip:hover { border-color: #ffb3b5; color: var(--c-primary); }
.chip.active {
    background: linear-gradient(135deg, var(--c-primary), #ff7a45);
    color: #fff; border-color: transparent; font-weight: 600;
}
.chip .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.chip .dot.tb { background: var(--c-tb); }
.chip .dot.jd { background: var(--c-jd); }
.chip .dot.pdd { background: var(--c-pdd); }
.chip.active .dot { background: rgba(255, 255, 255, .9); }

/* ---------------------------------------------------------------- 卡片 */
.grid {
    display: grid; gap: 12px; margin-top: 14px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.gcard {
    background: var(--c-card); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    display: flex; flex-direction: column; position: relative;
}
.gcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.gcard-img { position: relative; padding-top: 100%; background: #f4f5f7; }
.gcard-img img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform .35s;
}
.gcard:hover .gcard-img img { transform: scale(1.06); }
.gcard-tag {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    font-size: 11px; padding: 3px 9px; border-radius: 6px;
    color: #fff; font-weight: 600; letter-spacing: .3px;
}
.gcard-tag.tb { background: var(--c-tb); }
.gcard-tag.jd { background: var(--c-jd); }
.gcard-tag.pdd { background: var(--c-pdd); }
.gcard-coupon {
    position: absolute; bottom: 8px; right: 8px; z-index: 2;
    background: linear-gradient(135deg, #ff4d4f, #ff7a45);
    color: #fff; font-size: 12px; font-weight: 700;
    padding: 3px 9px; border-radius: 8px;
    box-shadow: 0 3px 10px rgba(255, 77, 79, .35);
}
.gcard-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.gcard-title {
    font-size: 13.5px; line-height: 1.45; height: 39px; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    color: var(--c-text);
}
.gcard-shop { font-size: 11.5px; color: var(--c-text-sub); margin-top: 5px; }
.gcard-price { display: flex; align-items: baseline; gap: 6px; margin-top: auto; padding-top: 8px; }
.price-now { color: var(--c-primary); font-weight: 700; font-size: 19px; }
.price-now small { font-size: 12px; font-weight: 600; }
.price-old { font-size: 12px; color: var(--c-text-sub); text-decoration: line-through; }
.gcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.commission {
    font-size: 11.5px; color: var(--c-warn); font-weight: 600;
    background: #fff7e6; padding: 3px 8px; border-radius: 6px;
}
.gcard-actions { display: flex; gap: 6px; margin-top: 9px; }
.gcard-actions .btn { flex: 1; padding: 7px 0; font-size: 13px; }

/* ------------------------------------------------------------ 骨架/空态 */
.skeleton {
    background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 37%, #eef0f3 63%);
    background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 6px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-card { background: var(--c-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.sk-img { padding-top: 100%; }
.sk-line { height: 12px; margin: 10px 12px; }
.sk-line.w60 { width: 60%; }

.empty {
    text-align: center; padding: 60px 20px; color: var(--c-text-sub);
    background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.empty-icon { font-size: 46px; margin-bottom: 12px; opacity: .55; }
.empty h3 { font-size: 16px; color: var(--c-text); margin-bottom: 6px; font-weight: 600; }

.alert {
    padding: 12px 16px; border-radius: 10px; margin: 14px 0; font-size: 13.5px;
    border: 1px solid transparent; line-height: 1.65;
}
.alert-warn { background: #fffbe6; border-color: #ffe58f; color: #ad6800; }
.alert-error { background: #fff2f0; border-color: #ffccc7; color: #cf1322; }
.alert-info { background: #e6f7ff; border-color: #91d5ff; color: #0050b3; }
.alert-success { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }
.alert code {
    background: rgba(0, 0, 0, .06); padding: 1px 6px; border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, monospace; font-size: 12.5px;
}

/* ---------------------------------------------------------------- 区块 */
.section { margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
.section h2 { font-size: 17px; font-weight: 700; }
.section .more { margin-left: auto; font-size: 12.5px; color: var(--c-text-sub); }
.section-bar { width: 4px; height: 17px; border-radius: 3px; background: linear-gradient(var(--c-primary), #ff7a45); }

/* ---------------------------------------------------------------- 详情 */
.detail { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.detail-top { display: grid; grid-template-columns: 320px 1fr; gap: 20px; padding: 18px; }
.detail-img { border-radius: 12px; overflow: hidden; background: #f4f5f7; }
.detail-img img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.detail-info h1 { font-size: 18px; line-height: 1.5; font-weight: 700; margin-bottom: 10px; }
.detail-meta { font-size: 12.5px; color: var(--c-text-sub); margin-bottom: 14px; }
.detail-meta span { margin-right: 14px; }
.price-box {
    background: linear-gradient(135deg, #fff1f0, #fff7e6);
    border-radius: 12px; padding: 14px 16px; margin-bottom: 14px;
}
.price-box .inner { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-box .now { color: var(--c-primary); font-size: 30px; font-weight: 800; }
.price-box .now small { font-size: 15px; }
.price-box .old { color: var(--c-text-sub); text-decoration: line-through; font-size: 13px; }
.price-box .quan {
    background: linear-gradient(135deg, #ff4d4f, #ff7a45); color: #fff;
    font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px;
}
.rate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.rate-item { background: #fafbfc; border-radius: 10px; padding: 10px; text-align: center; }
.rate-item .v { font-size: 17px; font-weight: 700; color: var(--c-primary); }
.rate-item .l { font-size: 11.5px; color: var(--c-text-sub); margin-top: 2px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tkl-box {
    margin-top: 14px; padding: 12px 14px; background: #fafbfc;
    border: 1px dashed #d9dce2; border-radius: 10px; font-size: 13.5px;
    word-break: break-all; display: none;
}
.tkl-box.show { display: block; }
.tkl-box .t { font-size: 12px; color: var(--c-text-sub); margin-bottom: 5px; }
.tkl-box .c { font-weight: 700; color: var(--c-primary); letter-spacing: .5px; }

/* ---------------------------------------------------------------- 表格 */
.table-box { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
th { background: #fafbfc; font-weight: 600; color: var(--c-text-sub); font-size: 12.5px; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }

/* ---------------------------------------------------------------- 设置 */
.setup-row {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border-bottom: 1px solid var(--c-line);
}
.setup-row:last-child { border-bottom: none; }
.setup-row .name { font-weight: 600; min-width: 88px; }
.setup-row .val { flex: 1; font-size: 13px; color: var(--c-text-sub); word-break: break-all; }
.badge {
    font-size: 11.5px; padding: 3px 10px; border-radius: 20px; font-weight: 600; white-space: nowrap;
}
.badge-ok { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.badge-no { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }
.badge-warn { background: #fffbe6; color: #ad6800; border: 1px solid #ffe58f; }

/* ---------------------------------------------------------------- 底部 */
.footer {
    text-align: center; padding: 30px 14px 36px; color: var(--c-text-sub); font-size: 12px; line-height: 1.9;
}
.footer a { color: var(--c-text-sub); text-decoration: underline; }

/* ---------------------------------------------------------------- 提示 */
.toast {
    position: fixed; left: 50%; top: 24px; transform: translate(-50%, -20px);
    background: rgba(0, 0, 0, .82); color: #fff; padding: 10px 20px;
    border-radius: 10px; font-size: 13.5px; z-index: 999; opacity: 0;
    transition: opacity .25s, transform .25s; pointer-events: none; max-width: 86%;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.pager { display: flex; justify-content: center; gap: 8px; margin: 22px 0 8px; flex-wrap: wrap; }
.pager a, .pager span {
    padding: 7px 14px; border-radius: 8px; background: var(--c-card);
    border: 1px solid var(--c-line); font-size: 13px; color: var(--c-text-sub);
}
.pager a:hover { border-color: #ffb3b5; color: var(--c-primary); }
.pager .cur { background: var(--c-primary); color: #fff; border-color: var(--c-primary); font-weight: 600; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 720px) {
    /* 注意：不可无条件设 padding-bottom，否则个人中心/订单等无搜索框的页面
       在手机上又出现一大块空白渐变。只有含上浮搜索框的页面才需要留白。 */
    .topbar { padding: 18px 0 18px; }
    .topbar.has-hero { padding-bottom: 40px; }
    .brand-name { font-size: 17px; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .detail-top { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
    .price-box .now { font-size: 26px; }
    .rate-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
    .searchbar { flex-direction: column; }
    .searchbar .btn { width: 100%; }
    .gcard-title { font-size: 12.5px; height: 35px; }
    .price-now { font-size: 16px; }
    .setup-row { flex-wrap: wrap; }
}

/* ============================================================
   会员体系（注册/登录/个人中心）
   ============================================================ */

.nav-logout {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
}
.nav-logout:hover { text-decoration: underline; }

/* --- 注册/登录 --- */
.auth-box {
    max-width: 420px;
    margin: 32px auto;
    background: #fff;
    border-radius: 14px;
    padding: 28px 26px 22px;
    box-shadow: 0 4px 20px rgba(15,23,42,.08);
}
.auth-box h2 { margin: 0 0 18px; font-size: 20px; text-align: center; }
.auth-form label {
    display: block;
    font-size: 13px;
    color: #475569;
    margin-bottom: 14px;
}
.auth-form input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid #d8dee9;
    border-radius: 9px;
    font-size: 14px;
}
.auth-form input:focus { outline: none; border-color: #ff5000; box-shadow: 0 0 0 3px rgba(255,80,0,.1); }
.btn-block { display: block; width: 100%; padding: 12px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.auth-foot { text-align: center; font-size: 13px; color: #64748b; margin: 16px 0 6px; }
.auth-foot a { color: #ff5000; text-decoration: none; }
.auth-tip { text-align: center; font-size: 12px; color: #94a3b8; margin: 0; }

.alert {
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.6;
}
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-ok    { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert a { color: inherit; font-weight: 600; }

/* --- 个人中心 --- */
.profile { padding: 16px 0 40px; }
/* ★ 必须写成 .card.profile-hero（两类选择器，特异性 0,2,0）
   否则会被后面的 .card { background:#fff }（0,1,0 但源码更靠后）覆盖，
   导致 hero 变白底、白字看不见。此坑曾真实出现，勿改回单类写法。 */
.card.profile-hero {
    background: linear-gradient(135deg, #ff5000, #ff8a3d);
    color: #fff;
    border: none;
}
.card.profile-hero h3 { color: #fff; }
.profile-user { display: flex; align-items: center; gap: 14px; }
.avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,.28);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700;
}
.profile-name { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.profile-mobile { font-size: 13px; opacity: .85; margin-top: 3px; }

.level-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,.25);
    font-weight: 500;
}
.level-badge.level-1 { background: #fbbf24; color: #7c2d12; }
.level-badge.level-2 { background: #fde68a; color: #7c2d12; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.25);
}
.stat { text-align: center; }
.stat-num { font-size: 18px; font-weight: 700; }
.stat-lbl { font-size: 12px; opacity: .85; margin-top: 2px; }

/* ★ grid-template-columns 不可写 1fr 或 minmax(340px,1fr)：
   1fr 等价于 minmax(auto,1fr)，auto 下限 = 子项 min-content 宽度。
   同网格里只要有一个含表格的卡片（min-content 可达 600+px），
   整条轨道就会被撑到那么宽，导致无辜的兄弟卡片一起溢出屏幕。
   必须显式写 minmax(0,1fr) 把下限压到 0；340px 也要用 min() 包住，
   否则窄于 340px 的手机同样会溢出。此坑曾真实出现，勿改回。 */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 14px;
    margin-top: 14px;
}
.profile-grid > * { min-width: 0; }
.card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(15,23,42,.06);
}
.card h3 { margin: 0 0 4px; font-size: 16px; }
.muted { color: #64748b; font-size: 13px; margin: 0 0 12px; }
.muted.small, .small { font-size: 12px; }

.invite-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.invite-label { font-size: 13px; color: #475569; white-space: nowrap; }
.invite-code {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ff5000;
    background: #fff7ed;
    padding: 6px 12px;
    border-radius: 8px;
    flex: 1;
    text-align: center;
}
.invite-link {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
}
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }

.chain-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    font-size: 13px;
    color: #475569;
    line-height: 1.9;
}

/* 表格可能因列数多而 min-content 很宽，用滚动容器兜底，
   避免把外层卡片和网格一起顶宽。 */
.tbl-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
    text-align: left;
    padding: 8px 6px;
    color: #64748b;
    font-weight: 500;
    font-size: 12px;
    border-bottom: 1px solid #eef2f7;
}
.tbl td { padding: 9px 6px; border-bottom: 1px solid #f5f7fa; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl code {
    font-size: 12px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 5px;
    color: #334155;
}

.tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.tag-green { background: #dcfce7; color: #15803d; }
.tag-red   { background: #fee2e2; color: #b91c1c; }
.tag-yellow{ background: #fef9c3; color: #a16207; }
.tag-gray  { background: #f1f5f9; color: #64748b; }

.amount-in  { color: #16a34a; font-weight: 600; }
.amount-out { color: #dc2626; font-weight: 600; }

@media (max-width: 640px) {
    .profile-stats { grid-template-columns: repeat(2, 1fr); }
    /* 同上：必须 minmax(0,1fr)，不能用 1fr */
    .profile-grid { grid-template-columns: minmax(0, 1fr); }
    .invite-row { flex-wrap: wrap; }
    .invite-link { width: 100%; }
}

/* ==========================================================================
   移动端改造：底部标签栏 + 悬浮按钮
   ========================================================================== */

/* ---- 悬浮按钮：回到顶部 ---- */
.fab {
    position: fixed;
    right: 20px;
    bottom: 26px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary) 0%, #ff7a45 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 77, 79, .38);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.85);
    transition: opacity .26s ease, transform .26s ease, visibility .26s;
    -webkit-tap-highlight-color: transparent;
}
.fab svg { width: 21px; height: 21px; }
.fab.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.fab:active { transform: scale(.9); }

/* ---- 底部标签栏 ---- */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    display: none;                       /* 桌面端隐藏 */
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--c-line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 16px rgba(20, 24, 40, .07);
}
.tabbar .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 7px 4px 6px;
    color: var(--c-text-sub);
    font-size: 10.5px;
    line-height: 1.2;
    transition: color .18s;
    -webkit-tap-highlight-color: transparent;
}
.tabbar .tab-ico { display: flex; }
.tabbar .tab-ico svg { width: 23px; height: 23px; }
.tabbar .tab.on { color: var(--c-primary); font-weight: 600; }
.tabbar .tab.on .tab-ico { transform: translateY(-1px); transition: transform .18s; }
.tabbar .tab:active { opacity: .6; }

/* ---- 移动端断点 ---- */
@media (max-width: 767px) {
    /* 底部留出标签栏高度，避免内容被遮挡 */
    body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }

    .tabbar { display: flex; }

    /* 顶部导航精简：仅保留首页与核心入口 */
    /* 同上：底部留白仅对有搜索框的页面生效 */
    .topbar { padding: 14px 0 14px; }
    .topbar.has-hero { padding-bottom: 40px; }
    .topbar-right .nav-hide-sm { display: none; }
    .brand-logo { width: 30px; height: 30px; font-size: 16px; }
    .brand-name { font-size: 16px; }
    .brand-slogan { font-size: 11px; }

    /* 悬浮按钮位置上移，避开底部标签栏 */
    .fab { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); right: 14px; width: 44px; height: 44px; }

    /* 页脚紧凑 */
    .footer { padding: 20px 14px 24px; font-size: 11px; }
}

/* ---- 超窄屏 ---- */
@media (max-width: 360px) {
    .tabbar .tab { font-size: 10px; }
    .tabbar .tab-ico svg { width: 21px; height: 21px; }
}

/* ---- 桌面端：隐藏底部标签栏，保留悬浮按钮 ---- */
@media (min-width: 768px) {
    .tabbar { display: none !important; }
    body { padding-bottom: 0; }
}

/* ---- 减少动效偏好 ---- */
@media (prefers-reduced-motion: reduce) {
    .fab, .tabbar .tab, .tabbar .tab.on .tab-ico { transition: none; }
}

/* ==========================================================================
   首页轮播图
   ========================================================================== */
.banner {
    position: relative;
    margin: 14px 0 12px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #eef0f4;
    box-shadow: var(--shadow);
    height: 152px;
}
.banner-track {
    display: flex;
    height: 100%;
    will-change: transform;
    transition: transform .45s cubic-bezier(.25, .8, .3, 1);
}
.banner.banner-fallback .banner-track { transition: transform .45s cubic-bezier(.25,.8,.3,1); }

.banner-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
}
.banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}
.banner-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .34) 45%, rgba(0, 0, 0, 0) 78%);
}
.banner-info {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 13px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    z-index: 2;
}
.banner-tag {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .92);
    color: #333;
    line-height: 1.5;
}
.banner-tag.tb, .banner-tag.taobao { color: #ff5000; }
.banner-tag.jd { color: #e1251b; }
.banner-tag.pdd { color: #e02e24; }
.banner-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.banner-meta { display: flex; align-items: baseline; gap: 9px; }
.banner-price {
    font-size: 21px;
    font-weight: 700;
    color: #ffd166;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.banner-price small { font-size: 12px; font-weight: 600; margin-right: 1px; }
.banner-rate {
    font-size: 11px;
    background: linear-gradient(135deg, #ff4d4f, #ff7a45);
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
    line-height: 1.3;
}
.banner-sub { font-size: 11.5px; opacity: .9; }

/* 指示点 */
.banner-dots {
    position: absolute;
    right: 12px;
    bottom: 11px;
    z-index: 3;
    display: flex;
    gap: 4px;
}
.banner-dots i {
    width: 5px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .5);
    transition: width .25s, background .25s;
    display: block;
}
.banner-dots i.on { width: 13px; background: #fff; }

/* 无数据时的渐变推广位 */
.banner-fallback .banner-slide { display: flex; align-items: flex-end; }
.banner-fallback .banner-info { bottom: 20px; left: 18px; }
.banner-fallback .banner-title { font-size: 19px; }
.slide-a { background: linear-gradient(120deg, #ff5000, #ff8a3d 60%, #ffb03a); }
.slide-b { background: linear-gradient(120deg, #e1251b, #ff5a4d 60%, #ff9068); }
.slide-c { background: linear-gradient(120deg, #7c3aed, #c026d3 60%, #f472b6); }

@media (min-width: 768px) {
    .banner { height: 196px; margin: 18px 0 14px; }
    .banner-title { font-size: 16px; }
    .banner-price { font-size: 25px; }
    .banner-info { left: 20px; right: 20px; bottom: 18px; }
}
@media (max-width: 360px) {
    .banner { height: 138px; }
    .banner-title { font-size: 13px; }
    .banner-price { font-size: 19px; }
}

/* ==========================================================================
   会员中心 —— 提现 / 订单 / 团队 / 收益
   ========================================================================== */

/* ---------------------------------------------------------------- 提现 */
.wd-balance {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #ff4d4f, #ff7a45);
    border-radius: 12px; padding: 16px 18px; color: #fff;
}
.wd-bal-lbl { font-size: 12px; opacity: .9; }
.wd-bal-num { font-size: 27px; font-weight: 700; line-height: 1.25; }
.wd-bal-side { text-align: right; font-size: 11.5px; opacity: .95; }
.wd-bal-side b { font-size: 14px; }
.wd-link { display: inline-block; margin-top: 5px; text-decoration: underline; opacity: .95; }

.wd-form { margin-top: 16px; }
.wd-form label { display: block; font-size: 13px; color: #4b5563; margin-bottom: 13px; }
.wd-form input {
    display: block; width: 100%; margin-top: 5px; padding: 11px 12px;
    border: 1px solid var(--c-line); border-radius: 9px; font-size: 15px;
}
.wd-form input:focus { outline: none; border-color: var(--c-primary); }
.btn-allin { margin-top: 6px; padding: 4px 11px; font-size: 11.5px; border-radius: 20px; }
.wd-tip { font-size: 11.5px; color: #9ca3af; line-height: 1.7; margin-top: 12px; }

.wd-list { display: flex; flex-direction: column; gap: 10px; }
.wd-item {
    border: 1px solid var(--c-line); border-radius: 11px; padding: 12px 13px;
    display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: start;
}
.wd-item-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wd-item-no { font-size: 11.5px; color: #9ca3af; }
.wd-item-amt { font-size: 19px; font-weight: 700; color: var(--c-text); }
.wd-item-body { grid-column: 1; }
.wd-item-meta { font-size: 11.5px; color: var(--c-sub); line-height: 1.7; }
.wd-item .btn { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.wd-item-remark { grid-column: 1 / -1; font-size: 11.5px; color: var(--c-err); }

/* ---------------------------------------------------------------- 订单 */
.od-tabs, .tm-tabs {
    display: flex; gap: 8px; margin-bottom: 12px;
}
.od-tabs a, .tm-tabs a {
    flex: 1; text-align: center; padding: 10px 0; border-radius: 10px;
    background: #fff; border: 1px solid var(--c-line); font-size: 13.5px; color: #4b5563;
}
.od-tabs a.on, .tm-tabs a.on {
    background: linear-gradient(135deg, #ff4d4f, #ff7a45);
    border-color: transparent; color: #fff; font-weight: 600;
}
.od-filter { display: flex; gap: 8px; margin-bottom: 12px; }
.od-filter select {
    flex: 1; padding: 8px 9px; border: 1px solid var(--c-line);
    border-radius: 8px; font-size: 12.5px; background: #fff;
}
.od-note { font-size: 11.5px; color: #9ca3af; margin-bottom: 10px; }
.od-sum {
    display: flex; gap: 10px; padding: 11px 13px; background: #f9fafb;
    border-radius: 9px; margin-bottom: 12px;
}
.od-sum > div { flex: 1; }
.od-sum span { display: block; font-size: 11px; color: var(--c-sub); }
.od-sum b { font-size: 15px; }
.od-sum b.hl { color: var(--c-primary); }

.od-list { display: flex; flex-direction: column; gap: 10px; }
.od-item { border: 1px solid var(--c-line); border-radius: 11px; padding: 11px 12px; }
.od-item-hd { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; flex-wrap: wrap; }
.od-sn { font-size: 11.5px; color: #9ca3af; }
.od-item-hd .tag:last-child { margin-left: auto; }
.od-item-body { display: flex; gap: 10px; align-items: flex-start; }
.od-img {
    width: 62px; height: 62px; border-radius: 8px; object-fit: cover;
    background: #f3f4f6; flex-shrink: 0;
}
.od-info { flex: 1; min-width: 0; }
.od-title {
    font-size: 13px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.od-meta { font-size: 11px; color: #9ca3af; margin-top: 4px; }
.od-nums { text-align: right; flex-shrink: 0; }
.od-amt { font-size: 15px; font-weight: 700; }
.od-comm { font-size: 11.5px; color: var(--c-sub); }
.od-comm.sub { color: var(--c-primary); font-weight: 600; }

/* ---------------------------------------------------------------- 团队 */
.tm-sum {
    display: flex; gap: 10px; padding: 12px 14px; background: #f9fafb;
    border-radius: 9px; margin-bottom: 12px;
}
.tm-sum > div { flex: 1; }
.tm-sum span { display: block; font-size: 11px; color: var(--c-sub); }
.tm-sum b { font-size: 17px; }
.tm-sum b.hl { color: var(--c-primary); }

.tm-list { display: flex; flex-direction: column; gap: 10px; }
.tm-item { display: flex; gap: 11px; align-items: flex-start; }
.tm-ava {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #a5b4fc, #818cf8); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 600;
}
.tm-info { flex: 1; min-width: 0; }
.tm-name { font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tm-meta { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.tm-stats {
    display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px;
    font-size: 11.5px; color: var(--c-sub);
}
.tm-stats b { color: var(--c-text); font-size: 12.5px; }
.tm-stats b.hl { color: var(--c-primary); }

/* ---------------------------------------------------------------- 收益 */
.ea-level {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 15px; background: #f9fafb; border-radius: 10px;
}
.ea-level-badge {
    padding: 7px 15px; border-radius: 22px; font-size: 13.5px; font-weight: 600;
    background: #f3f4f6; color: #4b5563; flex-shrink: 0;
}
.ea-level-badge.lv1 { background: #fef3c7; color: #92400e; }
.ea-level-badge.lv2 { background: linear-gradient(135deg,#fde68a,#fcd34d); color: #78350f; }
.ea-rates { flex: 1; display: flex; gap: 10px; }
.ea-rates > div { flex: 1; text-align: center; }
.ea-rates span { display: block; font-size: 11px; color: var(--c-sub); }
.ea-rates b { font-size: 15px; }
.ea-note { font-size: 11.5px; color: #9ca3af; margin-top: 10px; line-height: 1.7; }

.ea-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.ea-box { border-radius: 11px; padding: 13px 11px; }
.ea-box-lbl { font-size: 11.5px; opacity: .85; }
.ea-box-num { font-size: 16px; font-weight: 700; margin: 3px 0 2px; line-height: 1.25; }
.ea-box-sub { font-size: 10.5px; opacity: .8; }
.ea-box.ok   { background: linear-gradient(135deg,#dcfce7,#bbf7d0); color: #14532d; }
.ea-box.wait { background: linear-gradient(135deg,#fef3c7,#fde68a); color: #78350f; }
.ea-box.bal  { background: linear-gradient(135deg,#fee2e2,#fecaca); color: #7f1d1d; }
.ea-tip { text-align: center; font-size: 12px; color: #9ca3af; padding: 10px 0; }

.ea-bars { margin-bottom: 16px; }
.ea-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12.5px; }
.ea-bar-row .nm { width: 92px; color: var(--c-sub); flex-shrink: 0; }
.ea-bar-row .bar { flex: 1; height: 9px; background: #f3f4f6; border-radius: 5px; overflow: hidden; }
.ea-bar-row .bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg,#ff4d4f,#ff7a45); }
.ea-bar-row .vl { width: 84px; text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }

.ea-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ea-split-lbl { font-size: 12px; font-weight: 600; margin-bottom: 7px; }
.ea-split-row {
    display: flex; justify-content: space-between; font-size: 12.5px;
    padding: 6px 0; border-bottom: 1px dashed var(--c-line);
}
.ea-split-row b.hl { color: var(--c-primary); }

.ea-team { display: flex; gap: 9px; margin-bottom: 10px; }
.ea-team-item {
    flex: 1; text-align: center; padding: 13px 6px; background: #f9fafb; border-radius: 10px;
}
.ea-team-item b { display: block; font-size: 17px; }
.ea-team-item span { font-size: 11px; color: var(--c-sub); }

.ea-desc { padding-left: 18px; font-size: 12px; color: #4b5563; line-height: 1.9; }
.ea-desc b { color: var(--c-text); }

/* 窄屏适配 */
@media (max-width: 400px) {
    .ea-grid { grid-template-columns: 1fr; }
    .ea-split { grid-template-columns: 1fr; }
    .ea-rates { flex-direction: column; gap: 5px; }
    .ea-rates > div { display: flex; justify-content: space-between; text-align: left; }
    .ea-rates span { display: inline; }
    .od-item-body { flex-wrap: wrap; }
    .od-nums { width: 100%; text-align: left; display: flex; gap: 12px; align-items: baseline; }
    .od-img { width: 52px; height: 52px; }
}

/* ---------------------------------------------------------------- 个人中心快捷入口 */
/* hero 是橙渐变，按钮若再用橙红渐变会糊成一片分不清边界。
   改用白底红字 + 轻投影，是彩色头部上放 CTA 的标准做法。 */
.profile-wd-btn {
    margin-top: 18px;
    background: #fff;
    color: var(--c-primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
}
.profile-wd-btn:hover {
    background: #fff5f5;
    color: var(--c-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.profile-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pq-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 11px 4px; border-radius: 10px; font-size: 12px; color: #4b5563;
}
.pq-item:active { background: #f9fafb; }
.pq-ic {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 19px;
}

/* ==========================================================================
   2026-10 美化迭代
   - 分类入口九宫格 .cat-rail
   - 优化 gcard/搜索/详情/会员中心视觉
   ========================================================================== */

/* ---------------------------------------------------------------- 分类入口 */
.cat-rail {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    background: #fff;
    border-radius: 14px;
    padding: 14px 8px 10px;
    margin: 12px 0 14px;
    box-shadow: 0 2px 10px rgba(15,23,42,.05);
}
.cat-item {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 4px 2px; border-radius: 8px;
    text-decoration: none; color: #4b5563; font-size: 11.5px;
    transition: background .15s;
}
.cat-item:hover { background: #fef2f2; }
.cat-ic {
    width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px;
    background: linear-gradient(135deg, #fff5f5, #ffe4e6);
    box-shadow: 0 2px 5px rgba(255,77,79,.10);
}
.cat-item:nth-child(2) .cat-ic { background: linear-gradient(135deg,#fff7ed,#ffedd5); }
.cat-item:nth-child(3) .cat-ic { background: linear-gradient(135deg,#fef3c7,#fde68a); }
.cat-item:nth-child(4) .cat-ic { background: linear-gradient(135deg,#dcfce7,#bbf7d0); }
.cat-item:nth-child(5) .cat-ic { background: linear-gradient(135deg,#dbeafe,#bfdbfe); }
.cat-item:nth-child(6) .cat-ic { background: linear-gradient(135deg,#f3e8ff,#e9d5ff); }
.cat-item:nth-child(7) .cat-ic { background: linear-gradient(135deg,#fce7f3,#fbcfe8); }
.cat-item:nth-child(8) .cat-ic { background: linear-gradient(135deg,#cffafe,#a5f3fc); }
.cat-item:nth-child(9) .cat-ic { background: linear-gradient(135deg,#e0e7ff,#c7d2fe); }
.cat-item:nth-child(10) .cat-ic { background: linear-gradient(135deg,#fee2e2,#fecaca); }

/* ---------------------------------------------------------------- 区块标题增强 */
.section {
    display: flex; align-items: center; gap: 10px;
    margin: 18px 0 10px;
    padding: 0 2px;
}
.section-bar {
    width: 4px; height: 16px; border-radius: 2px;
    background: linear-gradient(180deg, #ff4d4f, #ff7a45);
}
.section h2 {
    font-size: 16px; font-weight: 700; color: #1f2937; margin: 0;
    display: flex; align-items: center; gap: 6px;
}
.section .more {
    margin-left: auto; font-size: 12px; color: #9ca3af;
    text-decoration: none;
}
.section .more::after { content: " ›"; }

/* ---------------------------------------------------------------- 平台 chip 优化 */
.chips {
    display: flex; gap: 8px; margin: 12px 0 10px;
    padding: 0 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 13px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    font-size: 13px; color: #4b5563;
    cursor: pointer; user-select: none;
    transition: all .15s;
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.chip:hover { border-color: #fca5a5; color: #1f2937; }
.chip.active {
    background: linear-gradient(135deg, #ff4d4f, #ff7a45);
    color: #fff; border-color: transparent;
    box-shadow: 0 4px 10px rgba(255,77,79,.25);
}
.chip .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #cbd5e1;
}
.chip .dot.tb { background: #ff5000; }
.chip .dot.jd { background: #e1251b; }
.chip .dot.pdd { background: #e02e24; }
.chip.active .dot { background: rgba(255,255,255,.85); }

/* ---------------------------------------------------------------- 商品卡优化 */
.gcard {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15,23,42,.06);
    transition: transform .2s, box-shadow .2s;
}
.gcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15,23,42,.10);
}
.gcard-img {
    position: relative; padding-top: 100%;
    background: linear-gradient(135deg, #f4f5f7, #e5e7eb);
    overflow: hidden;
}
.gcard-img img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform .35s;
}
.gcard:hover .gcard-img img { transform: scale(1.06); }
.gcard-tag {
    position: absolute; top: 8px; left: 8px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 10.5px; padding: 2px 7px; border-radius: 10px;
    backdrop-filter: blur(6px);
    font-weight: 500;
}
.gcard-tag.tb { background: rgba(255,80,0,.85); }
.gcard-tag.jd { background: rgba(225,37,27,.85); }
.gcard-tag.pdd { background: rgba(224,46,36,.85); }
.gcard-coupon {
    position: absolute; bottom: 8px; right: 8px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    font-size: 10.5px; padding: 2px 7px; border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(245,158,11,.3);
}
.gcard-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.gcard-title {
    font-size: 13px; line-height: 1.4;
    color: #1f2937;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 36px;
}
.gcard-shop {
    font-size: 11px; color: #9ca3af; margin-top: 5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gcard-price {
    display: flex; align-items: baseline; gap: 6px;
    margin-top: auto; padding-top: 6px;
}
.gcard-price .price-now {
    color: #ff4d4f; font-weight: 700; font-size: 17px;
}
.gcard-price .price-now small { font-size: 11px; }
.gcard-price .price-old {
    color: #9ca3af; font-size: 11.5px;
    text-decoration: line-through;
}
.gcard-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
}
.gcard-foot .commission {
    color: #fff; background: linear-gradient(135deg, #ff4d4f, #ff7a45);
    padding: 2px 8px; border-radius: 10px; font-weight: 600;
}
.gcard-foot .sold {
    color: #9ca3af;
}
.gcard-actions {
    display: flex; gap: 6px; margin-top: 8px;
}
.gcard-actions .btn {
    flex: 1; padding: 7px 0; font-size: 12.5px;
    border-radius: 20px;
    text-align: center;
}
.gcard-actions .btn {
    background: linear-gradient(135deg, #fff5f5, #ffe4e6);
    color: #ff4d4f; border: 1px solid #fecaca;
}
.gcard-actions .btn:hover {
    background: linear-gradient(135deg, #ff4d4f, #ff7a45);
    color: #fff; border-color: transparent;
}

/* ---------------------------------------------------------------- 顶部栏 */
.topbar {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7a45 55%, #ffa940 100%);
    color: #fff;
    padding: 18px 0 14px;
    position: relative;
    overflow: hidden;
}
.topbar.has-hero { padding-bottom: 40px; }
.topbar::before {
    content: ""; position: absolute;
    right: -20%; top: -60%;
    width: 80%; height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,.12) 0%, transparent 60%);
    pointer-events: none;
}
.brand-name { font-size: 15px; }
.brand-slogan { font-size: 10.5px; opacity: .85; }
.brand-logo {
    width: 32px; height: 32px; border-radius: 9px;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(6px);
    font-size: 15px; font-weight: 700;
}
.topbar-right a {
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(4px);
    transition: all .2s;
}
.topbar-right a:hover { background: rgba(255,255,255,.32); }

/* ---------------------------------------------------------------- 搜索条 */
.searchbar {
    position: relative; z-index: 2;
    margin: -28px auto 0;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 6px 20px rgba(15,23,42,.08);
    padding: 6px 6px 6px 18px;
    display: flex; align-items: center; gap: 8px;
}
.searchbar input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 14px; padding: 10px 0; min-width: 0;
}
.searchbar .btn {
    border-radius: 20px; padding: 9px 18px; font-size: 14px;
}

/* ---------------------------------------------------------------- 轮播 */
.banner {
    position: relative; border-radius: 16px; overflow: hidden;
    margin: 0;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    aspect-ratio: 16 / 7;
    box-shadow: 0 4px 14px rgba(15,23,42,.08);
}
.banner-track {
    display: flex; height: 100%; transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.banner-slide {
    flex: 0 0 100%; height: 100%; position: relative;
    overflow: hidden;
}
.banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-mask {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.55) 0%, transparent 50%);
}
.banner-info {
    position: absolute; left: 14px; right: 14px; bottom: 12px;
    color: #fff;
    display: flex; flex-direction: column; gap: 4px;
}
.banner-tag {
    align-self: flex-start; font-size: 11px; padding: 2px 8px;
    border-radius: 10px; font-weight: 600;
}
.banner-tag.tb { background: #ff5000; }
.banner-tag.jd { background: #e1251b; }
.banner-tag.pdd { background: #e02e24; }
.banner-title {
    font-size: 14px; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.banner-meta {
    display: flex; align-items: baseline; gap: 10px;
    font-size: 12px;
}
.banner-price { font-size: 18px; font-weight: 700; color: #fef3c7; }
.banner-price small { font-size: 11px; }
.banner-rate {
    background: rgba(255,255,255,.2); backdrop-filter: blur(4px);
    padding: 2px 8px; border-radius: 10px;
}
.banner-fallback .banner-slide { padding: 18px; display: flex; align-items: flex-end; }
.banner-fallback .slide-a { background: linear-gradient(135deg, #ff4d4f, #ff7a45); }
.banner-fallback .slide-b { background: linear-gradient(135deg, #f97316, #fbbf24); }
.banner-fallback .slide-c { background: linear-gradient(135deg, #ef4444, #f97316); }
.banner-fallback .banner-title { font-size: 18px; }
.banner-fallback .banner-sub { font-size: 12px; opacity: .9; }
.banner-dots {
    position: absolute; bottom: 8px; right: 12px;
    display: flex; gap: 4px; z-index: 2;
}
.banner-dots span {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.5);
    transition: all .25s;
}
.banner-dots span.on { width: 18px; border-radius: 3px; background: #fff; }

/* ---------------------------------------------------------------- 空态/加载 */
.empty {
    text-align: center; padding: 48px 20px;
    color: #9ca3af;
}
.empty-icon { font-size: 38px; opacity: .65; margin-bottom: 10px; }
.empty h3 { font-size: 15px; color: #4b5563; font-weight: 600; margin: 0 0 6px; }
.empty p { font-size: 13px; margin: 0; line-height: 1.7; }

/* skeleton */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton 1.4s infinite;
    border-radius: 4px;
}
@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.sk-card { display: flex; flex-direction: column; gap: 8px; }
.sk-img { width: 100%; aspect-ratio: 1; border-radius: 12px; }
.sk-line { height: 12px; width: 90%; }
.sk-line.w60 { width: 60%; }

/* ---------------------------------------------------------------- 详情页 */
.detail-top { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0; }
.detail-img {
    background: #fff; border-radius: 16px; overflow: hidden;
    aspect-ratio: 1; margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(15,23,42,.06);
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-info h1 {
    font-size: 16px; line-height: 1.5; color: #1f2937; font-weight: 600;
    margin: 0 0 8px;
}
.detail-meta {
    display: flex; flex-wrap: wrap; gap: 6px 12px;
    font-size: 12px; color: #9ca3af; margin-bottom: 12px;
}
.detail-meta span { display: inline-flex; align-items: center; gap: 4px; }
.price-box {
    background: linear-gradient(135deg, #fff5f5, #fff);
    border: 1px solid #fecaca;
    border-radius: 14px; padding: 14px 16px;
    margin-bottom: 12px;
    position: relative; overflow: hidden;
}
.price-box::before {
    content: ""; position: absolute; right: -20px; top: -20px;
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255,77,79,.08);
}
.price-box .inner { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.price-box .now {
    color: #ff4d4f; font-weight: 700; font-size: 26px;
}
.price-box .now small { font-size: 14px; }
.price-box .old {
    color: #9ca3af; font-size: 13px; text-decoration: line-through;
}
.price-box .quan {
    margin-left: auto;
    background: linear-gradient(135deg, #ff4d4f, #ff7a45);
    color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 20px;
    font-weight: 600; box-shadow: 0 2px 6px rgba(255,77,79,.3);
}
.rate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.rate-item {
    background: #fff; border-radius: 12px; padding: 12px 6px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(15,23,42,.05);
    border: 1px solid #f3f4f6;
}
.rate-item .v { font-size: 16px; font-weight: 700; color: #ff4d4f; }
.rate-item .l { font-size: 11.5px; color: #9ca3af; margin-top: 3px; }
.detail-actions {
    position: sticky; bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    background: #fff; padding: 10px 14px;
    border-top: 1px solid #f3f4f6;
    display: flex; gap: 8px; align-items: center;
    margin: 12px -14px 0;
    box-shadow: 0 -2px 10px rgba(15,23,42,.05);
    z-index: 5;
}
.detail-actions .btn {
    flex: 1; padding: 12px; font-size: 15px; border-radius: 24px;
}

/* 窄屏适配 */
@media (max-width: 400px) {
    .cat-rail { grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 12px 6px 8px; }
    .cat-ic { width: 34px; height: 34px; font-size: 17px; }
    .cat-item { font-size: 11px; }
    .rate-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------------- 详情返佣规则 */
.detail-tips {
    background: #fff; border-radius: 12px; padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(15,23,42,.05);
    margin: 14px 0 8px;
}
.detail-tips .t { font-weight: 600; color: #1f2937; margin-bottom: 6px; font-size: 14px; }
.detail-tips ol {
    padding-left: 20px; color: #4b5563; font-size: 12.5px; line-height: 1.8;
}
.detail-tips ol li::marker { color: #ff7a45; font-weight: 700; }
.detail-tips b { color: #ff4d4f; }

/* ---------------------------------------------------------------- 淘宝自测 */
.taobao-selftest {
    margin-top: 14px;
    background: #fff; border-radius: 12px; padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(15,23,42,.05);
    border: 1px solid #f3f4f6;
}
.ts-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ts-head b { font-size: 14px; color: #1f2937; }
.ts-head .muted { color: #6b7280; font-size: 12px; flex: 1; }
.ts-result { margin-top: 12px; }
.ts-loading { text-align: center; padding: 18px; color: #6b7280; font-size: 13px; }
.ts-meta { font-size: 12.5px; color: #4b5563; padding: 8px 10px; background: #f9fafb; border-radius: 8px; }
.ts-meta code { background: transparent; padding: 0; }
.ts-list { margin-top: 10px; }
.ts-row { padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; }
.ts-row.ok { background: #f0fdf4; border-left: 3px solid #07c160; }
.ts-row.fail { background: #fef2f2; border-left: 3px solid #dc2626; }
.ts-name { font-size: 13px; font-weight: 600; color: #1f2937; }
.ts-result-line { font-size: 13px; margin-top: 4px; }
.ts-expect { font-size: 11.5px; color: #6b7280; margin-top: 2px; }
.ts-verdict { margin-top: 10px; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.7; }
.ts-verdict.ok { background: #dcfce7; color: #15803d; }
.ts-verdict.fail { background: #fee2e2; color: #b91c1c; }
.ts-verdict b { font-weight: 700; }
.ts-fail { padding: 14px; text-align: center; color: #b91c1c; background: #fef2f2; border-radius: 8px; }
