/* ===== 积分商城 · 京东/淘宝风格（PC + 手机响应式） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --jd: #e1251b; --jd-dark: #c81623; --price: #f30213;
  --text: #222; --text2: #666; --text3: #999;
  --bg: #f4f4f4; --card: #fff; --border: #eee;
  --orange: #ff4400;
}
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }
img { display: block; }

/* ===== 顶部导航 ===== */
.topbar { background: #fff; color: var(--text2); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
/* 全站导航栏统一：白色、高度减半、文字图标同比例缩小（与详情页一致） */
.topbar-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 5px 16px; }
.topbar .logo { font-size: 17px; color: var(--jd); }
.topbar .logo b { color: var(--jd); }
.topbar .top-actions { gap: 14px; }
.top-actions a svg { width: 15px; height: 15px; }
.logo { font-size: 22px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.logo b { color: #ffe9e7; }
/* 搜索栏：导航栏下方居中 */
.search-row { max-width: 1280px; margin: 0 auto; padding: 10px 16px 4px; display: flex; justify-content: center; }
.search-box { flex: 1; max-width: 620px; display: flex; background: #fff; border-radius: 4px; overflow: hidden; border: 1px solid var(--orange); }
.search-box input { flex: 1; border: none; outline: none; padding: 9px 12px; font-size: 14px; color: var(--text); }
.search-box .search-btn { background: var(--orange); color: #fff; border: none; padding: 0 22px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; }
.search-box .search-btn svg { width: 15px; height: 15px; }
.top-actions { display: flex; gap: 18px; margin-left: auto; }
.top-actions a { color: var(--text2); font-size: 12px; display: flex; align-items: center; gap: 4px; position: relative; }
.top-actions a svg { width: 15px; height: 15px; }
/* 导航栏用户区：未登录显示登录按钮，已登录显示头像+昵称横向排列 */
.top-user { display: flex; align-items: center; }
.top-login-btn { background: var(--jd); color: #fff; border: none; border-radius: 13px; padding: 4px 16px; font-size: 12px; cursor: pointer; }
.top-login-btn:hover { opacity: .85; }
.top-login-btn svg { display: none; }
.top-login-btn .login-txt { display: inline; }
.top-user-info { display: flex; align-items: center; gap: 6px; }
.top-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #eee; }
.top-nickname { font-size: 12px; color: var(--text2); max-width: 80px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* 顶部搜索框：固定宽度 300，位置靠首页按钮（新增 CSS 固定图标定位） */
.top-search { position: relative; width: 300px; flex: 0 0 300px; margin-left: auto; margin-right: 8px; display: flex; align-items: center; }
/* 首页搜索栏：复用详情页搜索框样式，宽度撑满居中 */
.search-row .top-search { width: 100%; max-width: 620px; flex: 0 1 620px; margin: 0; }
.top-search .search-icon { position: absolute; left: 12px; width: 16px; height: 16px; color: rgba(255, 68, 0, 0.6); pointer-events: none; z-index: 1; }
.top-search .form-input { height: 32px; width: 100%; padding: 0 30px 0 34px; border: 1px solid #d9d9d9; border-radius: 4px; outline: none; font-size: 13px; color: var(--text); background: #F7FBFD; }
.top-search .form-input:focus { border-color: var(--jd); }
.top-search .search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; padding: 0; border: none; background: transparent; color: rgba(255, 68, 0, 0.6); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; z-index: 1; }
/* 购物车数量角标（独立样式，不与其他共用：圆形背景，数字水平垂直居中） */
.cart-badge {
  position: absolute;
  top: -8px; right: -12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ffd200;
  color: #c81623;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

/* 底部 TabBar 购物车角标：红色圆形背景白色数字，定位在图标右上角（不与其他共用） */
.tabbar-item .cart-badge {
  top: 2px;
  right: auto;
  left: 50%;
  margin-left: 2px;
  background: var(--jd) !important;
  color: #fff !important;
  min-width: 15px;
  height: 15px;
  font-size: 10px;
}


/* ===== 分类导航 ===== */
.catbar { background: var(--card); border-bottom: 1px solid var(--border); }
.catbar-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; overflow-x: auto; padding: 0 8px; }
.cat-item { padding: 12px 18px; font-size: 14px; color: var(--text2); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.cat-item:hover { color: var(--jd); }
.cat-item.active { color: var(--jd); border-bottom-color: var(--jd); font-weight: 600; }

/* 商品区布局：PC 左侧分类栏 + 右侧商品（淘宝/京东样式） */
.shop-layout { display: flex; gap: 14px; align-items: flex-start; }
.side-cats { display: none; }
.goods-area { flex: 1; min-width: 0; }
@media (min-width: 451px) {
  .catbar { display: none; }
  .side-cats {
    display: block; width: 190px; flex-shrink: 0;
    background: var(--card); border-radius: 4px;
    position: sticky; top: 56px;
    padding: 8px 0; max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .side-cat-title { font-size: 14px; font-weight: 700; color: var(--text); padding: 12px 16px 8px; }
  .side-cat-item { padding: 11px 16px; font-size: 14px; color: var(--text2); cursor: pointer; border-left: 3px solid transparent; }
  .side-cat-item:hover { color: var(--jd); background: #fff4f3; }
  .side-cat-item.active { color: var(--jd); font-weight: 600; border-left-color: var(--jd); background: #fff4f3; }
}

/* ===== 主体 ===== */
.main { max-width: 1280px; margin: 14px auto; padding: 0 12px; }
.goods-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.goods-card { background: var(--card); border-radius: 4px; overflow: hidden; transition: box-shadow .2s, transform .2s; cursor: pointer; position: relative; }
.goods-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); transform: translateY(-2px); }
.goods-img { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; font-weight: 700; letter-spacing: 2px; text-align: center; padding: 10px; background: linear-gradient(135deg, #4a7bd0, #2f5cb8); position: relative; background-size: cover; background-position: center; background-repeat: no-repeat; overflow: hidden; }
.goods-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.12), transparent 45%); }
.goods-tag { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(0,0,0,.45); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 2px; }
.goods-tag.sold { background: var(--jd); }
.goods-body { padding: 10px 12px 12px; }
.goods-name { font-size: 14px; line-height: 1.4; height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-name:hover { color: var(--jd); }
.goods-sub { color: var(--text3); font-size: 12px; margin: 6px 0 8px; height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.goods-price-row { display: flex; align-items: baseline; gap: 10px; }
.goods-price { color: var(--price); font-size: 20px; font-weight: 700; }
.goods-price small { font-size: 13px; }
.goods-price .rent { color: var(--text2); font-size: 13px; font-weight: 400; }
/* 商品列表：预计收益（绿色） */
.goods-price.income-text { color: #07c160; font-weight: 700; font-size: 15px; }
.goods-price.income-text b { color: #07c160; font-weight: 700; }
.goods-btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn { border: none; border-radius: 3px; font-size: 13px; padding: 7px 0; cursor: pointer; text-align: center; flex: 1; }
.btn-buy { background: var(--orange); color: #fff; }
.btn-rent { background: #fff; color: var(--orange); border: 1px solid var(--orange); }
.btn-gray { background: #f0f0f0; color: #bbb; cursor: not-allowed; flex: 1; border: none; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 24px 0 10px; flex-wrap: wrap; }
.page-btn { background: var(--card); border: 1px solid var(--border); color: var(--text2); min-width: 34px; height: 34px; padding: 0 12px; border-radius: 3px; cursor: pointer; font-size: 14px; }
.page-btn:hover { color: var(--jd); border-color: var(--jd); }
.page-btn.active { background: var(--jd); color: #fff; border-color: var(--jd); }
.page-btn.disabled { opacity: .4; cursor: not-allowed; }
.page-info { font-size: 13px; color: var(--text3); }

/* ===== 商品详情页 ===== */
.crumb { font-size: 13px; color: var(--text3); padding: 10px 0; }
/* 面包屑 + 搜索框同一行：左端面包屑，右端搜索框，垂直居中对齐 */
.crumb-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 15px 0; }
.crumb-row .crumb { flex: 1; min-width: 0; padding: 0; }
.crumb-row .top-search { margin: 0; flex-shrink: 0; }
.crumb a:hover { color: var(--jd); }
.detail-box { background: var(--card); display: flex; gap: 20px; padding: 15px; border-radius: 4px; }
/* 左侧缩略图列（从上到下滚动） */
.detail-thumbs { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 520px; width: 62px; flex-shrink: 0; }
.thumb-item { width: 62px; aspect-ratio: 1/1; border-radius: 4px; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; }
.thumb-item.active { border-color: var(--jd); }
.detail-img { width: 380px; flex-shrink: 0; }
.detail-img .goods-img { aspect-ratio: 1 / 1; border-radius: 4px; font-size: 40px; }
/* 商品图滑动容器：PC 显示第一张（缩略图切换），手机端左右滑动轮播 */
.img-slider { display: flex; overflow: hidden; border-radius: 4px; }
.img-slide { flex: 0 0 100%; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 40px; font-weight: 700; letter-spacing: 2px; text-align: center; padding: 10px; background-size: cover; background-position: center; background-repeat: no-repeat; }
/* 浮动圆点指示器（手机版轮播） */
.detail-img { position: relative; }
.img-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.img-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); transition: background .2s; }
.img-dot.active { background: #fff; }
.detail-info { flex: 1; min-width: 0; }
.detail-name { font-size: 22px; font-weight: 700; line-height: 1.4; }
.detail-tags { margin: 10px 0; display: flex; gap: 8px; }
.detail-tags span { background: #fff0ec; color: var(--jd); font-size: 12px; padding: 3px 8px; border-radius: 2px; }
.detail-price-box { background: #fdf3f3; border-radius: 4px; padding: 16px; margin: 5px 0; display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.detail-price { color: var(--price); font-size: 30px; font-weight: 700; }
.detail-price small { font-size: 16px; }
.detail-rent { color: var(--text2); font-size: 14px; }
.detail-rent b { color: var(--price); font-size: 18px; }
/* 预计收益：绿色加深加粗 */
.detail-rent.income-text { color: #07c160; font-weight: 700; }
.detail-rent.income-text b { color: #07c160; font-weight: 700; }
.detail-params { margin-top: 12px; padding-top: 1px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.param-row { display: flex; gap: 10px; padding: 5px 0; font-size: 14px; border-bottom: 1px solid #f7f7f7; }
.param-label { color: var(--text3); width: 100px; flex-shrink: 0; }
.param-value { color: var(--text); flex: 1; }
.action-btn { border: none; border-radius: 3px; font-size: 16px; padding: 12px 34px; cursor: pointer; }
.action-btn.buy { background: var(--orange); color: #fff; }
.action-btn.rent { background: var(--jd); color: #fff; }
.action-btn.cart { background: #fff; color: var(--orange); border: 1px solid var(--orange); }
.action-btn:disabled { background: #f0f0f0; color: #bbb; cursor: not-allowed; }
/* 电脑版操作按钮：设备介绍右下角 */
.detail-intro-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 5px; padding-top: 14px; }
/* 数量选择器 */
.qty-picker { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.qty-btn { width: 30px; height: 34px; border: none; background: #f7f7f7; font-size: 16px; color: var(--text2); cursor: pointer; }
.qty-btn:active { background: #eee; }
.qty-num { width: 40px; text-align: center; font-size: 14px; color: var(--text); }
.detail-intro-actions .action-btn { font-size: 15px; padding: 8px 18px; }
.detail-intro { background: var(--card); margin-top: 14px; padding: 20px 24px; border-radius: 4px; }
.detail-intro h3 { font-size: 16px; margin-bottom: 10px; padding-left: 8px; border-left: 3px solid var(--jd); }
.detail-intro p { font-size: 14px; color: var(--text2); line-height: 1.8; white-space: pre-wrap; }

/* 购物车页专属样式已移至 css/cart.css（仅购物车页加载） */
.cart-empty { text-align: center; padding: 80px 0; color: var(--text3); }

/* ===== 弹窗 ===== */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; display: none; overflow-y: auto; }
.mask.open { display: flex; }
.modal { background: #fff; border-radius: 6px; width: 92%; max-width: 480px; max-height: 86vh; overflow-y: auto; margin: auto; }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.modal-close { cursor: pointer; color: var(--text3); font-size: 18px; }
.modal-body { padding: 16px 18px; }
.modal-body .field { margin-bottom: 14px; }
.modal-body .field label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.type-group { display: flex; gap: 10px; }
.type-group span { flex: 1; text-align: center; padding: 9px 0; border: 1px solid var(--border); border-radius: 3px; font-size: 14px; cursor: pointer; }
.type-group span.active { border-color: var(--jd); color: var(--jd); background: #fff4f3; }
.month-input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 3px; font-size: 14px; outline: none; }
.price-line { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; color: var(--text2); }
.price-line.total b { color: var(--price); font-size: 20px; }
.modal-foot { padding: 0 18px 18px; display: flex; gap: 10px; }
.modal-foot .btn { flex: 1; padding: 11px 0; font-size: 15px; }
.btn-confirm { background: var(--orange); color: #fff; }
.btn-plain { background: #fff; color: var(--text2); border: 1px solid var(--border); }

/* ===== 个人中心（京东 PC 风格） ===== */
.mine-profile { background: var(--card); border-radius: 4px; padding: 24px 28px; display: flex; align-items: center; gap: 20px; margin-bottom: 14px; }
.mine-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #e1251b, #ff4400); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.mine-profile-info { flex: 1; min-width: 0; }
.mine-name { font-size: 20px; font-weight: 700; color: var(--text); }
.mine-edit-btn { font-size: 12px; font-weight: 400; color: var(--jd); border: 1px solid var(--jd); border-radius: 12px; padding: 2px 10px; margin-left: 10px; cursor: pointer; display: inline-block; vertical-align: 3px; }
.mine-edit-btn:hover { background: #fff4f3; }
.mine-login-btn { background: var(--jd); color: #fff; border: none; border-radius: 14px; padding: 5px 20px; font-size: 13px; cursor: pointer; display: block; margin: 10px 0 0; }
.mine-login-btn:hover { opacity: .85; }
.mine-openid { font-size: 12px; color: var(--text3); margin-top: 6px; word-break: break-all; }
.mine-info-rows { display: flex; gap: 22px; margin-top: 10px; flex-wrap: wrap; }
.mine-info-row { font-size: 13px; color: var(--text3); }
.mine-info-row b { color: var(--text2); font-weight: 500; margin-left: 6px; }
.mine-stats { display: flex; gap: 0; border-left: 1px solid var(--border); padding-left: 24px; flex-shrink: 0; }
.mine-stat { text-align: center; padding: 0 22px; }
.mine-stat b { display: block; font-size: 24px; color: var(--jd); }
.mine-stat span { font-size: 13px; color: var(--text3); }
/* 主体两栏 */
.mine-body { display: flex; gap: 14px; align-items: flex-start; }
.mine-side { width: 180px; flex-shrink: 0; background: var(--card); border-radius: 4px; padding: 10px 0; }
.mine-side-title { font-size: 14px; font-weight: 700; color: var(--text); padding: 10px 18px 6px; }
.mine-side-item { display: flex; align-items: center; padding: 12px 18px; font-size: 14px; color: var(--text2); border-left: 3px solid transparent; }
.mine-side-item:hover { color: var(--jd); background: #fff4f3; }
.mine-side-item.active { color: var(--jd); font-weight: 600; border-left-color: var(--jd); background: #fff4f3; }
.mine-content { flex: 1; min-width: 0; }
.mine-card { background: var(--card); border-radius: 4px; }
.mine-card-head { font-size: 16px; font-weight: 700; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.order-item { padding: 14px 16px; border-bottom: 1px solid #f7f7f7; display: flex; gap: 12px; align-items: center; }
.order-item:last-child { border-bottom: none; }
.order-item .oi-img { width: 64px; height: 64px; flex-shrink: 0; font-size: 12px; }
.order-item .oi-info { flex: 1; min-width: 0; }
.order-item .oi-name { font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.order-item .oi-meta { font-size: 12px; color: var(--text3); margin-top: 4px; }
.order-item .oi-price { color: var(--price); font-size: 15px; font-weight: 700; flex-shrink: 0; }
.order-item .oi-status { font-size: 12px; flex-shrink: 0; }
.order-item .oi-status.done { color: #00b578; }
.order-item .oi-status.wait { color: var(--orange); }
.order-empty { text-align: center; padding: 40px 0; color: var(--text3); font-size: 14px; }
/* ===== 登录提示条 ===== */

/* ===== Toast ===== */
#toast { position: fixed; top: 20%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.75); color: #fff; padding: 10px 22px; border-radius: 4px; font-size: 14px; z-index: 999; display: none; }

/* 手机版分组展示：主设备名作标题 */
.mobile-group { margin-bottom: 16px; }
.mobile-group-title { font-size: 15px; font-weight: 700; color: var(--text); padding: 10px 4px; display: flex; align-items: center; gap: 8px; }
.mobile-group-title::before { content: ''; width: 4px; height: 16px; background: var(--jd); border-radius: 2px; }
@media (max-width: 450px) {
  /* 分组块占满整行（外层容器是 grid，避免分组块被当网格项错乱） */
  .mobile-group { grid-column: 1 / -1; }
  /* 分组内商品每行 2 个 */
  .mobile-group .goods-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
@media (min-width: 451px) {
  .mobile-group-title { display: none; }
}

/* ===== 底部 ===== */
.footer { text-align: center; color: var(--text3); font-size: 12px; padding: 24px 0 1px; line-height: 1.8; }

/* ===== 详情页底部操作栏（淘宝样式，仅 ≤1024px 手机端显示） ===== */
body.detail { padding-bottom: 74px; }
.detail-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 160;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; align-items: center; padding: 8px 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 10px rgba(0,0,0,.08);
}
.detail-bar .bar-btn {
  flex: 1; border: none; border-radius: 4px; font-size: 15px; font-weight: 600;
  padding: 12px 0; cursor: pointer; text-align: center; margin: 0 4px;
}
.bar-btn.cart { background: #fff4e6; color: #ff8000; border: 1px solid #ffb76b; }
.bar-btn.rent { background: #ff9500; color: #fff; }
.bar-btn.buy { background: var(--price); color: #fff; }
.bar-btn.all { background: none; color: var(--text2); border: none; }
.bar-btn:disabled { background: #f0f0f0; color: #bbb; border: none; cursor: not-allowed; }
@media (min-width: 451px) {
  .top-search-top { display: none; }
  .detail-bar { display: none; }
  body.detail { padding-bottom: 0; }
  .img-dots { display: none; }
}

@media (max-width: 450px) {
  /* 手机版：隐藏顶部导航栏，搜索框置顶 */
  .topbar { display: none; }
  /* 手机版详情页：隐藏面包屑和搜索框 */
  .crumb-row { display: none; }
  /* 面包屑行搜索框手机端自适应 */
  .crumb-row .top-search { width: 180px; flex: 0 0 180px; }
  /* 手机版首页搜索框：圆角 15px */
  .search-row .top-search .form-input { border-radius: 15px; }
  /* 手机版：分类直接展示，隐藏顶部横向分类条 */
  .catbar { display: none; }
  .top-actions { display: none; }
  /* 手机版：多图重叠滑动显示，隐藏缩略图 */
  .detail-thumbs { display: none; }
  /* 手机版详情页图片：容器内外边距全 0，左右抵满屏幕，正方形显示 */
  body.detail .main { padding-left: 0; padding-right: 0; margin-top: 0; }
  /* 与屏幕顶端所有上边距归零（兜底） */
  body.detail { padding-top: 0 !important; }
  body.detail .main { margin-top: 0 !important; padding-top: 0 !important; }
  body.detail .detail-box { margin-top: 0 !important; padding-top: 0 !important; }
  body.detail .detail-img { margin-top: 0 !important; padding-top: 0 !important; }
  body.detail .detail-box { padding: 0; border-radius: 0; }
  body.detail .detail-img { margin: 0; padding: 0; width: 100%; }
  body.detail .img-slider { padding: 0; border-radius: 0; }
  body.detail .img-slide { padding: 0; }
  body.detail .detail-info { padding: 14px; }
  /* 设备参数区：手机端直接去除内边距，文字左对齐、自然换行 */
  body.detail .detail-info { padding: 5px 0; }
  body.detail .detail-params { column-gap: 8px; }
  body.detail .detail-params .param-row { padding: 6px 0; text-align: left; }
  /* 参数与参数值间距固定 10px（仅手机端）：标签宽度自适应，值强制距名称 10px */
  body.detail .detail-params .param-label { width: auto; flex-shrink: 0; }
  body.detail .detail-params .param-value { margin-left: 7px; }
  body.detail .detail-params .param-label { text-align: left; }
  body.detail .detail-params .param-value { text-align: left; word-break: break-all; overflow-wrap: anywhere; }
  .img-slider { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
  .img-slider::-webkit-scrollbar { display: none; }
  .img-slide { scroll-snap-align: start; }
  .detail-intro-actions { display: none; }
  /* 详情页：底部操作栏替代 TabBar，避免重叠 */
  body.detail .tabbar { display: none; }
  .search-row { padding: 8px 10px 2px; }
  .detail-bar { padding: 6px 8px; }
  .detail-bar .bar-btn { font-size: 13px; padding: 10px 0; margin: 0 3px; border-radius: 17px; }
  .detail-bar .bar-btn svg { width: 26px; height: 26px; display: block; margin: 0 auto; }
  /* 商城图标按钮：宽度自适应，不参与均分，避免挤压其他按钮 */
  .detail-bar .bar-btn.all { flex: 0 0 auto; width: auto; padding: 1px; }
  /* 手机版数量选择器：紧凑小尺寸 */
  .detail-bar .qty-picker-mobile { border-radius: 15px; flex-shrink: 0; }
  .detail-bar .qty-btn { width: 26px; height: 34px; font-size: 14px; }
  .detail-bar .qty-num { width: 26px; font-size: 13px; }
  /* 个人中心手机端：单栏，侧边菜单横排 */
  .mine-profile { padding: 16px; flex-wrap: wrap; gap: 12px; }
  .mine-stats { border-left: none; padding-left: 0; width: 100%; justify-content: space-around; }
  .mine-stat { padding: 0 8px; }
  .mine-stat b { font-size: 20px; }
  .mine-body { flex-direction: column; }
  .mine-side { width: 100%; display: flex; flex-wrap: wrap; padding: 6px; }
  .mine-side-title { display: none; }
  .mine-side-item { padding: 10px 14px; border-left: none; border-bottom: 2px solid transparent; }
  .mine-side-item.active { border-left: none; border-bottom-color: var(--jd); }
}

/* ===== 底部 TabBar（≤1024px 显示） ===== */
.tabbar { display: none; }
@media (max-width: 450px) {
  body { padding-bottom: 58px; }
  .tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
    background: #fff; border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 8px rgba(0,0,0,.05);
  }
  .tabbar-item { flex: 1; text-align: center; padding: 7px 0 5px; font-size: 11px; color: var(--text3); position: relative; }
  .tabbar-item svg { width: 22px; height: 22px; margin: 0 auto 2px; display: block; }
  .tabbar-item.active { color: var(--jd); font-weight: 600; }
  .tabbar-badge {
    position: absolute; top: 3px; left: 50%; margin-left: 4px;
    background: var(--jd); color: #fff; font-size: 10px; min-width: 15px; height: 15px;
    line-height: 15px; text-align: center; border-radius: 8px; padding: 0 3px; display: none;
  }
}

/* ===== 手机端响应式 ===== */
@media (max-width: 450px) {
  .goods-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .goods-img { font-size: 20px; }
  .topbar-inner { flex-wrap: wrap; gap: 10px; padding: 8px 10px; }
  .search-box { order: 3; max-width: none; width: 100%; }
  .logo { font-size: 18px; }
  .top-actions { margin-left: auto; }
  .top-actions a span.txt { display: none; }
  .main { margin: 10px auto; padding: 0 8px; }
  .detail-box { flex-direction: column; padding: 14px; gap: 12px; }
  .detail-thumbs { flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: none; width: 100%; padding-bottom: 4px; }
  .thumb-item { width: 60px; flex-shrink: 0; }
  .detail-img { width: 100%; }
  .detail-img .goods-img { font-size: 32px; }
  .detail-name { font-size: 17px; }
  .detail-price { font-size: 24px; }
  .action-btn { flex: 1; padding: 12px 0; text-align: center; }
  .pagination { gap: 5px; }
}
@media (max-width: 450px) {
  .goods-grid { grid-template-columns: repeat(2, 1fr); }
  .goods-img { font-size: 17px; }
  .goods-name { font-size: 13px; height: 36px; }
  .goods-price { font-size: 17px; }
  .detail-params .param-row { font-size: 13px; }
}

/* ===== 手机版首页顶部导航栏专用（独立控制，避免与通用规则冲突） ===== */
@media (max-width: 450px) {
  /* 手机版首页：隐藏导航栏下方的搜索框（导航栏内已有居中搜索框） */
  body.home .search-row { display: none !important; }
  body.home .topbar { display: block !important; background: var(--jd) !important; }
  body.home .topbar-inner { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: center; gap: 6px; padding: 10px 10px !important; }
  body.home .topbar .logo { display: none !important; }
  body.home .top-search-top { display: flex !important; flex: 1 1 auto !important; width: auto !important; max-width: none !important; margin: 0 !important; order: 2; }
  body.home .top-search-top .form-input { border-radius: 15px; height: 32px; padding: 0 24px 0 30px; }
  body.home .top-actions { display: flex !important; order: 1; margin-left: 0 !important; gap: 6px; flex: 0 0 42px; justify-content: center; align-items: center; }
  body.home .top-actions a { color: #fff !important; display: flex !important; align-items: center; line-height: 1; }
  body.home .top-actions a:last-child { display: none !important; }
  body.home .top-actions a span.txt { display: none !important; }
  /* 购物车图标专用 CSS（与登录解耦）：25px */
  body.home .top-actions a svg.cart-icon { width: 18px !important; height: 18px !important; display: block; }
  /* 手机版导航栏购物车：隐藏数字角标，避免小图标错位 */
  /* 手机版导航栏购物车角标：白色圆形背景，红色数字，定位在图标右上角 */
  body.home .top-actions .cart-badge {
    background: #fff !important;
    color: #c81623 !important;
    top: -5px; right: auto;
    left: 50%; margin-left: 6px;
    min-width: 15px; height: 15px;
    padding: 0 3px;
    font-size: 10px;
  }
  body.home .top-user { display: flex !important; order: 3; flex: 0 0 42px; justify-content: center; align-items: center; }
  body.home .top-login-btn { background: transparent !important; color: #fff !important; border: none !important; padding: 0; font-size: 15px; line-height: 1; display: flex; align-items: center; }
  body.home .top-login-btn svg { display: block !important; width: 22px; height: 22px; }
  body.home .top-login-btn .login-txt { display: none !important; }
  body.home .top-user-info .top-nickname { color: #fff !important; display: none !important; }
}

/* ===== 退出登录：电脑版右上角 + 手机版底部 ===== */
.top-logout { color: var(--text2); font-size: 12px; margin-left: 14px; white-space: nowrap; }
.top-logout:hover { color: var(--jd); }
.mine-logout-bar { max-width: 1280px; margin: 14px auto 0; padding: 0 12px; }
.mine-logout-btn { width: 100%; padding: 12px 0; background: var(--card); border: none; border-radius: 4px; font-size: 15px; color: var(--jd); cursor: pointer; }
.mine-logout-btn:active { opacity: .8; }
@media (max-width: 450px) {
  .top-logout { display: none !important; }
}
@media (min-width: 451px) {
  .mine-logout-bar { display: none !important; }
}

/* 购物车页手机版导航栏样式已移至 css/cart.css */

/* ===== 支付弹窗内容（垂直居中布局） ===== */
.pay-box { text-align: center; }
.pay-box .pay-qr { display: block; margin: 0 auto; width: 220px; height: 220px; border: 1px solid var(--border); border-radius: 6px; }
.pay-box .pay-tip { font-size: 14px; font-weight: 600; margin-top: 12px; }
.pay-box .pay-meta { margin-top: 12px; }
.pay-box .pay-note { font-size: 12px; color: var(--text3); margin-top: 8px; }
@media (max-width: 450px) {
  .pay-box .pay-qr { width: 180px; height: 180px; }
}

/* ===== 我已支付按钮：微信绿，无悬停效果 ===== */
.btn-paid { background: #07c160; color: #fff; border: none; }
.btn-paid:hover, .btn-paid:active, .btn-paid:focus { background: #07c160; color: #fff; }

/* 手机版：侧边菜单的退出登录隐藏（底部已有退出按钮），电脑版保留 */
@media (max-width: 450px) {
  #logoutLink { display: none !important; }
}

/* 商品卡 SKU 小字 */
.goods-sub.sku-sub { margin-top: 2px; font-size: 11px; color: var(--text3); }
