/* ============================================================
   品缘好生活 H5 · 前台样式
   ============================================================ */
:root {
  --primary: #2d8cf0;
  --primary-light: #e8f3ff;
  --danger: #ee0a24;
  --orange: #ff8917;
  --success: #07c160;
  --text: #323233;
  --text-2: #646566;
  --text-3: #969799;
  --border: #ebedf0;
  --bg: #f7f8fa;
  --bg-page: #f2f3f5;
  --radius: 8px;
  --nav-h: 46px;
  --tab-h: 52px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
input, button, textarea, select { font-family: inherit; font-size: inherit; color: inherit; outline: none; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.app {
  max-width: 750px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}
@media (min-width: 751px) {
  .app { box-shadow: 0 0 40px rgba(0, 0, 0, .07); }
  body { background: #e9ebef; }
}

/* ---------------- 顶部导航 ---------------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: #fff;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
}
.navbar-title {
  flex: 1; text-align: center;
  font-size: 16px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 4px;
}
.navbar-left, .navbar-right { min-width: 56px; display: flex; align-items: center; gap: 4px; }
.navbar-right { justify-content: flex-end; }
.navbar-back {
  display: flex; align-items: center; gap: 2px;
  color: var(--primary); font-size: 14px; padding: 6px;
}
.navbar-back svg { width: 18px; height: 18px; }
.navbar-side-btn { padding: 6px; color: var(--text-2); display: flex; }
.navbar-side-btn svg { width: 20px; height: 20px; }

/* ---------------- 搜索框 ---------------- */
.search-wrap { background: #fff; padding: 8px 12px; position: sticky; top: 0; z-index: 50; }
.search-bar {
  display: flex; align-items: center;
  background: #f7f8fa; border: 1px solid #f2f3f5;
  border-radius: 100px; height: 34px; padding: 0 12px;
  color: var(--text-3); gap: 6px;
}
.search-bar svg { width: 16px; height: 16px; flex: none; }
.search-bar input { flex: 1; border: 0; background: transparent; font-size: 13px; color: var(--text); }
.search-bar input::placeholder { color: var(--text-3); }
.search-cancel { color: var(--primary); font-size: 14px; padding-left: 10px; white-space: nowrap; }

/* ---------------- 轮播 ---------------- */
.swipe { position: relative; overflow: hidden; background: #f2f3f5; line-height: 0; }
.swipe-track { display: flex; transition: transform .35s cubic-bezier(.25,.8,.25,1); will-change: transform; width: 100%; }
.swipe-item { flex: 0 0 100%; width: 100%; min-width: 0; }
.swipe-item > a { display: block; }
.swipe-item img { width: 100%; height: auto; display: block; }
.swipe-dots {
  position: absolute; left: 0; right: 0; bottom: 8px;
  display: flex; justify-content: center; gap: 5px;
}
.swipe-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.55); }
.swipe-dot.active { width: 12px; border-radius: 3px; background: #fff; }

/* ---------------- 首页分类 + 商品 ---------------- */
.home-cats { display: flex; background: #fff; margin-top: 8px; }
.home-cats-nav {
  width: 92px; flex: none;
  background: #f7f8fa;
  padding-bottom: 20px;
  position: sticky; top: 0; align-self: flex-start;
}
.home-cats-nav li {
  height: 50px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-2); position: relative;
  cursor: pointer; transition: .15s;
}
.home-cats-nav li.active {
  background: #fff; color: var(--primary); font-weight: 600;
}
.home-cats-nav li.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; background: var(--primary); border-radius: 0 2px 2px 0;
}
.home-cats-panel { flex: 1; min-width: 0; padding: 10px 10px 0; display: none; }
.home-cats-panel.active { display: block; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 2px 10px;
}
.panel-head h3 { font-size: 14px; font-weight: 600; color: var(--text); }
.panel-head span { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 2px; }

/* 横向商品卡 */
.goods-card {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid #f5f6f7;
}
.goods-card:last-child { border-bottom: 0; }
.goods-card-thumb {
  width: 82px; height: 82px; flex: none; border-radius: 6px; overflow: hidden; background: #f7f8fa;
}
.goods-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.goods-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.goods-card-title {
  font-size: 13px; line-height: 1.4; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.goods-card-brief { font-size: 11px; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goods-card-foot { margin-top: auto; display: flex; align-items: flex-end; gap: 8px; padding-top: 6px; }
.price { color: var(--danger); font-weight: 600; }
.price .cur { font-size: 11px; margin-right: 1px; }
.price .int { font-size: 16px; }
.price .dec { font-size: 11px; }
.price-origin { font-size: 11px; color: var(--text-3); text-decoration: line-through; }
.goods-card-share { margin-left: auto; color: var(--text-3); }
.goods-card-share svg { width: 17px; height: 17px; }

/* 网格商品 */
.goods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; }
.goods-grid .item { background: #fff; border-radius: 8px; overflow: hidden; }
.goods-grid .item .thumb { position: relative; width: 100%; padding-top: 100%; background: #f7f8fa; }
.goods-grid .item .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.goods-grid .item .info { padding: 8px; }
.goods-grid .item .name { font-size: 13px; line-height: 1.35; height: 35px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-grid .item .foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; }

/* ---------------- 通用块 ---------------- */
.section { background: #fff; margin-top: 8px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 12px 8px;
}
.section-head h2 { font-size: 16px; font-weight: 600; letter-spacing: .2px; }
.section-head h2 small { font-size: 11px; color: var(--text-3); font-weight: 400; margin-left: 6px; }
.section-more { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 2px; }
.section-body { padding: 0 12px 12px; }

/* 专题条 */
.topic-row { display: flex; gap: 10px; overflow-x: auto; padding: 0 12px 14px; scrollbar-width: none; }
.topic-row::-webkit-scrollbar { display: none; }
.topic-card { flex: 0 0 160px; border-radius: 8px; overflow: hidden; background: #f7f8fa; position: relative; }
.topic-card img { width: 160px; height: 100px; object-fit: cover; }
.topic-card .tc-body { padding: 8px; }
.topic-card .tc-title { font-size: 13px; font-weight: 500; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.topic-card .tc-sub { font-size: 11px; color: var(--text-3); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 空状态 */
.empty { padding: 60px 20px; text-align: center; color: var(--text-3); }
.empty svg { width: 72px; height: 72px; margin: 0 auto 12px; opacity: .5; }
.empty p { font-size: 13px; }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: var(--tab-h);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  max-width: 750px; margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabbar-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: #7d7e80; font-size: 10px;
}
.tabbar-item svg { width: 21px; height: 21px; }
.tabbar-item.active { color: var(--primary); }
.tabbar-item .badge-dot { position: absolute; }
.tabbar-icon { position: relative; display: flex; }
.tabbar-badge {
  position: absolute; top: -4px; right: -8px; min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--danger); color: #fff; font-size: 10px; line-height: 15px; border-radius: 8px; text-align: center;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px; border-radius: 100px;
  font-size: 14px; font-weight: 500; color: #fff;
  background: var(--primary); border: 1px solid var(--primary);
  transition: .15s; white-space: nowrap;
}
.btn:active { opacity: .85; }
.btn-block { display: flex; width: 100%; }
.btn-plain { background: #fff; color: var(--text); border-color: var(--border); }
.btn-primary-plain { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-gradient { background: linear-gradient(90deg, #4facfe, #2d8cf0); border: 0; }
.btn-sm { height: 30px; padding: 0 14px; font-size: 12px; border-radius: 100px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 4px; }
.btn-disabled { background: #c8c9cc; border-color: #c8c9cc; color: #fff; pointer-events: none; }
.btn + .btn { margin-left: 8px; }

/* ---------------- 表单 / 单元格 ---------------- */
.cell-group { background: #fff; }
.cell {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; background: #fff; position: relative;
  font-size: 14px;
}
.cell + .cell::before {
  content: ''; position: absolute; left: 14px; right: 0; top: 0; height: 1px; background: var(--border);
  transform: scaleY(.5);
}
.cell-label { width: 84px; flex: none; color: var(--text); }
.cell-value { flex: 1; min-width: 0; color: var(--text-2); }
.cell-value input { width: 100%; border: 0; background: transparent; padding: 0; font-size: 14px; }
.cell-value input::placeholder { color: #c8c9cc; }
.cell-arrow { color: #c8c9cc; flex: none; display: flex; }
.cell-arrow svg { width: 16px; height: 16px; }
.cell-title { flex: 1; min-width: 0; }
.cell-extra { color: var(--text-3); font-size: 13px; }

.field {
  padding: 12px 14px; background: #fff; position: relative;
}
.field + .field::before {
  content: ''; position: absolute; left: 14px; right: 0; top: 0; height: 1px; background: var(--border);
  transform: scaleY(.5);
}
.field-label { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.field input[type=text], .field input[type=password], .field input[type=number], .field select, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 12px; font-size: 14px; background: #fff;
}
.field textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); }

/* 登录页 */
.auth-page { min-height: 100vh; background: #fff; padding: 40px 26px; }
.auth-logo { text-align: center; margin-bottom: 34px; }
.auth-logo .mark {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px;
  background: linear-gradient(135deg, #4facfe, #2d8cf0);
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-size: 26px; font-weight: 700; letter-spacing: 1px;
  box-shadow: 0 8px 20px rgba(45, 140, 240, .3);
}
.auth-logo h1 { font-size: 21px; font-weight: 600; letter-spacing: 1px; }
.auth-logo p { font-size: 12px; color: var(--text-3); margin-top: 6px; letter-spacing: 2px; }
.auth-form .field { background: transparent; padding: 0 0 16px; }
.auth-form .field::before { display: none; }
.auth-form .field input { background: #f7f8fa; border-color: #f7f8fa; height: 48px; border-radius: 8px; padding: 0 14px; }
.auth-form .field input:focus { background: #fff; border-color: var(--primary); }
.auth-submit { margin-top: 10px; height: 46px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-3); }
.auth-switch a { color: var(--primary); }
.auth-tip { font-size: 11px; color: var(--text-3); text-align: center; margin-top: 28px; line-height: 1.8; }

/* ---------------- 商品详情 ---------------- */
.goods-hero { position: relative; background: #fff; }
.goods-hero .swipe-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.goods-hero-count {
  position: absolute; right: 12px; bottom: 12px; z-index: 5;
  background: rgba(0,0,0,.4); color: #fff; font-size: 11px;
  padding: 2px 8px; border-radius: 100px;
}
.goods-price-box { background: #fff; padding: 12px 14px; }
.goods-price-box .row { display: flex; align-items: baseline; gap: 8px; }
.goods-price-box .price .int { font-size: 24px; }
.goods-price-box .sold { margin-left: auto; font-size: 12px; color: var(--text-3); }
.goods-name { background: #fff; padding: 4px 14px 12px; }
.goods-name h1 { font-size: 16px; font-weight: 500; line-height: 1.45; }
.goods-name p { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.goods-tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 12px; background: #fff; }
.tag { font-size: 10px; color: var(--primary); background: var(--primary-light); padding: 2px 7px; border-radius: 3px; }
.tag.hot { color: var(--danger); background: #fff1f0; }

.spec-row { display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: #fff;
  border-top: 1px solid #f7f8fa; }
.spec-row .label { width: 60px; flex: none; color: var(--text-3); font-size: 13px; }
.spec-row .val { flex: 1; font-size: 14px; }
.spec-row .val .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 5px 14px; border-radius: 4px; background: #f7f8fa; color: var(--text-2);
  font-size: 12px; border: 1px solid transparent; cursor: pointer;
}
.chip.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

.detail-html { background: #fff; padding: 0 0 12px; }
.detail-html img { width: 100%; height: auto; }
.detail-html p { margin: 0; }

/* 详情底部操作栏 */
.goods-action {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-width: 750px; margin: 0 auto;
  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, 0px));
  gap: 8px;
}
.goods-action .icon-btn {
  width: 48px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; color: var(--text-2);
}
.goods-action .icon-btn svg { width: 20px; height: 20px; }
.goods-action .icon-btn.active { color: var(--danger); }
.goods-action .btns { flex: 1; display: flex; gap: 8px; }
.goods-action .btns .btn { flex: 1; height: 42px; }

/* ---------------- 购物车 ---------------- */
.cart-list { padding: 10px 12px 0; }
.cart-item { display: flex; gap: 10px; background: #fff; border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.cart-check {
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid #c8c9cc;
  flex: none; margin-top: 30px; display: flex; align-items: center; justify-content: center;
}
.cart-check.on { background: var(--primary); border-color: var(--primary); }
.cart-check svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.cart-check.on svg { opacity: 1; }
.cart-thumb { width: 80px; height: 80px; border-radius: 6px; overflow: hidden; flex: none; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-body { flex: 1; min-width: 0; }
.cart-title { font-size: 13px; line-height: 1.4; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-spec { font-size: 11px; color: var(--text-3); background: #f7f8fa; display: inline-block;
  padding: 2px 6px; border-radius: 3px; margin-top: 4px; }
.cart-foot { display: flex; align-items: center; margin-top: 8px; }
.cart-foot .stepper { margin-left: auto; }

.stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.stepper button { width: 26px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 15px; }
.stepper input { width: 34px; height: 24px; border: 0; text-align: center; font-size: 13px; background: #fff; }
.stepper .stepper-btn:disabled { color: #dcdee0; }

.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  max-width: 750px; margin: 0 auto;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; align-items: center; padding: 8px 12px; gap: 10px;
}
.cart-bar .all { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.cart-bar .total { margin-left: auto; text-align: right; }
.cart-bar .total .price .int { font-size: 19px; }
.cart-bar .total small { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; }
.cart-bar .btn { height: 38px; padding: 0 22px; }

/* ---------------- 结算 ---------------- */
.address-card {
  background: #fff; padding: 16px 14px; display: flex; gap: 12px; align-items: center;
  position: relative;
}
.address-card .addr-icon { color: var(--primary); flex: none; }
.address-card .addr-icon svg { width: 20px; height: 20px; }
.address-card .addr-body { flex: 1; min-width: 0; }
.address-card .addr-name { font-size: 15px; font-weight: 500; }
.address-card .addr-name span { font-size: 13px; color: var(--text-2); font-weight: 400; margin-left: 10px; }
.address-card .addr-detail { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.address-card .empty-addr { color: var(--text-3); font-size: 14px; }

.order-goods { background: #fff; padding: 0 14px; }
.order-goods-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f7f8fa; }
.order-goods-item:last-child { border-bottom: 0; }
.order-goods-item .thumb { width: 72px; height: 72px; border-radius: 6px; overflow: hidden; flex: none; }
.order-goods-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-goods-item .body { flex: 1; min-width: 0; }
.order-goods-item .name { font-size: 13px; line-height: 1.4; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-goods-item .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.order-goods-item .meta .spec { font-size: 11px; color: var(--text-3); }
.order-goods-item .meta .num { font-size: 12px; color: var(--text-3); }

.summary { background: #fff; padding: 4px 14px; }
.summary-row { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; font-size: 13px; color: var(--text-2); }
.summary-row.total { border-top: 1px solid #f7f8fa; font-size: 14px; color: var(--text); padding-top: 12px; }
.summary-row .v { color: var(--text); }
.summary-row .v.red { color: var(--danger); font-weight: 600; }

.submit-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-width: 750px; margin: 0 auto;
  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, 0px));
}
.submit-bar .total { flex: 1; font-size: 13px; color: var(--text-2); }
.submit-bar .total b { color: var(--danger); font-size: 19px; margin-left: 2px; }
.submit-bar .btn { height: 42px; padding: 0 28px; }

/* ---------------- 订单列表 ---------------- */
.order-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40; }
.order-tabs a {
  flex: 1; text-align: center; padding: 12px 0; font-size: 13px; color: var(--text-2); position: relative;
}
.order-tabs a.active { color: var(--primary); font-weight: 500; }
.order-tabs a.active::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 22px; height: 2px; background: var(--primary); border-radius: 2px;
}

.order-card { background: #fff; border-radius: 10px; margin: 10px 12px 0; overflow: hidden; }
.order-card-head { display: flex; align-items: center; padding: 12px 14px; font-size: 12px; color: var(--text-3); }
.order-card-head .sn { flex: 1; }
.order-card-head .status { font-weight: 500; }
.order-card-head .status.warn { color: var(--orange); }
.order-card-head .status.primary { color: var(--primary); }
.order-card-head .status.success { color: var(--success); }
.order-card-head .status.muted { color: var(--text-3); }
.order-card-foot { display: flex; align-items: center; padding: 10px 14px; border-top: 1px solid #f7f8fa; gap: 8px; }
.order-card-foot .amount { flex: 1; font-size: 12px; color: var(--text-3); }
.order-card-foot .amount b { color: var(--danger); font-size: 15px; margin-left: 2px; }

/* ---------------- 我的 ---------------- */
.user-header {
  background: linear-gradient(135deg, #4facfe 0%, #2d8cf0 100%);
  padding: 26px 18px 22px;
  color: #fff; position: relative; overflow: hidden;
}
.user-header::after {
  content: ''; position: absolute; right: -30px; top: -40px; width: 150px; height: 150px;
  background: rgba(255,255,255,.09); border-radius: 50%;
}
.user-header::before {
  content: ''; position: absolute; right: 40px; bottom: -60px; width: 110px; height: 110px;
  background: rgba(255,255,255,.07); border-radius: 50%;
}
.user-profile { display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.user-avatar {
  width: 58px; height: 58px; border-radius: 50%; overflow: hidden; flex: none;
  background: rgba(255,255,255,.3); border: 2px solid rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info h2 { font-size: 18px; font-weight: 600; }
.user-info p { font-size: 12px; opacity: .85; margin-top: 3px; }
.user-login-btn { font-size: 12px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.5);
  padding: 4px 12px; border-radius: 100px; color: #fff; }

.user-assets { display: flex; margin-top: 20px; position: relative; z-index: 2; }
.user-assets > div { flex: 1; text-align: center; }
.user-assets b { display: block; font-size: 17px; font-weight: 600; }
.user-assets span { font-size: 11px; opacity: .85; }

.order-panel { background: #fff; margin-top: -10px; border-radius: 12px 12px 0 0; position: relative; z-index: 3; }
.order-panel-head { display: flex; align-items: center; padding: 14px 16px 6px; }
.order-panel-head h3 { flex: 1; font-size: 15px; font-weight: 600; }
.order-panel-head a { font-size: 12px; color: var(--text-3); display: flex; align-items: center; }
.order-panel-grid { display: flex; padding: 8px 0 16px; }
.order-panel-grid a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-2); position: relative; }
.order-panel-grid a svg { width: 24px; height: 24px; color: #505b6b; }
.order-panel-grid .num-badge {
  position: absolute; top: -4px; right: 50%; transform: translateX(20px);
  min-width: 15px; height: 15px; padding: 0 4px; background: var(--danger); color: #fff;
  font-size: 10px; line-height: 15px; border-radius: 8px; text-align: center;
}

.menu-group { background: #fff; margin-top: 10px; }
.menu-group .cell { cursor: pointer; }
.menu-icon { width: 22px; display: flex; color: var(--primary); flex: none; }
.menu-icon svg { width: 19px; height: 19px; }

/* ---------------- 地址 ---------------- */
.address-item { background: #fff; padding: 14px; position: relative; margin-bottom: 10px; border-radius: 10px; }
.address-item .row1 { display: flex; align-items: center; gap: 10px; }
.address-item .row1 b { font-size: 15px; font-weight: 500; }
.address-item .row1 span { font-size: 13px; color: var(--text-2); }
.address-item .detail { font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 1.5; padding-right: 60px; }
.address-item .ops { position: absolute; right: 12px; top: 14px; display: flex; gap: 10px; color: var(--text-3); }
.address-item .ops svg { width: 17px; height: 17px; }
.default-tag { font-size: 10px; color: var(--primary); border: 1px solid var(--primary);
  padding: 0 5px; border-radius: 3px; line-height: 15px; }
.address-set-default { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-top: 10px; }

/* ---------------- 优惠券 ---------------- */
.coupon-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--border); }
.coupon-tabs a { flex: 1; text-align: center; padding: 12px 0; font-size: 13px; color: var(--text-2); }
.coupon-tabs a.active { color: var(--primary); font-weight: 500; }
.coupon {
  display: flex; background: #fff; border-radius: 10px; margin: 10px 12px 0; overflow: hidden;
  position: relative; min-height: 92px;
}
.coupon .left {
  width: 106px; flex: none; background: linear-gradient(135deg, #4facfe, #2d8cf0);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.coupon .left b { font-size: 28px; font-weight: 700; line-height: 1; }
.coupon .left b small { font-size: 13px; font-weight: 500; }
.coupon .left span { font-size: 10px; opacity: .9; margin-top: 6px; }
.coupon .left::after {
  content: ''; position: absolute; right: -6px; top: 0; bottom: 0; width: 12px;
  background: radial-gradient(circle at 6px 50%, transparent 5px, #fff 5px) 0 0/12px 14px repeat-y;
}
.coupon .right { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; }
.coupon .right h4 { font-size: 14px; font-weight: 600; }
.coupon .right p { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.coupon .right .time { font-size: 10px; color: var(--text-3); margin-top: 6px; }
.coupon .recv { align-self: center; margin-right: 14px; }
.coupon.used { opacity: .55; }
.coupon.used .left { background: #c8c9cc; }

/* ---------------- 分类页 ---------------- */
.catalog { display: flex; min-height: calc(100vh - var(--nav-h) - var(--tab-h)); }
.catalog-nav { width: 96px; flex: none; background: #f7f8fa; padding-bottom: 20px; }
.catalog-nav a {
  display: flex; align-items: center; justify-content: center; height: 52px;
  font-size: 13px; color: var(--text-2); position: relative; text-align: center; padding: 0 4px;
}
.catalog-nav a.active { background: #fff; color: var(--primary); font-weight: 600; }
.catalog-nav a.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; background: var(--primary); border-radius: 0 2px 2px 0;
}
.catalog-main { flex: 1; min-width: 0; background: #fff; }
.catalog-banner img { width: 100%; }
.sub-cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-bottom: 1px solid #f7f8fa; }
.sub-cats a { font-size: 12px; padding: 5px 12px; background: #f7f8fa; border-radius: 100px; color: var(--text-2); }
.sub-cats a.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }

/* ---------------- 商品列表（竖排） ---------------- */
.goods-list { padding: 0 12px; }
.goods-list .goods-card { padding: 12px 0; }

/* 搜索页 */
.search-head { display: flex; align-items: center; gap: 8px; background: #fff; padding: 8px 12px;
  position: sticky; top: 0; z-index: 50; }
.search-head .search-bar { flex: 1; }
.sort-bar { display: flex; background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 50px; z-index: 45; }
.sort-bar a { flex: 1; text-align: center; padding: 11px 0; font-size: 13px; color: var(--text-2); }
.sort-bar a.active { color: var(--primary); font-weight: 500; }
.hot-words { background: #fff; padding: 14px; }
.hot-words h3 { font-size: 13px; color: var(--text-2); margin-bottom: 10px; font-weight: 500; }
.hot-words .words { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-words .words a { font-size: 12px; background: #f7f8fa; padding: 5px 12px; border-radius: 100px; color: var(--text-2); }

/* 弹窗（首次进入优惠） */
.popup-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 900;
  display: flex; align-items: center; justify-content: center; padding: 0 30px;
}
.popup-box { width: 100%; max-width: 330px; position: relative; animation: popIn .28s ease; }
@keyframes popIn { from { transform: scale(.9); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.popup-box .swipe { border-radius: 12px; overflow: hidden; }
.popup-box .swipe-item img { width: 100%; }
.popup-close {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -46px;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.8);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.popup-close svg { width: 16px; height: 16px; }

/* 提示 toast */
.toast {
  position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.75); color: #fff; font-size: 13px; padding: 10px 18px;
  border-radius: 8px; z-index: 9999; max-width: 70vw; text-align: center;
  animation: fadeIn .18s ease; pointer-events: none;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

/* 底部弹层 */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 800; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 801;
  max-width: 750px; margin: 0 auto; background: #fff;
  border-radius: 14px 14px 0 0; max-height: 80vh; overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
  animation: sheetUp .25s ease;
}
@keyframes sheetUp { from { transform: translateY(100%) } to { transform: translateY(0) } }
.sheet-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sheet-head h3 { flex: 1; font-size: 15px; font-weight: 600; }
.sheet-body { padding: 12px 16px; }
.sheet-foot { padding: 10px 16px 16px; }

/* 分页（桌面/长列表） */
.pager { display: flex; justify-content: center; gap: 6px; padding: 18px 0; flex-wrap: wrap; }
.pager-item {
  min-width: 32px; height: 32px; line-height: 30px; text-align: center; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 6px; font-size: 13px; color: var(--text-2); background: #fff;
}
.pager-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-dot { color: var(--text-3); line-height: 32px; }

/* 加载更多 */
.load-more { text-align: center; padding: 18px; font-size: 13px; color: var(--text-3); }
.load-more button { color: var(--primary); font-size: 13px; }

/* 页面留白 */
.pb-tab { padding-bottom: calc(var(--tab-h) + 10px); }
.pb-action { padding-bottom: 70px; }
.pb-submit { padding-bottom: 72px; }

/* 图标 */
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; fill: currentColor; }

/* ============================================================
   桌面端适配（>=1000px）：顶部导航 + 加宽容器 + 多列商品
   ============================================================ */
.pchead { display: none; }

@media (min-width: 1000px) {
  .app { max-width: 1180px; background: #fff; }
  .tabbar { display: none; }
  .pb-tab { padding-bottom: 20px; }

  .pchead {
    display: flex; align-items: center; gap: 28px;
    height: 64px; padding: 0 24px; background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 70;
  }
  .pchead-logo { display: flex; align-items: center; gap: 10px; flex: none; }
  .pchead-logo .mark {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, #4facfe, #2d8cf0);
    color: #fff; font-size: 17px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  .pchead-logo b { font-size: 17px; letter-spacing: .5px; }
  .pchead-logo small { display: block; font-size: 10px; color: var(--text-3); letter-spacing: 2px; font-weight: 400; }
  .pchead-nav { display: flex; gap: 4px; flex: 1; }
  .pchead-nav a {
    padding: 7px 14px; border-radius: 100px; font-size: 14px; color: var(--text-2);
  }
  .pchead-nav a:hover { color: var(--primary); background: var(--primary-light); }
  .pchead-nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 500; }
  .pchead-right { display: flex; align-items: center; gap: 8px; }
  .pchead-right a {
    display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2);
    padding: 7px 14px; border-radius: 100px; border: 1px solid var(--border);
  }
  .pchead-right a:hover { color: var(--primary); border-color: var(--primary); }
  .pchead-right svg { width: 16px; height: 16px; }

  /* 搜索条：桌面端右对齐、圆角胶囊 */
  .search-wrap { padding: 10px 24px; border-bottom: 1px solid var(--border); }
  .search-bar { max-width: 460px; height: 38px; }

  /* 首页：左侧分类更宽，右侧商品两列 */
  .home-cats { margin-top: 0; }
  .home-cats-nav { width: 160px; }
  .home-cats-nav li { height: 46px; font-size: 14px; }
  .home-cats-panel { padding: 14px 20px 0; }
  .panel-head { padding-bottom: 6px; }
  .panel-head h3 { font-size: 16px; }

  .home-cats-panel .goods-card {
    display: inline-flex; width: calc(50% - 8px); vertical-align: top;
    padding: 12px 8px; border-bottom: 1px solid #f5f6f7;
  }
  .home-cats-panel .goods-card:nth-child(odd) { margin-right: 12px; }
  .home-cats-panel .goods-card-thumb { width: 96px; height: 96px; }

  .goods-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 14px 24px; }
  .goods-grid .item .name { height: 38px; font-size: 13.5px; }
  .section-head { padding: 18px 24px 10px; }
  .section-body { padding: 0 24px 18px; }
  .topic-row { padding: 0 24px 18px; }
  .topic-card { flex: 0 0 220px; }
  .topic-card img { width: 220px; height: 132px; }

  .goods-list { padding: 0 20px; }
  .goods-list .goods-card { padding: 16px 0; }
  .goods-card-thumb { width: 100px; height: 100px; }
  .goods-card-title { font-size: 14px; }

  /* 商品详情：图左信息右 */
  .goods-hero { width: 48%; float: left; padding: 20px 0 20px 24px; }
  .goods-hero .swipe { border-radius: 12px; overflow: hidden; }
  .goods-hero .swipe-item img { aspect-ratio: 1/1; object-fit: cover; }
  .goods-price-box, .goods-name, .goods-tags, .spec-row {
    margin-left: 48%; padding-left: 20px; padding-right: 24px;
  }
  .goods-price-box { padding-top: 24px; }
  .goods-hero-count { right: auto; left: 36px; }
  .goods-action {
    position: sticky; bottom: 0; margin-left: 48%;
  }
  .goods-action .btns { max-width: 420px; }

  /* 购物车 / 结算 */
  .cart-list { padding: 16px 24px 0; }
  .cart-item { padding: 16px; }
  .cart-thumb { width: 96px; height: 96px; }
  .address-card, .order-goods, .summary { padding-left: 24px; padding-right: 24px; }
  .order-card { margin: 14px 24px 0; }

  /* 我的 */
  .user-header { padding: 34px 28px 26px; }
  .order-panel, .menu-group { margin-top: 14px; }
  .menu-group .cell { padding: 15px 24px; }
  .order-panel-head { padding: 16px 24px 6px; }

  /* 分类页 */
  .catalog-nav { width: 170px; }
  .catalog-nav a { height: 56px; font-size: 14px; }
  .catalog-main .goods-list { padding: 0 20px; }
  .sub-cats { padding: 16px 20px; }

  /* 登录 / 注册 */
  .auth-page { max-width: 460px; margin: 0 auto; padding-top: 70px; }

  /* 通用块间距 */
  .section { margin-top: 14px; }
  .pb-action { padding-bottom: 20px; }
  .pb-submit { padding-bottom: 20px; }
  .submit-bar, .cart-bar { max-width: 1180px; }
  .popup-box { max-width: 380px; }
}
@media (min-width: 1000px) {
  .navbar { display: none; }
  .order-tabs, .sort-bar { top: 64px; }
  .search-head { top: 64px; }
}
@media (min-width: 1000px) {
  #homeBanner { max-height: 420px; }
  #homeBanner .swipe-item img { height: 420px; object-fit: cover; }
  .home-cats-nav { border-right: 1px solid #f2f3f5; }
  .goods-hero .swipe-item img { max-height: 520px; }
}
@media (min-width: 1000px) {
  .home-cats-panel.active { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .home-cats-panel.active > .panel-head { grid-column: 1 / -1; }
  .home-cats-panel .goods-card { display: flex; width: auto; padding: 12px 4px; }
  .home-cats-panel .goods-card:nth-child(odd) { margin-right: 0; }
  #homeBanner .swipe-item img { height: 380px; object-position: center top; }
}
@media (min-width: 1000px) {
  /* 桌面端首页轮播：居中卡片式，完整展示不裁切 */
  #homeBanner {
    max-width: 780px; margin: 18px auto 6px; max-height: none;
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(31, 45, 61, .10);
  }
  #homeBanner .swipe-item img { height: auto; object-fit: fill; }
  #homeBanner .swipe-dots { bottom: 12px; }
  .swipe-dots { line-height: 0; }
}
