/* ============ 买家端商城 ============ */
.shop-shell { min-height: 100vh; background: var(--bg); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; }

/* 顶栏：PC */
.pc-header { display: none; }
.m-header { display: none; }
@media (min-width: 900px) {
  .pc-header {
    display: block; position: sticky; top: 0; z-index: 60; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(0,0,0,.03);
  }
  .pc-top { height: 36px; background: #fafbfc; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
  .pc-top .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
  .pc-top a:hover { color: var(--red); }
  .pc-main { height: 74px; display: flex; align-items: center; gap: 34px; }
  .logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: 1px; color: var(--red); white-space: nowrap; }
  .logo .logo-mark { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, #ff6b6b, #f5333f); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 4px 12px rgba(245,51,63,.28); }
  .logo small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); letter-spacing: 2px; }
  .pc-search { flex: 1; max-width: 480px; display: flex; height: 40px; border: 2px solid var(--red); border-radius: 22px; overflow: hidden; }
  .pc-search input { flex: 1; border: 0; padding: 0 16px; }
  .pc-search button { width: 76px; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 14px; }
  .pc-nav { display: flex; gap: 26px; font-size: 15px; font-weight: 500; }
  .pc-nav a { padding: 6px 0; border-bottom: 2px solid transparent; }
  .pc-nav a:hover, .pc-nav a.on { color: var(--red); border-color: var(--red); }
  .pc-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .pc-cart { position: relative; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px solid #ffd2d5; border-radius: 20px; color: var(--red); background: #fff8f8; font-size: 13px; }
  .pc-cart .badge { position: absolute; top: -5px; right: -4px; }
  .pc-user { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); }
  .page { padding-bottom: 40px; }
  .tabbar, .m-header { display: none !important; }
}
@media (max-width: 899px) {
  .m-header {
    display: flex; position: sticky; top: 0; z-index: 60; height: 52px; align-items: center; gap: 10px;
    padding: 0 12px; background: #fff; border-bottom: 1px solid var(--line);
  }
  .m-search { flex: 1; height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 12px; background: #f4f5f7; border-radius: 18px; color: var(--muted); font-size: 13px; }
  .m-header .back { width: 30px; display: flex; align-items: center; color: var(--text); }
  .m-header .title { font-size: 16px; font-weight: 600; flex: 1; text-align: center; }
  .m-header .right { width: 30px; display: flex; justify-content: flex-end; }
  .page { padding-bottom: 74px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; height: 58px;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 12px rgba(0,0,0,.04);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9aa0ac; font-size: 11px; position: relative; }
  .tabbar a.on { color: var(--red); }
  .tabbar a.on .ic { stroke-width: 2.2; }
  .tabbar .badge { position: absolute; top: 3px; left: 56%; }
  .pc-header { display: none !important; }
}

/* 搜索页 */
.search-panel { background: #fff; padding: 12px 14px; }
.search-bar { display: flex; gap: 8px; }
.search-bar .input { flex: 1; background: #f5f6f8; border-color: transparent; border-radius: 20px; }
.search-bar .btn { border-radius: 20px; }
.hot-words { margin-top: 16px; }
.hot-words b { display: block; font-size: 13px; margin-bottom: 10px; }
.chip { display: inline-flex; padding: 5px 12px; margin: 0 8px 8px 0; border-radius: 14px; background: #f4f5f7; color: var(--text2); font-size: 12px; }
.chip:hover { background: var(--red-light); color: var(--red); }

/* 首页 */
.hero { position: relative; margin: 12px; border-radius: 14px; overflow: hidden; background: #fff; }
@media (min-width: 900px) { .hero { margin: 18px 0 0; height: 300px; } }
.hero-slide { position: relative; height: 170px; transition: opacity .4s; }
@media (min-width: 900px) { .hero-slide { height: 300px; } }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-txt { position: absolute; left: 24px; top: 32px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.18); }
.hero-txt h2 { font-size: 26px; font-weight: 800; letter-spacing: 1px; }
.hero-txt p { margin-top: 6px; font-size: 13px; opacity: .95; }
@media (min-width: 900px) { .hero-txt { left: 60px; top: 80px; } .hero-txt h2 { font-size: 42px; } .hero-txt p { font-size: 17px; } }
.hero-dots { position: absolute; right: 14px; bottom: 12px; display: flex; gap: 5px; }
.hero-dots i { width: 6px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.55); transition: .2s; }
.hero-dots i.on { width: 16px; background: #fff; }
.notice-bar { display: flex; align-items: center; gap: 8px; margin: 0 12px 12px; padding: 10px 12px; background: #fff; border-radius: 10px; font-size: 12px; color: var(--text2); overflow: hidden; }
@media (min-width: 900px) { .notice-bar { margin: 12px 0 0; } }
.notice-bar .ic { color: var(--red); }
.notice-bar .notice-strong { font-weight: 600; color: var(--red); white-space: nowrap; }
.notice-bar span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 金刚区 */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 4px; padding: 16px 12px; background: #fff; margin: 0 12px 12px; border-radius: 14px; }
@media (min-width: 900px) { .quick-grid { grid-template-columns: repeat(6, 1fr); margin: 12px 0 0; padding: 22px 16px; } }
.quick-grid a { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; color: var(--text2); }
.quick-ico { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; font-weight: 700; box-shadow: 0 5px 14px rgba(0,0,0,.09); }
@media (min-width: 900px) { .quick-ico { width: 62px; height: 62px; font-size: 24px; } }

/* 区块标题 */
.sec { margin: 0 12px 12px; background: #fff; border-radius: 14px; overflow: hidden; }
@media (min-width: 900px) { .sec { margin: 16px 0 0; } }
.sec-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 8px; }
.sec-head h3 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.sec-head h3 .ic { color: var(--red); }
.sec-head .more { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 2px; }
.sec-head .sub { font-size: 12px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.countdown { display: inline-flex; gap: 3px; margin-left: 8px; font-size: 11px; }
.countdown b { background: #22242a; color: #fff; border-radius: 3px; padding: 2px 4px; font-weight: 600; }

/* 商品网格 */
.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px 12px 16px; }
@media (min-width: 900px) { .goods-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 14px 16px 20px; } }
.goods-card { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #f1f2f5; transition: .2s; cursor: pointer; display: flex; flex-direction: column; }
.goods-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #ffe0e2; }
.goods-card .thumb { position: relative; width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #f6f6f6; }
.goods-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.goods-card:hover .thumb img { transform: scale(1.04); }
.goods-card .corner { position: absolute; left: 0; top: 0; padding: 2px 8px; border-radius: 0 0 8px 0; background: var(--red); color: #fff; font-size: 10px; }
.goods-card .corner.gray { background: #8f96a3; }
.goods-card.off { opacity: .8; }
.goods-card.off .thumb img { filter: grayscale(.5); }
.goods-card .add.off { background: #b9c0cc; }
.detail-bar .off-tip { flex: 1; text-align: center; font-size: 13px; color: #8f96a3; padding: 10px 0; }
.goods-card .info { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.goods-card .name { font-size: 13px; line-height: 1.45; height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-card .sell { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goods-card .bottom { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; }
.goods-card .price { font-size: 17px; }
.goods-card .sales { font-size: 11px; color: var(--muted); }
.goods-card .add { width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; }
.goods-card .add:hover { background: var(--red-dark); }

/* 横向活动卡 */
.act-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 4px 12px 16px; }
@media (min-width: 900px) { .act-row { grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 4px 16px 20px; } }
.act-card { border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #f1f2f5; cursor: pointer; }
.act-card img { width: 100%; aspect-ratio: 1.15/1; object-fit: cover; }
.act-card .t { padding: 7px 9px 9px; }
.act-card .t b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-card .t .price { font-size: 14px; }
.act-card .t del { color: var(--muted); font-size: 11px; margin-left: 4px; }
.coupon-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 12px 16px; }
.coupon-mini { min-width: 150px; display: flex; align-items: stretch; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #fff3f3, #ffe8e9); border: 1px solid #ffdadd; }
.coupon-mini .l { padding: 10px 12px; color: var(--red); min-width: 62px; text-align: center; border-right: 1px dashed #f6b9bd; }
.coupon-mini .l b { font-size: 24px; display: block; line-height: 1; }
.coupon-mini .l small { font-size: 10px; }
.coupon-mini .r { padding: 10px; display: flex; flex-direction: column; justify-content: center; gap: 4px; font-size: 11px; }
.coupon-mini .r b { font-size: 12px; }
.coupon-mini .r button { align-self: flex-start; padding: 2px 9px; border-radius: 10px; background: var(--red); color: #fff; font-size: 10px; }

/* 分类页 */
.cat-layout { display: flex; height: calc(100vh - 52px); background: #fff; }
@media (min-width: 900px) { .cat-layout { height: auto; min-height: 620px; border-radius: 14px; margin-top: 16px; overflow: hidden; } }
.cat-side { width: 92px; flex: none; background: #f7f8fa; overflow-y: auto; }
@media (min-width: 900px) { .cat-side { width: 170px; } }
.cat-side a { display: block; padding: 15px 6px; text-align: center; font-size: 12px; color: var(--text2); border-left: 3px solid transparent; }
@media (min-width: 900px) { .cat-side a { padding: 16px; font-size: 14px; text-align: left; padding-left: 24px; } }
.cat-side a.on { background: #fff; color: var(--red); font-weight: 600; border-color: var(--red); }
/* 分类页：左侧「全部」固定置顶 */
.cat-side .cat-all { position: sticky; top: 0; z-index: 6; height: 46px; line-height: 46px; padding: 0 6px; background: #fff; box-shadow: 0 1px 0 #eef0f4; font-weight: 600; color: var(--text); border-left: 3px solid transparent; text-align: center; }
.cat-side .cat-all.on { color: var(--red); border-left-color: var(--red); }
@media (min-width: 900px) { .cat-side .cat-all { text-align: left; padding-left: 24px; font-size: 14px; } }
.cat-main { flex: 1; padding: 0 12px 90px; overflow-y: auto; position: relative; }
@media (min-width: 900px) { .cat-main { padding-bottom: 20px; } }
/* 分类页：右侧吸顶排序栏 */
.cat-sortbar { position: sticky; top: 0; z-index: 7; display: flex; align-items: center; gap: 6px; margin: 0 -12px 10px; padding: 9px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.cat-sortbar button { flex: 1; height: 30px; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 13px; color: var(--text2); border-radius: 6px; white-space: nowrap; }
.cat-sortbar button:hover { color: var(--red); }
.cat-sortbar button.on { color: var(--red); background: var(--red-light); font-weight: 600; }
.cat-pa { display: inline-flex; flex-direction: column; gap: 2px; }
.cat-pa b { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.cat-pa b.up { border-bottom: 5px solid #c8ccd4; }
.cat-pa b.down { border-top: 5px solid #c8ccd4; }
.cat-pa b.up.on { border-bottom-color: var(--red); }
.cat-pa b.down.on { border-top-color: var(--red); }
.cat-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 4px 2px 2px; }
.cat-list-head b { font-size: 14px; color: var(--text); }
.cat-list-head span { font-size: 11px; color: var(--muted); }
.cat-main .goods-grid { padding: 8px 0 16px; }
/* 分类页双列卡片较窄，收紧价格行避免加购按钮被卡片裁掉 */
.cat-main .goods-card .bottom { gap: 4px; }
.cat-main .goods-card .bottom > div { flex: 1; min-width: 0; }
.cat-main .goods-card .price { white-space: nowrap; }
.cat-main .goods-card .price del { display: none; }
.cat-main .goods-card .add { flex: none; }
.cat-banner { height: 88px; border-radius: 10px; display: flex; align-items: center; padding: 0 18px; color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 16px; }
.cat-block h4 { font-size: 13px; color: var(--text); margin: 16px 0 10px; display: flex; align-items: center; gap: 6px; }
.cat-block h4::before { content: ''; width: 3px; height: 13px; background: var(--red); border-radius: 2px; }
.cat-third { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 900px) { .cat-third { grid-template-columns: repeat(5, 1fr); } }
.cat-third a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--text2); }
.cat-third .ico { width: 58px; height: 58px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 700; }

/* 列表页工具条 */
.filter-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
@media (min-width: 900px) { .filter-bar { top: 74px; border-radius: 12px 12px 0 0; margin-top: 14px; } }
.filter-bar button { flex: 1; padding: 7px 4px; font-size: 12px; color: var(--text2); border-radius: 6px; }
.filter-bar button.on { color: var(--red); background: var(--red-light); font-weight: 600; }
.filter-bar .ic { width: 14px; height: 14px; }
.list-title { padding: 14px 14px 6px; font-size: 13px; color: var(--muted); }

/* 详情页 */
.detail-gallery { background: #fff; position: relative; }
.detail-gallery .main-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
@media (min-width: 900px) { .detail-gallery .main-img { height: 440px; aspect-ratio: auto; } }
.detail-gallery .thumbs { display: flex; gap: 8px; padding: 10px 14px; }
.detail-gallery .thumbs img { width: 54px; height: 54px; border-radius: 6px; object-fit: cover; border: 2px solid transparent; }
.detail-gallery .thumbs img.on { border-color: var(--red); }
.detail-gallery .fav { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; color: var(--muted); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.detail-gallery .fav.on { color: var(--red); }
@media (min-width: 900px) { .detail-layout { display: grid; grid-template-columns: 460px 1fr; gap: 20px; align-items: start; margin-top: 16px; } .detail-gallery { border-radius: 14px; overflow: hidden; } }
.detail-head { background: #fff; padding: 14px; }
.price-block { display: flex; align-items: baseline; gap: 8px; }
.price-block .now { color: var(--red); font-size: 28px; font-weight: 800; }
.price-block .now small { font-size: 15px; }
.price-block del { color: var(--muted); font-size: 12px; }
.price-block .tag { margin-left: auto; }
.detail-title { font-size: 17px; font-weight: 600; line-height: 1.45; margin: 8px 0 4px; }
.detail-sell { font-size: 12px; color: var(--muted); }
.detail-meta { display: flex; justify-content: space-between; padding: 10px 14px; background: #fff; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.detail-block { background: #fff; margin-top: 10px; padding: 14px; }
.detail-block h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.spec-list { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-list button { padding: 6px 14px; border: 1px solid #dfe3ea; border-radius: 6px; background: #fafbfc; font-size: 12px; }
.spec-list button.on { border-color: var(--red); color: var(--red); background: var(--red-light); }
.param-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.param-table td { padding: 9px 10px; border: 1px solid var(--line); }
.param-table td:first-child { width: 100px; background: #fafbfc; color: var(--muted); }
.detail-html { font-size: 13px; color: var(--text2); line-height: 1.9; }
.detail-html p { margin-bottom: 10px; }
.review-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border: 0; }
.review-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.review-top .avatar { width: 28px; height: 28px; border-radius: 50%; background: #ffe9ea; color: var(--red); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.stars { color: #ffb020; display: inline-flex; gap: 1px; }
.review-content { font-size: 13px; color: var(--text); margin: 7px 0; }
.review-tags span { display: inline-block; padding: 2px 7px; margin-right: 6px; border-radius: 3px; background: #f5f6f8; font-size: 11px; color: var(--muted); }
.detail-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; height: calc(62px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 12px env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0,0,0,.04); }
/* 移动端详情页：隐藏底部导航栏，避免盖住购买栏（购买栏自带「购物车/我的」入口） */
@media (max-width: 899px) {
  body.detail-mode .tabbar { display: none !important; }
  body.detail-mode .page { padding-bottom: 96px; }
  body.detail-mode .float-tools { bottom: 96px; }
}
.detail-bar-space { height: 84px; }
.detail-bar .minor { width: 46px; display: flex; flex-direction: column; align-items: center; font-size: 10px; color: var(--muted); gap: 2px; }
.detail-bar .act { flex: 1; display: flex; gap: 8px; }
.detail-bar .act .btn { flex: 1; height: 40px; border-radius: 20px; }
.detail-bar .act .btn.orange { background: linear-gradient(90deg, #ff9a2f, #ff6b2f); color: #fff; border: 0; }
.detail-bar .act .btn.primary { border-radius: 20px; }
/* 桌面端：吸底悬浮的购买条，任何滚动位置都能直接下单 */
@media (min-width: 900px) {
  .detail-bar { position: sticky; left: auto; right: auto; bottom: 18px; height: 68px; border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; margin-top: 18px; box-shadow: 0 8px 28px rgba(0,0,0,.14); }
  .detail-bar .minor { width: 62px; font-size: 11px; }
  .detail-bar .act { flex: 0 0 auto; margin-left: auto; }
  .detail-bar .act .btn { flex: 0 0 176px; height: 44px; font-size: 15px; }
  .detail-bar-space { display: none; }
  body.detail-mode .float-tools { bottom: 104px; }
}
.qty-ctrl { display: inline-flex; align-items: center; border: 1px solid #dfe3ea; border-radius: 6px; overflow: hidden; height: 30px; }
.qty-ctrl button { width: 30px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--text2); }
.qty-ctrl button:hover { background: #f4f5f7; }
.qty-ctrl span { min-width: 34px; text-align: center; font-size: 13px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

/* 购物车 */
.cart-list { padding: 12px; }
.cart-shop { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; padding: 10px 2px; }
.cart-item { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.cart-item img { width: 82px; height: 82px; border-radius: 8px; object-fit: cover; flex: none; }
.cart-item .c-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-item .c-name { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .c-spec { font-size: 11px; color: var(--muted); background: #f5f6f8; padding: 1px 7px; border-radius: 4px; align-self: flex-start; }
.cart-item .c-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 3px; }
.cart-item .price { font-size: 16px; }
.checkbox { width: 19px; height: 19px; border: 1.5px solid #c9ced8; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; }
.checkbox.on { background: var(--red); border-color: var(--red); }
.checkbox .ic { width: 13px; height: 13px; }
.checkout-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; height: 60px; background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 12px; }
@media (min-width: 900px) { .checkout-bar { position: static; border-radius: 12px; margin-top: 12px; box-shadow: var(--shadow); } }
/* 移动端：底部操作栏不被导航栏遮挡 */
@media (max-width: 899px) {
  .checkout-bar { height: calc(60px + env(safe-area-inset-bottom)); padding: 0 12px env(safe-area-inset-bottom); }
  /* 购物车页保留导航，结算栏浮在导航之上 */
  body[data-page="cart"] .checkout-bar { bottom: calc(58px + env(safe-area-inset-bottom)); }
  body[data-page="cart"] .page { padding-bottom: 146px; }
  body[data-page="cart"] .float-tools { bottom: 132px; }
  /* 确认订单 / 订单详情：隐藏导航栏，操作栏贴底 */
  body[data-page="checkout"] .tabbar,
  body[data-page="order"] .tabbar { display: none !important; }
  body[data-page="checkout"] .page,
  body[data-page="order"] .page { padding-bottom: 100px; }
}
.checkout-bar .total { flex: 1; text-align: right; font-size: 12px; color: var(--muted); }
.checkout-bar .total b { display: block; color: var(--red); font-size: 18px; }
.checkout-bar .btn { height: 40px; border-radius: 20px; padding: 0 24px; }

/* 表单型页面 */
.panel { background: #fff; margin: 12px; border-radius: 12px; overflow: hidden; }
@media (min-width: 900px) { .panel { margin: 16px 0 0; } }
.panel.pad { padding: 14px; }
.cell { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); background: #fff; font-size: 13px; }
.cell:last-child { border-bottom: 0; }
.cell:hover { background: #fcfcfd; }
.cell .ic:first-child { color: var(--muted); }
.cell .ic.arrow { color: #c8ccd4; width: 16px; }
.cell .label { flex: 1; }
.cell .value { color: var(--muted); font-size: 12px; max-width: 60%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell.click { cursor: pointer; }
.panel-title { padding: 14px 14px 6px; font-size: 13px; font-weight: 600; }
.addr-card { padding: 14px; display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.addr-card:last-child { border: 0; }
.addr-card .a-main { flex: 1; }
.addr-card .a-name { font-size: 14px; font-weight: 600; }
.addr-card .a-detail { font-size: 12px; color: var(--text2); margin-top: 5px; line-height: 1.6; }
.addr-card .tag { margin-left: 6px; }

/* 订单 */
.order-tabs { display: flex; background: #fff; position: sticky; top: 52px; z-index: 30; border-bottom: 1px solid var(--line); overflow-x: auto; }
@media (min-width: 900px) { .order-tabs { top: 74px; border-radius: 12px 12px 0 0; margin-top: 14px; } }
.order-tabs a { flex: none; padding: 12px 15px; font-size: 13px; color: var(--text2); border-bottom: 2px solid transparent; white-space: nowrap; }
.order-tabs a.on { color: var(--red); border-color: var(--red); font-weight: 600; }
.order-card { background: #fff; border-radius: 12px; margin: 12px; overflow: hidden; }
@media (min-width: 900px) { .order-card { margin: 14px 0 0; } }
.order-card .o-head { display: flex; justify-content: space-between; padding: 12px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.order-card .o-head .st { color: var(--red); font-weight: 600; }
.order-goods { display: flex; gap: 10px; padding: 12px 14px; }
.order-goods img { width: 74px; height: 74px; border-radius: 8px; object-fit: cover; }
.order-goods .g-info { flex: 1; min-width: 0; }
.order-goods .g-name { font-size: 13px; line-height: 1.4; }
.order-goods .g-spec { font-size: 11px; color: var(--muted); margin-top: 3px; }
.order-goods .g-right { text-align: right; font-size: 12px; color: var(--muted); }
.order-goods .g-right b { display: block; font-size: 14px; color: var(--text); }
.o-sum { text-align: right; padding: 0 14px 12px; font-size: 12px; color: var(--muted); }
.o-sum b { color: var(--text); font-size: 15px; }
.o-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.o-foot .btn { height: 30px; border-radius: 16px; padding: 0 14px; font-size: 12px; }
.o-foot .btn.primary { background: #fff; color: var(--red); border-color: var(--red); }

/* 会员中心 */
.me-head { background: linear-gradient(135deg, #ff6b6b, #f5333f); color: #fff; padding: 24px 16px 54px; position: relative; }
@media (min-width: 900px) { .me-head { border-radius: 14px; margin-top: 16px; padding: 30px 28px 62px; } }
.me-head .me-top { display: flex; align-items: center; gap: 12px; }
.avatar-lg { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: #fff; }
.me-head .me-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.me-cardbal { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 12px; background: rgba(255,255,255,.24); border: 1px solid rgba(255,255,255,.38); white-space: nowrap; }
.me-head .me-level { font-size: 11px; margin-top: 4px; display: inline-flex; padding: 2px 9px; border-radius: 10px; background: rgba(255,255,255,.22); }
.me-head .me-set { margin-left: auto; color: #fff; }
.me-assets { display: grid; grid-template-columns: repeat(4, 1fr); margin: -34px 12px 12px; background: #fff; border-radius: 14px; padding: 16px 0; position: relative; box-shadow: var(--shadow); }
@media (min-width: 900px) { .me-assets { margin: -40px 0 0; } }
.me-assets a { text-align: center; font-size: 11px; color: var(--muted); }
.me-assets b { display: block; font-size: 18px; color: var(--text); margin-bottom: 2px; }
.me-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 4px; padding: 18px 10px; }
@media (min-width: 900px) { .me-grid { grid-template-columns: repeat(6, 1fr); } }
.me-grid a { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11px; color: var(--text2); }
.me-grid .mi { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--red); }

/* 营销活动页 */
.act-hero { padding: 22px 16px; color: #fff; background: linear-gradient(135deg, #ff7043, #f5333f); }
.act-hero h2 { font-size: 24px; font-weight: 800; }
.act-hero p { font-size: 12px; opacity: .9; margin-top: 6px; }
.act-goods { background: #fff; border-radius: 12px; margin: 12px; display: flex; gap: 12px; padding: 12px; }
@media (min-width: 900px) { .act-goods { margin: 14px 0 0; } }
.act-goods img { width: 100px; height: 100px; border-radius: 8px; object-fit: cover; }
.act-goods .ag { flex: 1; display: flex; flex-direction: column; }
.act-goods .ag .name { font-size: 14px; font-weight: 500; }
.act-goods .ag .tip { font-size: 11px; color: var(--muted); margin: 4px 0; }
.act-goods .ag .bar { height: 8px; border-radius: 5px; background: #ffe8e9; overflow: hidden; margin: 6px 0; }
.act-goods .ag .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff9a2f, var(--red)); }
.act-goods .ag .bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.act-goods .ag .btn { height: 30px; border-radius: 16px; font-size: 12px; }

/* 优惠券 */
.coupon-card { display: flex; margin: 12px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
@media (min-width: 900px) { .coupon-card { margin: 14px 0 0; } }
.coupon-card .l { width: 112px; flex: none; padding: 20px 8px; text-align: center; color: #fff; background: linear-gradient(135deg, #ff7b6b, #f5333f); }
.coupon-card .l b { font-size: 32px; display: block; line-height: 1; }
.coupon-card .l small { font-size: 11px; }
.coupon-card .r { flex: 1; padding: 14px; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.coupon-card .r b { font-size: 14px; }
.coupon-card .r span { font-size: 11px; color: var(--muted); }
.coupon-card .r button { position: absolute; right: 26px; }
.coupon-card { position: relative; }
.coupon-card .get { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); height: 28px; padding: 0 12px; border-radius: 14px; background: var(--red); color: #fff; font-size: 12px; }
.coupon-card.used .l { background: #c7cbd3; }
.coupon-card.used .get { display: none; }

/* 结算/支付 */
.pay-types .cell .ic { color: #09bb07; }
.pay-types .cell .ic.ali { color: #1677ff; }
.pay-types .cell .ic.bal { color: var(--orange); }
.pay-success { text-align: center; padding: 54px 20px 30px; background: #fff; }
.pay-success .ok { width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 16px; background: #e7f9f3; color: #0ba87e; display: flex; align-items: center; justify-content: center; }
.pay-success h2 { font-size: 20px; }
.pay-success p { color: var(--muted); font-size: 13px; margin: 8px 0 24px; }
.pay-success .btn { margin: 0 6px; }

/* 登录 */
.login-wrap { max-width: 420px; margin: 0 auto; padding: 46px 24px; }
.login-logo { text-align: center; margin-bottom: 34px; }
.login-logo .mark { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 20px; background: linear-gradient(135deg, #ff6b6b, #f5333f); color: #fff; font-size: 34px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(245,51,63,.28); }
.login-logo h1 { font-size: 22px; color: var(--red); }
.login-logo p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.login-wrap .btn.lg { margin-top: 10px; }
.login-tip { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }
.login-tip a { color: var(--red); }

/* 页脚（PC） */
.footer { display: none; }
@media (min-width: 900px) {
  .footer { display: block; margin-top: 44px; padding: 30px 0 40px; border-top: 1px solid var(--line); background: #fff; }
  .footer .f-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 30px; }
  .footer h4 { font-size: 14px; margin-bottom: 12px; }
  .footer p, .footer a { display: block; font-size: 12px; color: var(--muted); line-height: 2; }
  .footer a:hover { color: var(--red); }
  .footer .copy { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--muted); }
}

/* 悬浮客服 */
.float-tools { position: fixed; right: 12px; bottom: 78px; z-index: 55; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 900px) { .float-tools { right: 24px; bottom: 30px; } }
.float-tools button { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 3px 12px rgba(0,0,0,.12); color: var(--text2); display: flex; align-items: center; justify-content: center; }
.float-tools button:hover { color: var(--red); }

/* 子页通用 */
.sub-page { min-height: calc(100vh - 52px); }
.sub-title { padding: 14px; font-size: 13px; color: var(--muted); }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; padding: 16px 0; margin: 12px; border-radius: 12px; }
.stat-strip a { text-align: center; font-size: 11px; color: var(--muted); }
.stat-strip b { display: block; font-size: 20px; color: var(--text); }
.points-hero { background: linear-gradient(135deg, #ffb347, #ff7a2f); color: #fff; padding: 26px 18px; margin: 12px; border-radius: 14px; }
.points-hero b { font-size: 36px; display: block; }
.points-hero span { font-size: 12px; opacity: .9; }
.log-item { display: flex; justify-content: space-between; padding: 13px 14px; border-bottom: 1px solid var(--line); background: #fff; font-size: 13px; }
.log-item:last-child { border: 0; }
.log-item small { display: block; color: var(--muted); font-size: 11px; }
.log-item .v { font-weight: 600; color: var(--red); }
.log-item .v.minus { color: #0ba87e; }

/* 商品详情：服务标签 / 装修组件 */
.detail-svc { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 10px 0 0; }
.detail-svc span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 4px; background: #f4f7fd; color: #5c6270; font-size: 11.5px; }
.detail-comp { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; padding: 10px 12px; border: 1px dashed #dfe6f2; border-radius: 6px; background: #fafbfe; font-size: 12.5px; }
.detail-comp b { color: #3c4250; font-weight: 500; }
.detail-comp span { color: #a8b0be; font-size: 11px; }
/* 顶栏昵称后的「优惠卡余额」胶囊：与现金余额区分 */
.pc-cardbal { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 10px; background: #fff1f2; color: #f5333f; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* ============ 页面设计区块（由后台「页面设计」驱动渲染） ============ */
.dr-blk { padding: 0; }
.dr-search { display: flex; align-items: center; gap: 8px; height: 38px; margin: 12px; padding: 0 14px; background: #F5F5F5; font-size: 13px; color: #8a93a3; }
.dr-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-sign { display: flex; flex-direction: column; gap: 3px; margin: 12px; padding: 16px 14px; border-radius: 12px; }
.dr-sign b { font-size: 17px; }
.dr-sign em { font-style: normal; font-size: 12px; opacity: .85; }
.dr-list { margin: 12px; background: #fff; border-radius: 12px; overflow: hidden; }
.dr-list-i { display: flex; align-items: center; gap: 10px; padding: 13px 14px; font-size: 13px; color: var(--text); }
.dr-list-i + .dr-list-i { border-top: 1px solid var(--line); }
.dr-list.noline .dr-list-i + .dr-list-i { border-top: 0; }
.dr-list-i b { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-img { height: 120px; margin: 12px; border-radius: 10px; }
.dr-imgs { display: grid; gap: 6px; margin: 12px; }
.dr-imgs i { display: block; height: 72px; border-radius: 8px; }
.dr-video { position: relative; height: 180px; margin: 12px; border-radius: 10px; }
.dr-video .play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(255, 255, 255, .9); }
.dr-video .play::after { content: ''; position: absolute; left: 17px; top: 13px; border-left: 14px solid #2F3A48; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.dr-text { margin: 12px; line-height: 1.75; }
.dr-rich { margin: 12px; font-size: 13px; line-height: 1.8; color: var(--text2); }
.dr-btn { display: block; margin: 12px; padding: 12px 0; text-align: center; color: #fff; font-size: 15px; font-weight: 600; }
.dr-line { margin: 12px; }
.dr-tabs { display: flex; gap: 20px; margin: 12px; padding-bottom: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.dr-tabs i { flex: none; padding-bottom: 7px; border-bottom: 2px solid transparent; font-style: normal; font-size: 14px; color: var(--text2); }
/* 悬浮按钮：位置 / 尺寸 / 圆角 / 配色 / 边框全部来自后台设置，居中对齐坐标点 */
.dr-float { position: fixed; z-index: 60; display: grid; place-items: center; overflow: hidden; transform: translate(-50%, -50%); box-shadow: 0 4px 14px rgba(0,0,0,.18); text-decoration: none; line-height: 1.1; text-align: center; }
.dr-float-tx { white-space: nowrap; }
.dr-float-ic { display: grid; place-items: center; overflow: hidden; }
.dr-float-img { width: 100%; height: 100%; object-fit: cover; }
.dr-float-swatch { display: block; width: 100%; height: 100%; }
.dr-map { display: grid; place-items: center; gap: 6px; margin: 12px; border-radius: 10px; background: #E8EEF6; color: #5b6678; font-size: 12px; }
.dr-map em { font-style: normal; }
.dr-featured { display: flex; flex-direction: column; gap: 4px; margin: 12px; padding: 16px; border-radius: 12px; background: linear-gradient(135deg, #FFEEDD, #FFD9C2); }
.dr-featured b { font-size: 16px; color: #8a4b18; }
.dr-featured span { font-size: 12px; color: #a9764a; }
.dr-art { display: block; margin: 0 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dr-art b { display: block; font-size: 14px; font-weight: 500; color: var(--text); }
.dr-art em { display: block; margin-top: 4px; font-style: normal; font-size: 12px; line-height: 1.6; color: var(--text3); }
.dr-member { display: flex; align-items: center; gap: 10px; margin: 12px; padding: 16px; border-radius: 12px; color: #fff; }
.dr-member i { flex: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.dr-member div { flex: 1; min-width: 0; }
.dr-member b { display: block; font-size: 15px; }
.dr-member em { font-style: normal; font-size: 12px; opacity: .85; }
.dr-member u { text-decoration: none; font-size: 12px; opacity: .92; }
.dr-svs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px; }
.dr-sv { position: relative; height: 120px; border-radius: 10px; background: #8FA9C6; }
.dr-sv .play { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 255, 255, .9); }
.dr-sv .play::after { content: ''; position: absolute; left: 13px; top: 10px; border-left: 11px solid #2F3A48; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.dr-live { display: flex; align-items: center; gap: 8px; margin: 12px; padding: 14px; border-radius: 10px; background: #2F3A48; color: #fff; }
.dr-live .tag { padding: 2px 6px; border-radius: 3px; background: #f5333f; font-size: 11px; }
.dr-form { margin: 12px; padding: 14px; border-radius: 12px; background: #fff; }
.dr-form b { display: block; margin-bottom: 8px; font-size: 14px; }
.dr-form-i { margin-bottom: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--text3); }
.dr-form span { display: block; margin-top: 8px; padding: 10px 0; border-radius: 8px; background: var(--red); color: #fff; text-align: center; font-size: 14px; }
.dr-ad { margin: 12px; padding: 18px; border-radius: 10px; background: #EEF2F7; text-align: center; color: var(--text3); }
.dr-ad b { display: block; font-size: 20px; color: #b3bcc9; }
.dr-ad em { font-style: normal; font-size: 11px; }
@media (min-width: 900px) {
  .dr-search, .dr-sign, .dr-list, .dr-img, .dr-imgs, .dr-video, .dr-text, .dr-rich,
  .dr-btn, .dr-line, .dr-tabs, .dr-map, .dr-featured, .dr-art, .dr-member, .dr-svs,
  .dr-live, .dr-form, .dr-ad { margin: 14px 0 0; }
}

/* 按钮导航（设计器渲染）：文字不倾斜、图标尺寸由设计参数控制 */
.dr-nav-grid em { font-style: normal; }
.dr-nav-grid .quick-ico { flex: none; }

/* ============ 前台：地图组件（与后台设计设置对应） ============ */
.dr-mapnew { position: relative; overflow: hidden; }
.dr-mapgrid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px); background-size: 28px 28px; }
.dr-mappin { position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%); display: grid; justify-items: center; gap: 3px; color: #E8564B; }
.dr-mappin em { font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 4px; background: #fff; color: #333; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.14); }
.dr-mapzoom { position: absolute; right: 8px; bottom: 8px; font-size: 11px; color: #6b7a90; background: rgba(255,255,255,.85); padding: 2px 7px; border-radius: 4px; }
.dr-mapinfo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.dr-mapinfo-tx { flex: 1; min-width: 0; display: grid; gap: 3px; }
.dr-mapinfo-tx b { font-size: 14px; color: #2c3444; }
.dr-mapinfo-tx em { font-style: normal; font-size: 12px; color: #8b95a5; }
.dr-mapinfo-tx a { font-size: 12px; color: #2f7bff; text-decoration: none; }
.dr-mapnav { flex: none; padding: 6px 12px; border-radius: 16px; background: #2f7bff; color: #fff; font-size: 12px; text-decoration: none; }

/* 悬浮按钮：后台「距左端 100%」时避免贴边被裁切 */
@media (max-width: 600px) {
  .dr-float { max-width: 92vw; max-height: 92vh; }
}
