/* ============================================================
   运动家商城 · 顾客端 UI v2（批次B · 设计语言）
   白底极简 · 国民级电商范（京东/天猫/拼多多/瑞幸）
   ============================================================ */

/* ---------- 设计 Token ---------- */
:root {
  --bg: #FFFFFF;
  --bg-sec: #FAFAFA;
  --brand: #1E40AF;        /* 深邃皇家蓝 */
  --brand-dark: #1E3A8A;
  --accent: #EF4444;       /* 价格 / CTA / 活动 */
  --warn: #F59E0B;         /* 琥珀橙：凑单/角标 */
  --text: #1F2937;         /* 近黑主文字 */
  --text2: #6B7280;        /* 中性灰次文字 */
  --text3: #9CA3AF;        /* 弱文字 */
  --success: #10B981;
  --danger: #EF4444;
  --line: #F3F4F6;
  --r-card: 12px;
  --r-btn: 8px;
  --r-full: 999px;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-h: 0 6px 18px rgba(0,0,0,.08);
  --f-price: 800;
  --f-name: 600;
}
@media (max-width: 768px) {
  :root { --r-card: 8px; --r-btn: 999px; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
img { display: block; }
input, select { padding: 10px 12px; border: 1px solid #E5E7EB; border-radius: var(--r-btn); font-size: 14px; width: 100%; background: #fff; color: var(--text); outline: none; }
input:focus, select:focus { border-color: var(--brand); }

.shop-app { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶栏 ---------- */
.shop-header {
  display: flex; align-items: center; gap: 14px; padding: 12px 0;
  position: sticky; top: 0; background: var(--bg); z-index: 50;
  border-bottom: 1px solid var(--line);
}
.shop-logo { font-size: 21px; font-weight: 800; color: var(--brand); white-space: nowrap; letter-spacing: .5px; }
.shop-search { flex: 1; max-width: 420px; position: relative; }
.shop-search input { border-radius: var(--r-full); background: var(--bg-sec); border: 1px solid transparent; transition: all .2s; }
.shop-search input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,64,175,.08); }
.shop-header-nav { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hn-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--text2); padding: 4px 8px; border-radius: 8px; cursor: pointer; transition: all .2s; }
.hn-item .hn-ico { font-size: 20px; line-height: 1; }
.hn-item:hover { color: var(--brand); background: var(--bg-sec); }
.shop-cart a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--text2); padding: 4px 8px; border-radius: 8px; }
.shop-cart a:hover { color: var(--brand); background: var(--bg-sec); }
.shop-cart a .hn-ico { font-size: 20px; }
.cart-count { position: absolute; top: -2px; right: 2px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; border-radius: var(--r-full); padding: 0 5px; min-width: 16px; text-align: center; line-height: 16px; }
.shop-user { font-size: 13px; color: var(--brand); white-space: nowrap; }
.uname { font-weight: 600; color: var(--text); }

/* ---------- 分类条 ---------- */
.shop-cats { display: flex; gap: 8px; padding: 12px 0 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.shop-cats::-webkit-scrollbar { display: none; }
.cat { padding: 6px 15px; background: var(--bg-sec); color: var(--text2); border-radius: var(--r-full); font-size: 13px; cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: all .2s; }
.cat:hover { color: var(--brand); }
.cat.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }

/* ---------- Banner 轮播 ---------- */
.shop-banner { margin: 10px 0 6px; }
.bn-slider { position: relative; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); }
.bn-track { display: flex; transition: transform .4s ease; }
.bn-slide { position: relative; flex: 0 0 100%; cursor: pointer; }
.bn-slide img, .bn-slide .bn-banner { width: 100%; }
.bn-banner { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; padding: 26px 24px; min-height: 120px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.bn-banner.warn { background: linear-gradient(135deg, #F59E0B, #EA580C); }
.bn-banner.hot { background: linear-gradient(135deg, #EF4444, #DC2626); }
.bb-tag { align-self: flex-start; background: rgba(255,255,255,.22); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 4px; }
.bb-name { font-size: 22px; font-weight: 800; }
.bb-sub { font-size: 13px; opacity: .85; }
.bn-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.bn-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); transition: all .3s; }
.bn-dots i.on { background: #fff; width: 16px; border-radius: var(--r-full); }

/* ---------- 商品列表 ---------- */
.shop-main { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; padding: 12px 0 40px; }
.s-card {
  position: relative; background: var(--bg); border-radius: var(--r-card);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.s-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); }
.s-img { position: relative; aspect-ratio: 1/1; background: var(--bg-sec); overflow: hidden; }
.s-img img { width: 100%; height: 100%; object-fit: cover; }
.s-img img.lazy { filter: blur(4px); }
.s-img img.loaded { filter: none; transition: filter .3s ease; }
.s-ph-img { width: 100%; height: 100%; object-fit: cover; }
.s-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px;
}
.s-badge.warn { background: var(--warn); }
.s-body { padding: 9px 10px 10px; }
.s-name { font-size: 14px; font-weight: var(--f-name); color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.s-sub { font-size: 12px; color: var(--text3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 8px; }
.s-price { color: var(--accent); font-weight: var(--f-price); font-size: 22px; line-height: 1; }
.s-price small { font-size: 13px; }
.s-orig { color: var(--text3); text-decoration: line-through; font-size: 12px; margin-left: 6px; font-weight: 400; }
.s-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.s-sold { font-size: 12px; color: var(--text3); }
.s-stock { font-size: 12px; color: var(--text3); }
.s-stock.red { color: var(--danger); font-weight: 600; }
.shop-empty { text-align: center; color: var(--text3); padding: 80px 0; font-size: 15px; }

/* ---------- 骨架屏 ---------- */
.sk { background: linear-gradient(90deg, var(--bg-sec) 25%, #F0F2F5 37%, var(--bg-sec) 63%); background-size: 400% 100%; animation: skload 1.5s infinite; border-radius: var(--r-card); }
@keyframes skload { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- 商品详情 ---------- */
.detail-mask { position: fixed; inset: 0; background: rgba(17,24,39,.55); align-items: center; justify-content: center; z-index: 100; }
.detail-modal { background: var(--bg); border-radius: var(--r-card); width: 760px; max-width: 95vw; max-height: 88vh; overflow-y: auto; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.detail-close { position: absolute; top: 12px; right: 14px; font-size: 18px; cursor: pointer; z-index: 10; background: rgba(255,255,255,.9); width: 30px; height: 30px; border-radius: 50%; text-align: center; line-height: 30px; box-shadow: var(--shadow); }
.detail-top { display: flex; gap: 24px; padding: 24px; }
.detail-img { flex: 1; background: var(--bg-sec); border-radius: var(--r-card); min-height: 260px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail-img img { max-width: 100%; max-height: 340px; object-fit: contain; }
.detail-info { flex: 1; display: flex; flex-direction: column; }
.d-price { font-size: 30px; font-weight: var(--f-price); color: var(--accent); margin-bottom: 6px; }
.d-price .d-orig { font-size: 15px; }
.d-countdown { align-self: flex-start; background: #FEF3C7; color: #92400E; font-size: 13px; padding: 5px 11px; border-radius: 6px; margin-bottom: 10px; font-weight: 600; }
.detail-info h2 { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.d-sub { font-size: 14px; color: var(--text2); margin-bottom: 10px; }
.d-meta { color: var(--text3); font-size: 13px; margin-bottom: 10px; }
.d-stock { font-size: 14px; margin-bottom: 8px; color: var(--text2); }
.detail-body { padding: 0 24px 20px; }
.detail-body h4 { font-size: 15px; margin-bottom: 8px; color: var(--text); }
.d-detail { font-size: 14px; line-height: 1.75; color: var(--text2); background: var(--bg-sec); border-radius: var(--r-card); padding: 14px; margin-bottom: 12px; }
.d-jd { font-size: 12px; color: var(--brand); }
.d-skus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.d-label { font-size: 14px; color: var(--text2); }
.d-sku { padding: 7px 15px; border: 1px solid #E5E7EB; border-radius: var(--r-btn); background: #fff; cursor: pointer; font-size: 13px; color: var(--text2); transition: all .2s; }
.d-sku.active { border-color: var(--brand); color: var(--brand); background: rgba(30,64,175,.05); font-weight: 600; }
.d-desc { margin-top: 12px; color: var(--text2); font-size: 14px; line-height: 1.7; }
.detail-foot { padding: 14px 24px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--bg); }
.btn-add, .btn-pay { border: none; border-radius: var(--r-btn); cursor: pointer; font-weight: 700; transition: transform .1s, opacity .2s; }
.btn-add { width: 100%; padding: 14px; background: var(--accent); color: #fff; font-size: 16px; }
.btn-add:active { transform: scale(.97); }
.btn-pay { padding: 12px 22px; background: var(--accent); color: #fff; font-size: 15px; }
.btn-pay:active { transform: scale(.97); }

/* ---------- 购物车 ---------- */
.cart-list { padding: 16px 24px; }
.cart-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ci-name { flex: 1; }
.ci-name small { color: var(--text3); }
.ci-price { width: 80px; text-align: right; font-weight: 600; color: var(--accent); }
.ci-qty { width: 40px; text-align: center; color: var(--text2); }
.ci-del, .cart-item .del { border: none; background: #FEF2F2; color: var(--danger); padding: 5px 9px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.cart-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--bg); }
.cart-total { font-size: 18px; font-weight: 800; color: var(--accent); }
.cart-fr { margin: 10px 0; padding: 9px 12px; border-radius: var(--r-card); background: #FFF7ED; color: #C2410C; font-size: 13px; font-weight: 600; }
.shop-stringing { margin: 10px 0; padding: 10px; background: var(--bg-sec); border-radius: var(--r-card); }

/* ---------- 登录 / 结算 ---------- */
.modal-title { padding: 16px 24px; font-size: 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.pay-body { padding: 20px 24px; }
.lt-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.lt-tabs .lt { padding: 7px 18px; border-radius: var(--r-full); background: var(--bg-sec); cursor: pointer; font-size: 14px; color: var(--text2); }
.lt-tabs .lt.active { background: var(--brand); color: #fff; font-weight: 600; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; color: var(--text3); margin-bottom: 4px; }
.form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.pay-actions { margin-top: 16px; }
.pay-hint { margin-top: 12px; font-size: 12px; color: var(--text3); }
.btn-block { width: 100%; }
.l-err { color: var(--danger); font-size: 13px; margin-top: 8px; min-height: 18px; }
.l-tip { color: var(--text3); font-size: 12px; margin-top: 8px; }
.coupon-row { margin-bottom: 10px; }
.addr-row { margin-bottom: 10px; }
.pay-sum { color: var(--text2); font-size: 13px; margin-bottom: 12px; line-height: 1.5; }

/* ---------- Toast / 通用 ---------- */
.toast { position: fixed; top: 20px; right: 20px; background: var(--brand); color: #fff; padding: 12px 18px; border-radius: var(--r-card); z-index: 200; font-size: 14px; opacity: 0; transform: translateY(-10px); transition: all .25s; box-shadow: var(--shadow-h); }
.toast.show { opacity: 1; transform: translateY(0); }
.empty { text-align: center; color: var(--text3); padding: 30px; font-size: 13px; }
.gray { color: var(--text3); }
.red { color: var(--danger); }

/* ---------- 手机底部 Tab ---------- */
.shop-bottom-nav { display: none; }
@media (max-width: 768px) {
  .shop-bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 58px; background: #fff; border-top: 1px solid var(--line); z-index: 90; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0,0,0,.04); }
  .bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text3); font-size: 11px; position: relative; transition: color .2s; }
  .bn-item .bn-ico { font-size: 21px; line-height: 1; }
  .bn-item.active { color: var(--brand); font-weight: 600; }
  .bn-item .cart-count { position: absolute; top: 3px; right: calc(50% - 22px); }
  .shop-app { padding-bottom: 80px; }
  .shop-header { flex-wrap: wrap; gap: 8px; padding: 10px 0; }
  .shop-search { flex: 1 1 100%; order: 3; max-width: none; }
  .shop-logo { font-size: 18px; }
  .detail-modal { width: 100%; max-width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .detail-mask { align-items: flex-end; }
  .detail-top { flex-direction: column; padding: 16px; }
  .detail-img { min-height: 0; aspect-ratio: 1/1; }
  .detail-img img { max-height: none; width: 100%; height: 100%; object-fit: contain; }
  .detail-body { padding: 0 16px 16px; }
  .detail-foot { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); }
  .shop-cats { margin-top: 6px; }
  .shop-cats::after { content: ''; position: sticky; right: -2px; float: right; width: 30px; height: 36px; margin-left: -30px; background: linear-gradient(to left, #fff, rgba(255,255,255,0)); pointer-events: none; }
  .s-img { aspect-ratio: 1/1; }
  .form-row { flex-wrap: wrap; }
  .form-row input { flex: 1 1 100% !important; margin-bottom: 8px; }
}
@media (min-width: 1200px) {
  .shop-main { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}

/* ============================================================
   批次C：8 大页面改造样式
   ============================================================ */
.mp-head { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mp-head b { flex: 1; font-size: 16px; }
.btn.btn-sm { padding: 6px 14px; border: 1px solid #E5E7EB; background: #fff; border-radius: var(--r-btn); font-size: 13px; cursor: pointer; color: var(--text); }
.btn.btn-sm:active { transform: scale(.97); }

/* ---------- 首页：快捷入口 + 秒杀 ---------- */
.section-title { font-size: 17px; font-weight: 700; padding: 16px 0 10px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 0; }
.q-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; cursor: pointer; border-radius: var(--r-card); transition: background .2s; }
.q-item:hover { background: var(--bg-sec); }
.q-ico { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.q-ico.b1 { background: #EFF6FF; } .q-ico.b2 { background: #FEF3C7; } .q-ico.b3 { background: #FEE2E2; } .q-ico.b4 { background: #D1FAE5; }
.q-item span { font-size: 12px; color: var(--text2); }
.flash-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 6px 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.flash-scroll::-webkit-scrollbar { display: none; }
.flash-card { flex: 0 0 140px; background: var(--bg); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; }
.flash-card .s-img { aspect-ratio: 1/1; }
.flash-card .fc-body { padding: 8px; }
.flash-card .fc-price { color: var(--accent); font-weight: 800; font-size: 18px; }

/* ---------- 详情独立页 ---------- */
.d-gallery { display: flex; gap: 8px; overflow-x: auto; background: var(--bg-sec); border-radius: var(--r-card); padding: 8px; scrollbar-width: none; }
.d-gallery::-webkit-scrollbar { display: none; }
.d-gallery img { width: 100%; max-width: 420px; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.d-info { padding: 14px 2px 20px; }
.d-price-row { font-size: 30px; font-weight: 800; color: var(--accent); display: flex; align-items: baseline; gap: 10px; }
.d-price-row .d-orig { font-size: 15px; color: var(--text3); text-decoration: line-through; font-weight: 400; }
.d-countdown { margin: 8px 0; }
.d-info h2 { font-size: 22px; font-weight: 700; margin: 4px 0; }
.d-sub { font-size: 14px; color: var(--text2); margin-bottom: 8px; }
.d-meta { font-size: 13px; color: var(--text3); margin-bottom: 8px; }
.d-skus { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.d-service { font-size: 13px; color: var(--success); padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 10px 0; }
.d-addr { font-size: 13px; color: var(--text2); margin-bottom: 10px; }
.d-info h4 { font-size: 15px; margin: 16px 0 8px; }
.d-reviews .rv { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rv .rv-head { color: var(--text2); font-size: 13px; margin-bottom: 4px; }
.rv .rv-stars { color: var(--warn); }
.rv .rv-body { color: var(--text); }
.rv .rv-none { color: var(--text3); }
.d-detail { font-size: 14px; line-height: 1.75; color: var(--text2); background: var(--bg-sec); border-radius: var(--r-card); padding: 14px; }
.d-reco { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.d-reco::-webkit-scrollbar { display: none; }
.d-reco .s-card { flex: 0 0 140px; }
.detail-foot { display: flex; gap: 8px; align-items: stretch; }
.bf-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid #E5E7EB; background: #fff; border-radius: var(--r-btn); cursor: pointer; font-size: 12px; color: var(--text2); }
.bf-btn span { font-size: 20px; }
.btn-buy { flex: 2; border: none; background: var(--accent); color: #fff; border-radius: var(--r-btn); font-size: 16px; font-weight: 700; cursor: pointer; }
.btn-buy:active { transform: scale(.97); }

/* ---------- 购物车独立页 ---------- */
.cart-select-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.cart-select-row .ck { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.cart-select-row input[type=checkbox] { width: 18px; height: 18px; }
.cart-edit { color: var(--brand); font-size: 13px; cursor: pointer; }
.cart-list-page { padding: 4px 0; }
.cart-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.cart-row input[type=checkbox] { width: 18px; height: 18px; }
.cr-img { width: 74px; height: 74px; border-radius: var(--r-card); overflow: hidden; background: var(--bg-sec); flex-shrink: 0; }
.cr-img img { width: 100%; height: 100%; object-fit: cover; }
.cr-info { flex: 1; min-width: 0; }
.cr-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-spec { font-size: 12px; color: var(--text3); }
.cr-price { color: var(--accent); font-weight: 700; font-size: 15px; margin-top: 4px; }
.cr-qty { display: flex; align-items: center; gap: 6px; }
.cr-qty button { width: 26px; height: 26px; border: 1px solid #E5E7EB; background: #fff; border-radius: 6px; cursor: pointer; font-size: 14px; }
.cr-qty button:active { transform: scale(.95); }
.cr-qty .qty-num { width: 30px; text-align: center; font-size: 14px; }
.cr-del { border: none; background: #FEF2F2; color: var(--danger); width: 26px; height: 26px; border-radius: 6px; cursor: pointer; }
.cart-reco { margin-top: 16px; }
.cart-reco h4 { font-size: 15px; margin-bottom: 8px; }
.rec-list { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.rec-list::-webkit-scrollbar { display: none; }
.rec-list .s-card { flex: 0 0 140px; }
.cart-foot-fixed { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }

/* ---------- 个人中心 ---------- */
.me-head { display: flex; align-items: center; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.me-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.me-id h2 { font-size: 18px; }
.me-id p { font-size: 13px; color: var(--text3); margin-top: 4px; }
.me-stats { display: flex; gap: 20px; margin-top: 8px; }
.me-stats b { font-size: 16px; color: var(--text); }
.me-stats span { font-size: 12px; color: var(--text3); }
.me-order-tabs { display: flex; border-bottom: 1px solid var(--line); margin: 14px 0; }
.me-order-tabs .mot { flex: 1; text-align: center; padding: 10px 0; font-size: 14px; color: var(--text2); cursor: pointer; border-bottom: 2px solid transparent; }
.me-order-tabs .mot.active { color: var(--brand); font-weight: 600; border-color: var(--brand); }
.me-orders .mo-card { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.mo-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.mo-head .mo-no { font-size: 12px; }
.mo-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.mo-item .mo-amount { color: var(--accent); font-weight: 700; }
.mo-ops { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.mo-ops .btn-xs { padding: 5px 12px; border: 1px solid #E5E7EB; background: #fff; border-radius: var(--r-btn); font-size: 12px; cursor: pointer; }
.mo-ops .btn-xs.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.mo-ops .btn-xs.danger { color: var(--danger); border-color: #FECACA; }
.me-func { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.mf-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; cursor: pointer; border-radius: var(--r-card); }
.mf-item:hover { background: var(--bg-sec); }
.mf-item .mf-ico { font-size: 24px; }
.mf-item span { font-size: 12px; color: var(--text2); }
.me-empty { color: var(--text3); text-align: center; padding: 30px 0; font-size: 13px; }

/* ---------- 分类页 ---------- */
.cat-layout { display: flex; gap: 12px; min-height: 60vh; }
.cat-side { width: 92px; flex-shrink: 0; border-right: 1px solid var(--line); }
.cat-side .cs-item { padding: 14px 10px; font-size: 14px; color: var(--text2); cursor: pointer; text-align: center; border-left: 3px solid transparent; }
.cat-side .cs-item.active { color: var(--brand); font-weight: 600; background: var(--bg-sec); border-left-color: var(--brand); }
.cat-right { flex: 1; }
.cat-right .cr-title { font-size: 15px; font-weight: 700; padding: 6px 0 10px; }
.cat-right .shop-main { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

/* ---------- 搜索页 ---------- */
.search-hist { padding: 10px 0; }
.search-hist .sh-t { font-size: 13px; color: var(--text3); margin-bottom: 8px; }
.search-hist .sh-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-tag { padding: 5px 12px; background: var(--bg-sec); border-radius: var(--r-full); font-size: 13px; cursor: pointer; }
.search-filter { display: flex; gap: 6px; padding: 8px 0 12px; }
.search-filter .sf { padding: 6px 12px; font-size: 13px; color: var(--text2); cursor: pointer; border-radius: var(--r-btn); }
.search-filter .sf.active { color: var(--brand); font-weight: 600; background: rgba(30,64,175,.08); }
.sf-empty { color: var(--text3); text-align: center; padding: 40px 0; font-size: 14px; }
.sf-empty b { color: var(--brand); }

/* ---------- 活动落地页 ---------- */
.p-banner { position: relative; border-radius: var(--r-card); overflow: hidden; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; padding: 24px; }
.p-banner.warn { background: linear-gradient(135deg, #F59E0B, #EA580C); }
.p-banner.hot { background: linear-gradient(135deg, var(--accent), #DC2626); }
.p-banner .p-tag { font-size: 11px; font-weight: 700; background: rgba(255,255,255,.25); padding: 3px 9px; border-radius: 4px; }
.p-banner h2 { font-size: 24px; margin-top: 10px; }
.p-banner p { font-size: 13px; opacity: .85; margin-top: 6px; }
.p-countdown { font-size: 14px; color: #92400E; background: #FEF3C7; padding: 8px 12px; border-radius: var(--r-btn); margin: 12px 0; }
.p-rules { font-size: 13px; color: var(--text2); background: var(--bg-sec); border-radius: var(--r-card); padding: 12px; margin-bottom: 12px; }

/* ---------- 客服浮动按钮 ---------- */
.service-float { position: fixed; right: 18px; bottom: 84px; width: 50px; height: 50px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 4px 16px rgba(30,64,175,.4); cursor: pointer; z-index: 95; transition: transform .2s; }
.service-float:hover { transform: scale(1.08); }

/* 搜索按钮 */
.btn-kw { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: var(--brand); color: #fff; padding: 7px 14px; border-radius: var(--r-full); font-size: 13px; cursor: pointer; }
.shop-search input { padding-right: 64px; }

@media (max-width: 768px) {
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .d-gallery img { max-width: 100%; }
  .me-func { grid-template-columns: repeat(4, 1fr); }
  .detail-foot { padding: 10px 2px calc(10px + env(safe-area-inset-bottom)); }
  .cart-foot-fixed { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ==================== 批次D · 动效与精修 ==================== */
/* D-01 骨架屏：灰底 + 微光渐变动画 1.5s 循环 */
.sk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sk-card { background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.sk-img { aspect-ratio: 1; border-radius: 8px; background: linear-gradient(100deg, #f3f4f6 40%, #e5e7eb 50%, #f3f4f6 60%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.sk-line { height: 12px; border-radius: 6px; margin-top: 8px; background: linear-gradient(100deg, #f3f4f6 40%, #e5e7eb 50%, #f3f4f6 60%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (max-width: 768px) { .sk-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* D-05 商品图模糊渐显：blur → 清晰 */
.s-img img.lazy.loaded, .d-gallery img.loaded { animation: imgFade .5s ease; }
@keyframes imgFade { from { filter: blur(12px); opacity: .4; } to { filter: blur(0); opacity: 1; } }

/* D-02 加购数字飞入 */
.fly-plus { position: fixed; z-index: 9999; font-weight: 800; color: #EF4444; font-size: 18px; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.1); }
.cart-count.bump, #bn-cart-count.bump { animation: bump .4s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }

/* D-03 路由过渡 */
.view-in { animation: viewFade .28s ease; }
@keyframes viewFade { from { opacity: .4; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.detail-slide { animation: slideRight .3s ease; }
@keyframes slideRight { from { transform: translateX(100%); } to { transform: none; } }
.detail-mask.showup .detail-modal { animation: slideUp .25s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

/* D-04 按钮反馈：按下回弹 + 涟漪 */
.btn-pay, .btn-buy, .btn-block, .bf-btn, .btn-kw, .d-sku, .s-card .add { position: relative; overflow: hidden; }
.btn-pay, .btn-buy, .btn-block, .bf-btn, .btn-kw { transition: transform .1s ease; }
.btn-pay:active, .btn-buy:active, .btn-block:active, .bf-btn:active, .btn-kw:active { transform: scale(.96); }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); transform: scale(0); animation: rip .5s ease-out; pointer-events: none; }
@keyframes rip { to { transform: scale(3); opacity: 0; } }

/* D-07 无障碍：焦点环 */
:focus-visible { outline: 2px solid #1E40AF; outline-offset: 2px; }
