/* ==========================================================================
   商城 H5 · 店铺页
   基础组件（card/toast/loading/img-viewer/tabbar）来自 mobile.css（复用于 bdiot），
   本文件只做：品牌色覆盖 + 店铺首页专属布局
   ========================================================================== */

:root {
    --brand: #c2185b;
    --brand-dark: #a1144c;
    --brand-light: #fdf2f6;
    --bg: #f5f6f7;
    --brand-deep: #d81b60;
    --brand-mid: #e0457f;
    --brand-2: #ef6a9a;
    --brand-line: #f4c9d8;
    --brand-shadow: rgba(194, 24, 91, .22);
    --brand-shadow-lg: rgba(194, 24, 91, .25);
    --brand-glow: rgba(194, 24, 91, .35);
    --card-bg: #fff;
    --soft-brand: #fff9fb;
    --head-grad: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-mid) 55%, var(--brand-2) 100%);
    --head-grad-alt: linear-gradient(135deg, var(--brand-deep), var(--brand-2));
    --head-grad-bar: linear-gradient(90deg, var(--brand-mid), var(--brand));
    --head-shadow-lg: 0 8px 20px var(--brand-shadow-lg);
    --btn-shadow: 0 6px 16px var(--brand-shadow);
}

/* 本文件在 mobile.css 之后加载：这里再次声明三套变量，覆盖其同名基础色。 */
[data-theme="classic"] {
    --brand: #c2185b;
    --brand-dark: #a1144c;
    --brand-light: #fdf2f6;
    --bg: #f5f6f7;
    --brand-deep: #d81b60;
    --brand-mid: #e0457f;
    --brand-2: #ef6a9a;
    --brand-line: #f4c9d8;
    --brand-shadow: rgba(194, 24, 91, .22);
    --brand-shadow-lg: rgba(194, 24, 91, .25);
    --brand-glow: rgba(194, 24, 91, .35);
    --soft-brand: #fff9fb;
    --card-bg: #fff;
}
[data-theme="fresh"] {
    --brand: #1AAE7E;
    --brand-dark: #128A63;
    --brand-light: #E8F7F1;
    --bg: #F4F6F8;
    --brand-deep: #0F8F68;
    --brand-mid: #1AAE7E;
    --brand-2: #35C79A;
    --brand-line: #BFE9DA;
    --brand-shadow: rgba(26, 174, 126, .22);
    --brand-shadow-lg: rgba(15, 143, 104, .25);
    --brand-glow: rgba(26, 174, 126, .35);
    --soft-brand: #F2FBF7;
    --card-bg: #fff;
}
[data-theme="elegant"] {
    --brand: #2b5a9e;
    --brand-dark: #1e4277;
    --brand-light: #eef3fa;
    --bg: #f4f6f9;
    --brand-deep: #1e4277;
    --brand-mid: #3a6cb0;
    --brand-2: #6d9bd4;
    --brand-line: #cddcf0;
    --brand-shadow: rgba(43, 90, 158, .22);
    --brand-shadow-lg: rgba(30, 66, 119, .25);
    --brand-glow: rgba(43, 90, 158, .35);
    --soft-brand: #f2f6fb;
    --card-bg: #fff;
}

/* ---------------- 店铺头 ---------------- */
.shop-head {
    background: var(--head-grad);
    color: #fff;
    padding: 18px 16px 54px;
    padding-top: calc(18px + env(safe-area-inset-top));
    position: relative;
}

.shop-id {
    display: flex;
    align-items: center;
    gap: 11px;
}

.shop-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 600;
    overflow: hidden;
    flex: 0 0 auto;
}
.shop-logo img { width: 100%; height: 100%; object-fit: cover; }

.shop-meta { min-width: 0; flex: 1 1 auto; }
.shop-name {
    font-size: 17.5px;
    font-weight: 600;
    letter-spacing: .3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shop-slogan {
    font-size: 12px;
    opacity: .88;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-badges {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.shop-badge {
    font-size: 11px;
    line-height: 17px;
    padding: 0 7px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .34);
}
.shop-intro-link {
    display: inline-flex; align-items: center; gap: 1px;
    flex: 0 0 auto; align-self: center;
    color: #fff; font-size: 11.5px; line-height: 20px;
    padding: 0 8px; border-radius: 10px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .38);
    text-decoration: none; white-space: nowrap;
}
.shop-intro-link i { font-size: 11px; }

/* ---------------- 班次卡（浮动在店铺头下沿）---------------- */
.slot-wrap {
    margin: -42px 12px 0;
    position: relative;
    z-index: 10;
}

.slot-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 13px 14px 12px;
    box-shadow: 0 4px 18px rgba(31, 39, 51, .08);
    border: 1px solid var(--brand-line);
}

.slot-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slot-title {
    font-size: 14.5px;
    font-weight: 600;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-state {
    font-size: 11px;
    line-height: 18px;
    padding: 0 7px;
    border-radius: 9px;
    background: var(--brand-light);
    color: var(--brand);
    border: 1px solid #f4d3e0;
    flex: 0 0 auto;
}
.slot-state.off {
    background: #f4f5f6;
    color: #8a97a5;
    border-color: #e6ebf0;
}

.slot-time {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 9px;
    font-size: 13px;
    color: var(--text-sub);
}
.slot-time b {
    font-size: 15px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.slot-cd {
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 6px;
}
.slot-cd .num {
    color: var(--brand);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.slot-bar {
    margin-top: 9px;
    height: 6px;
    border-radius: 3px;
    background: #f3e6ec;
    overflow: hidden;
}
.slot-bar i {
    display: block;
    height: 100%;
    background: var(--head-grad-bar);
    border-radius: 3px;
    transition: width .4s;
}
.slot-bar-tip {
    margin-top: 5px;
    font-size: 11.5px;
    color: var(--text-mute);
    display: flex;
    justify-content: space-between;
}

.slot-rules {
    margin: 10px 0 0;
    padding: 10px 0 0;
    border-top: 1px dashed #f0e2e8;
    list-style: none;
    font-size: 12.5px;
    color: var(--text-sub);
    line-height: 1.75;
}
.slot-rules li {
    display: flex;
    gap: 6px;
}
.slot-rules li em {
    font-style: normal;
    color: var(--brand);
    flex: 0 0 auto;
}

/* 服务承诺 */
.promise {
    margin: 10px 12px 0;
    background: var(--card-bg);
    border: 1px solid #f7e5ec;
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 12px;
    color: #8a5c6f;
    line-height: 1.6;
}
.promise b { color: var(--brand); font-weight: 600; }

/* ---------------- 搜索 ---------------- */
.search-bar {
    margin: 12px 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0 12px;
    height: 36px;
}
.search-bar i { color: #b6bfc9; font-size: 16px; }
.search-bar input {
    flex: 1 1 auto;
    border: 0;
    outline: 0;
    font-size: 13.5px;
    background: transparent;
    color: var(--text);
    min-width: 0;
}

/* ---------------- 分类 tab（吸顶）---------------- */
.cat-tabs {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 12px;
    background: rgba(245, 246, 247, .96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
    flex: 0 0 auto;
    font-size: 13px;
    line-height: 28px;
    padding: 0 14px;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid var(--line);
    color: #4b5057;
    white-space: nowrap;
}
.cat-tab.on {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 500;
}
.cat-tab .n {
    font-size: 11px;
    opacity: .72;
    margin-left: 3px;
}

/* ---------------- 商品流 ---------------- */
.p-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 12px 20px;
}

.p-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eef1f4;
    position: relative;
    display: block;
    color: var(--text);
}

.p-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f8f9;
    display: block;
    object-fit: cover;
}
.p-cover-ph {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f8f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c8d0d8;
    font-size: 26px;
}

.p-body { padding: 8px 9px 10px; }

.p-title {
    font-size: 13px;
    line-height: 1.36;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.p-sub {
    font-size: 11px;
    color: var(--text-mute);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-price {
    margin-top: 6px;
    color: var(--brand);
    font-weight: 600;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}
.p-price em { font-style: normal; font-size: 11.5px; margin-right: 1px; }
.p-price s {
    margin-left: 5px;
    font-size: 11px;
    color: var(--text-mute);
    font-weight: 400;
}

.p-tags {
    display: flex;
    gap: 4px;
    margin-top: 5px;
    flex-wrap: wrap;
}
.p-tag {
    font-size: 10.5px;
    line-height: 16px;
    padding: 0 5px;
    border-radius: 3px;
    background: var(--brand-light);
    color: var(--brand);
    border: 1px solid #f7dbe6;
}
.p-tag.gray {
    background: #f5f6f7;
    color: #8a97a5;
    border-color: #e9edf1;
}

/* 商品卡 / 详情浮层的店铺统计：小号灰字，弱化不抢价格视觉 */
.p-stats {
    display: flex; gap: 10px; margin-top: 4px;
    font-size: 10.5px; color: #9aa4af; line-height: 1.4;
}
.p-stats b { font-weight: 500; color: #8a97a5; }
.p-detail-stats {
    display: flex; gap: 16px; margin-top: 7px;
    font-size: 11px; color: #9aa4af; line-height: 1.4;
}
.p-detail-stats b { font-weight: 500; color: #8a97a5; }

/* 售罄：置灰但仍展示（一期 §4.1：不下架，避免"刚才还有怎么没了"）*/
.p-card.sold .p-cover,
.p-card.sold .p-cover-ph { opacity: .45; }
.p-sold-mask {
    position: absolute;
    top: 0; left: 0; right: 0;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.p-sold-mask span {
    background: rgba(31, 39, 51, .62);
    color: #fff;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 13px;
}

.empty {
    padding: 56px 20px;
    text-align: center;
    color: var(--text-mute);
    font-size: 13.5px;
    line-height: 1.9;
}
.empty a { color: var(--brand); }

/* ---------------- 分类页（2 列宫格）---------------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}
.cat-box {
    background: var(--card-bg);
    border: 1px solid #eef1f4;
    border-radius: 10px;
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}
.cat-box .ic {
    width: 38px; height: 38px;
    border-radius: 9px;
    background: var(--brand-light);
    color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex: 0 0 auto;
    overflow: hidden;
}
.cat-box .ic img { width: 100%; height: 100%; object-fit: cover; }
.cat-box .nm { font-size: 13.5px; font-weight: 500; }
.cat-box .ct { font-size: 11px; color: var(--text-mute); margin-top: 2px; }

/* ---------------- 未上线占位 ---------------- */
.coming {
    padding: 70px 24px;
    text-align: center;
}
.coming .ic {
    width: 58px; height: 58px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: var(--brand-light);
    color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
}
.coming h2 { font-size: 15px; margin: 0 0 6px; }
.coming p { font-size: 12.5px; color: var(--text-mute); line-height: 1.8; margin: 0; }

/* ---------------- 商品浮层（第 4 步替换为详情页）---------------- */
.muted { color: var(--text-mute); }

/* 商品详情浮层。注意：类名统一用 p-sheet 前缀，绝不能叫 .sheet ——
   mobile.css 里有一套全局 .sheet（visibility:hidden + translateY(100%)，
   靠元素自身 .show 才显形），同名会导致「遮罩出来但内容永远隐藏」。 */
.p-mask {
    position: fixed;
    inset: 0;
    background: rgba(20, 24, 30, .45);
    z-index: 120;
    display: none;
    align-items: flex-end;
}
.p-mask.show { display: flex; }

.p-sheet {
    width: 100%;
    max-height: 82vh;
    min-height: 240px;
    background: var(--card-bg);
    border-radius: 14px 14px 0 0;
    padding: 0 0 calc(16px + env(safe-area-inset-bottom));
    position: relative;
    overflow-y: auto;
    animation: pSheetUp .22s ease-out;
}
@keyframes pSheetUp {
    from { transform: translateY(24px); opacity: .6; }
    to { transform: translateY(0); opacity: 1; }
}

.p-close {
    position: absolute;
    right: 12px; top: 10px;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .38);
    color: #fff;
    border-radius: 50%;
    font-size: 17px;
    z-index: 2;
}

/* 商品主图：实拍图宽高比各异，按原图比例完整显示，不裁剪也不留突兀灰边。
   白底 + 原图高度自适应（上限 60vh 防竖图顶满屏），图片居中，
   留白与浮层同色，看起来就是一张居中的照片而不是嵌在灰块里。 */
.p-media { background: var(--card-bg); border-radius: 14px 14px 0 0; padding: 6px 12px 0; }
.p-cover-big {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 60vh;            /* 竖图过长时限高，避免撑满整屏看不到按钮 */
    margin: 0 auto;
    object-fit: contain;
    border-radius: 8px;
}
.p-thumbs { display: flex; justify-content: center; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 10px 0 4px; background: var(--card-bg); }
.p-thumbs .pt { flex: 0 0 auto; width: 52px; height: 52px; border: 1px solid #e5e7eb; border-radius: 6px; background: #f7f8f9 center/cover no-repeat; cursor: pointer; }
.p-thumbs .pt.on { border: 2px solid var(--brand); }
.p-thumbs:empty { display: none; }

.p-detail { padding: 14px 16px 0; }
.p-title-big { font-size: 16px; font-weight: 600; line-height: 1.4; }
.p-sub-big { font-size: 12.5px; color: var(--text-sub); margin-top: 5px; }
.p-price-big {
    color: var(--brand);
    font-weight: 600;
    font-size: 22px;
    margin-top: 10px;
    font-variant-numeric: tabular-nums;
}
.p-price-big em { font-style: normal; font-size: 13px; margin-right: 2px; }
.p-stock-big { font-size: 12px; color: var(--text-mute); margin-top: 6px; }
.p-detail-sec { margin-top: 14px; border-top: 1px solid #f2f4f6; padding-top: 12px; }
.p-detail-h { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; }
.p-detail-body { font-size: 13px; line-height: 1.8; color: #4b5563; }
.p-detail-body p { margin: 0 0 8px; }
.p-detail-body ul, .p-detail-body ol { margin: 6px 0; padding-left: 22px; }
.p-detail-body li { margin: 3px 0; }
.p-detail-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 6px 0; }
.p-detail .btn-main { margin-top: 14px; }

/* ---------------- 滚动加载 ---------------- */
.load-more {
    padding: 18px 0 26px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-mute);
    letter-spacing: .3px;
}
.load-more.done { color: #c9ccd1; }
.load-more:not(.done) span { cursor: pointer; }

/* ---------------- 主按钮改品牌粉（mobile.css 里是 bdiot 的绿） ---------------- */
.btn-main {
    background: linear-gradient(100deg, var(--brand-dark), var(--brand));
    box-shadow: var(--btn-shadow);
}
.btn-main:active { transform: translateY(1px); }

/* ---------------- 账号页（登录 / 注册 / 改密） ---------------- */
.auth-wrap { padding: 0 20px 40px; }

.auth-brand {
    text-align: center;
    padding: 30px 0 24px;
}
.auth-brand .lg {
    width: 62px; height: 62px;
    margin: 0 auto 12px;
    border-radius: 18px;
    background: var(--head-grad-alt);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--head-shadow-lg);
}
.auth-brand .h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1c232b;
}
.auth-brand .tip {
    font-size: 12.5px;
    color: var(--text-mute);
    margin-top: 6px;
}

.auth-error, .auth-ok {
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.auth-error { background: var(--brand-light); color: var(--brand); border: 1px solid var(--brand-line); }
.auth-ok { background: #eefaf1; color: #1b7a43; border: 1px solid #cdeed9; }

.f-hint {
    font-size: 11.5px;
    color: #9aa2ab;
    margin-top: 6px;
    line-height: 1.5;
}

.agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-sub);
    line-height: 1.6;
    margin: 2px 0 18px;
}
.agree input { width: 16px; height: 16px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.agree a { color: var(--brand); }

.auth-switch {
    text-align: center;
    font-size: 13.5px;
    color: var(--text-sub);
    margin-top: 20px;
}
.auth-switch a { color: var(--brand); font-weight: 600; }

.auth-locked-note {
    font-size: 12px;
    color: var(--text-mute);
    text-align: center;
    margin-top: 14px;
}

/* ---------------- 我的 ---------------- */
.me-head {
    background: var(--head-grad);
    color: #fff;
    padding: 22px 18px 26px;
    padding-top: calc(22px + env(safe-area-inset-top));
    display: flex;
    align-items: center;
    gap: 13px;
}
.me-avatar {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    border: 1px solid rgba(255, 255, 255, .45);
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
    font-weight: 700;
    flex: none;
}
.me-name { font-size: 17px; font-weight: 600; }
.me-sub { font-size: 12.5px; opacity: .88; margin-top: 5px; }

.me-card {
    margin: 14px 14px 0;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(20, 30, 40, .04);
}
.me-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px;
    font-size: 14.5px;
    color: #263039;
    border-bottom: 1px solid #f2f4f6;
}
.me-row:last-child { border-bottom: 0; }
.me-row .val { color: var(--text-mute); font-size: 13px; }
.me-row i.layui-icon { margin-right: 8px; color: var(--brand); }
.me-row .lock {
    font-size: 11px;
    color: #9aa2ab;
    background: #f3f5f7;
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 6px;
}

.me-stats {
    display: flex;
    margin: 14px 14px 0;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px 0;
    box-shadow: 0 2px 10px rgba(20, 30, 40, .04);
}
.me-stats div { flex: 1; text-align: center; }
.me-stats b { display: block; font-size: 19px; color: #1c232b; font-variant-numeric: tabular-nums; }
.me-stats span { font-size: 11.5px; color: var(--text-mute); }

.me-logout {
    margin: 20px 14px 0;
    width: calc(100% - 28px);
    height: 46px;
    border: 1px solid #f0d3dc;
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--brand);
    font-size: 15px;
}

/* ---------------- TabBar 角标 ---------------- */
.tabbar a { position: relative; }
.tab-badge {
    position: absolute;
    top: 4px;
    left: 50%;
    margin-left: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 10.5px;
    line-height: 16px;
    text-align: center;
    font-style: normal;
    box-shadow: 0 1px 3px var(--brand-glow);
}

/* ---------------- 购物车 ---------------- */
.cart-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 16px 16px 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1c232b;
}
.cart-head small { font-size: 12.5px; font-weight: 400; color: var(--text-mute); }

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 14px 10px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(20, 30, 40, .04);
}

.ci-img {
    width: 72px; height: 72px;
    border-radius: 9px;
    object-fit: cover;
    background: #f7f8f9;
    flex: none;
}
.ci-img.ph {
    display: flex; align-items: center; justify-content: center;
    color: #c8ced6; font-size: 22px;
}

.ci-body { flex: 1 1 auto; min-width: 0; }
.ci-title {
    font-size: 14px;
    color: #1c232b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ci-price {
    margin-top: 6px;
    font-size: 15px;
    color: var(--brand);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.ci-warn {
    font-size: 11px;
    color: #c77700;
    background: var(--soft-brand);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 6px;
    font-weight: 400;
    vertical-align: 1px;
}

.qty {
    display: flex;
    align-items: center;
    border: 1px solid #e8ebee;
    border-radius: 8px;
    overflow: hidden;
    flex: none;
}
.qty button {
    width: 30px; height: 30px;
    border: 0;
    background: var(--card-bg);
    color: #55606b;
    font-size: 16px;
    line-height: 1;
}
.qty button:active { background: #f4f6f8; }
.qty span {
    min-width: 28px;
    text-align: center;
    font-size: 14px;
    color: #1c232b;
    font-variant-numeric: tabular-nums;
}

.cart-bar {
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: var(--card-bg);
    border-top: 1px solid #eef0f2;
    z-index: 60;
}
.cart-bar .sum {
    flex: 1 1 auto;
    font-size: 13px;
    color: var(--text-sub);
}
.cart-bar .sum b { font-size: 19px; color: var(--brand); font-variant-numeric: tabular-nums; }
.cart-bar .sum small { display: block; font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.cart-bar .btn-main { width: 132px; height: 44px; font-size: 15px; flex: none; }

/* 购物车页有 TabBar，结算条要压在它上面（--tabbar-h 来自 mobile.css） */
body.has-tabbar .cart-bar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
body.has-tabbar #cartList, body.has-tabbar #cartEmpty { padding-bottom: 80px; }

/* ---------------- 图形验证码 ---------------- */
.cap-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.cap-row .f-input { flex: 1 1 auto; }
.cap-img {
    width: 112px;
    height: 44px;
    flex: none;
    border: 1px solid #e0e5ea;
    border-radius: 9px;
    background: #f6f7f9;
    cursor: pointer;
    user-select: none;
}
.cap-img:active { opacity: .75; }

/* 站点底部版权 / 备案号 */
/* 用 flex 把页脚顶到视口底部：内容短时贴底，内容长时随文档流下移；
   不用 absolute，避免遮住正文或被固定 TabBar 盖住。 */
html, body { min-height: 100%; }
body {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;   /* has-tabbar 的 padding-bottom 计入 100vh，页脚才不会被 TabBar 盖住 */
    min-height: 100vh;
}
.mobile-main { flex: 1 0 auto; }
.site-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 18px 12px 22px; text-align: center;
    color: #a3abb4; font-size: 11px; line-height: 1.9;
}

/* ---------------- 商品评价（浮层内） ---------------- */
.rv-summary { font-size:11.5px; font-weight:400; color:#f5a623; margin-left:6px; }
.rv-empty, .rv-note { font-size:12px; color:#9aa4af; padding:10px 0; }
.rv-pending { font-size:11.5px; color:#b45309; padding:8px 0; }
.rv-item { padding:10px 0; border-bottom:1px solid #f2f4f6; }
.rv-item:last-child { border-bottom:0; }
.rv-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.rv-user { font-size:12px; color:#6b7280; }
.rv-stars-static { color:#f5a623; font-size:12px; letter-spacing:1px; }
.rv-text { font-size:12.5px; color:#374151; line-height:1.6; margin-top:4px; word-break:break-all; }
.rv-meta { display:flex; justify-content:space-between; align-items:center; margin-top:4px; }
.rv-time { font-size:11px; color:#b0b7bf; }
.rv-del { border:0; background:none; color:var(--brand); font-size:11px; padding:2px 0; }
.btn-review { width:100%; height:40px; margin-top:10px; border:1px solid var(--brand); background: var(--card-bg); color:var(--brand); border-radius:9px; font-size:13.5px; }
.rv-form { margin-top:10px; padding:10px; background:var(--soft-brand); border:1px solid var(--brand-line); border-radius:8px; }
.rv-stars { display:flex; gap:6px; font-size:26px; color:#d8dde3; line-height:1; }
.rv-stars span { cursor:pointer; }
.rv-stars span.on { color:#f5a623; }
.rv-form textarea { width:100%; box-sizing:border-box; min-height:64px; margin-top:8px; border:1px solid #e5e7eb; border-radius:6px; padding:8px; font-size:12.5px; resize:vertical; }
.rv-form-acts { display:flex; gap:8px; margin-top:8px; }
