/* 云享优选 · 商城前台样式
   移动优先：默认按 H5 布局，>=900px 切换为 PC 布局（顶部导航 + 居中内容 + 多列网格）。 */

:root {
  --brand: #ff4d3a;
  --brand-dark: #e63a28;
  --brand-soft: #fff1ee;
  --gold: #f5a623;
  --text: #1f2329;
  --text-2: #646a73;
  --text-3: #9aa0a6;
  --line: #eceef1;
  --bg: #f5f6f8;
  --card: #ffffff;
  --green: #00b578;
  --blue: #3b82f6;
  --red: #e5484d;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 2px 12px rgba(24, 30, 40, 0.06);
  --shadow-lg: 0 8px 32px rgba(24, 30, 40, 0.12);
  --tabbar-h: 56px;
  --topbar-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 组件类里的 display 会盖掉浏览器默认的 [hidden] { display: none }，
   导致 el.hidden = true 不生效，这里统一兜住。 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
input, textarea, select, button { font-family: inherit; font-size: 14px; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- 布局骨架 ---------- */

#app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar.brand-bg { background: linear-gradient(120deg, var(--brand), #ff7a45); border-bottom: none; color: #fff; }

.topbar__back {
  width: 30px; height: 30px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; font-size: 18px;
}
.topbar__back:hover { background: rgba(0, 0, 0, .06); }
.brand-bg .topbar__back:hover { background: rgba(255, 255, 255, .18); }

.topbar__title {
  flex: 1; font-size: 16px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar__logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.topbar__logo .dot { width: 22px; height: 22px; border-radius: 7px; background: #fff; color: var(--brand);
  display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.topbar__nav { display: none; }
.topbar__actions { display: flex; align-items: center; gap: 6px; }

.main { flex: 1; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); }
.page { padding: 12px; max-width: 1180px; margin: 0 auto; width: 100%; }
.page--flush { padding: 0; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex; background: var(--card);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--text-3); font-size: 11px; position: relative;
}
.tabbar a.on { color: var(--brand); font-weight: 600; }
.tabbar .ic { font-size: 20px; line-height: 1; }
.tabbar .badge {
  position: absolute; top: 4px; left: 50%; margin-left: 4px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 10px; line-height: 16px; text-align: center;
}

/* ---------- 通用组件 ---------- */

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 12px; }
.card__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; font-weight: 600; border-bottom: 1px solid var(--line);
}
.card__bd { padding: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border: none; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 600; cursor: pointer;
  transition: filter .15s, opacity .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { filter: brightness(.94); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--block { width: 100%; }
.btn--ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--soft { background: var(--brand-soft); color: var(--brand); }
.btn--sm { height: 30px; padding: 0 14px; font-size: 12px; font-weight: 500; }
.btn--dark { background: #2b3038; }

.field { margin-bottom: 14px; }
.field > label { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 13px; }
.input, .textarea, .select {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; outline: none; transition: border-color .15s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 76px; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); }
.field__tip { margin-top: 5px; color: var(--text-3); font-size: 12px; }

.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-3); }
.err-text { color: var(--red); }
.small { font-size: 12px; }
.price { color: var(--brand); font-weight: 700; }
.price .cur { font-size: .75em; margin-right: 1px; }
.strike { color: var(--text-3); text-decoration: line-through; font-size: 12px; font-weight: 400; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tag {
  display: inline-block; padding: 1px 7px; border-radius: 5px;
  background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 600;
}
.tag--green { background: #e7f8f1; color: var(--green); }
.tag--gray { background: #f0f1f3; color: var(--text-2); }
.tag--gold { background: #fff5e6; color: var(--gold); }
.tag--blue { background: #eaf1ff; color: var(--blue); }
.tag--red { background: #fdeced; color: var(--red); }

.empty { padding: 60px 20px; text-align: center; color: var(--text-3); }
.empty__icon { display: grid; place-items: center; margin: 0 auto 12px; color: #c5cad3; }
.empty .ic { font-size: 44px; margin-bottom: 10px; opacity: .5; }

.icon { flex: none; display: block; }
.tabbar .ic, .menu-list .ic, .icon-btn .ic, .cat-strip .ic {
  display: grid; place-items: center; color: inherit;
}
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border: none; background: transparent; text-align: left;
  border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px;
}
.menu-list a:last-child, .menu-list button:last-child { border-bottom: none; }
.menu-list .ic { width: 22px; color: var(--text-2); }
.menu-list .arrow { color: var(--text-3); font-size: 18px; }
.menu-list button { color: var(--text); }

.topbar__user {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px;
  border-radius: 999px; background: var(--bg); font-size: 13.5px; font-weight: 500;
}
.topbar__user:hover { background: var(--brand-soft); color: var(--brand); }
/* 头像：有图片时铺满圆形容器，没有则显示昵称首字，
   底色由昵称哈希而来（见 core.js 的 avatarBox），避免所有人一个颜色。 */
.avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--brand), #ff8351); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 700;
  line-height: 1; user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--sm { width: 28px; height: 28px; font-size: 12px; }
.avatar--lg { width: 54px; height: 54px; font-size: 21px; }
.avatar--xl { width: 76px; height: 76px; font-size: 30px; }

.avatar-edit {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}

.hero__search > span:first-child { display: grid; place-items: center; color: rgba(255,255,255,.75); }
.hero__notice > span:first-child { display: grid; place-items: center; flex: none; }
.cat-strip .ic { width: 28px; height: 28px; margin: 0 auto 4px; color: var(--brand); }
.icon-btn .ic { font-size: 0; }
.sheet__close { display: grid; place-items: center; cursor: pointer; color: var(--text-3); }
.check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; color: transparent; flex: none; }
.check.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.check .icon { width: 12px; height: 12px; }

.loading { padding: 40px; text-align: center; color: var(--text-3); }
.spinner {
  width: 22px; height: 22px; margin: 0 auto 10px;
  border: 2px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ---------- 商品图占位（无图时用色块 + 首字） ---------- */

.thumb {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  background: #f0f1f3; display: grid; place-items: center; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__txt { font-size: 30px; font-weight: 800; color: rgba(255, 255, 255, .92); letter-spacing: 1px; }

/* ---------- 首页 ---------- */

.hero {
  padding: 16px 14px 40px;
  background: linear-gradient(150deg, var(--brand) 0%, #ff7a45 55%, #ff9a3c 100%);
  color: #fff;
}
.hero__notice {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .18); font-size: 12.5px;
}
.hero__search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 999px; background: rgba(255, 255, 255, .96); color: var(--text-3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}
.hero__search input { flex: 1; border: none; outline: none; background: transparent; }

.pull-up { margin-top: -28px; position: relative; z-index: 1; }

.cat-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 14px 6px; }
.cat-strip a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px; }
.cat-strip .ic {
  width: 42px; height: 42px; border-radius: 50%; background: var(--bg);
  display: grid; place-items: center; font-size: 20px;
}
.cat-strip span { font-size: 11.5px; color: var(--text-2); text-align: center; }

.section-hd { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 10px; }
.section-hd h2 { margin: 0; font-size: 16px; font-weight: 700; }
.section-hd h2::before {
  content: ''; display: inline-block; width: 3px; height: 14px; margin-right: 7px;
  border-radius: 2px; background: var(--brand); vertical-align: -2px;
}

.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.goods {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.goods:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.goods__bd { padding: 9px 10px 11px; }
.goods__title { font-size: 13.5px; line-height: 1.4; height: 2.8em; margin-bottom: 6px; }
.goods__price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.goods__price .price { font-size: 17px; }
.goods__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.goods__earn { font-size: 11px; color: var(--gold); background: #fff5e6; padding: 1px 6px; border-radius: 4px; }

/* ---------- 分类页 ---------- */

.cat-layout { display: flex; min-height: calc(100vh - var(--topbar-h) - var(--tabbar-h)); }
.cat-side { width: 92px; flex: none; background: #fff; border-right: 1px solid var(--line); }
.cat-side a {
  display: block; padding: 14px 8px; text-align: center; font-size: 13px;
  color: var(--text-2); border-left: 3px solid transparent;
}
.cat-side a.on { background: var(--bg); color: var(--brand); font-weight: 600; border-left-color: var(--brand); }
.cat-main { flex: 1; padding: 12px; min-width: 0; }

/* ---------- 商品详情 ---------- */

.detail-hero { background: #fff; position: relative; }
.detail-hero .thumb { aspect-ratio: 1 / 1; max-height: 420px; }

/* 商品图集：原生横向滚动 + 吸附，无需引入轮播库 */
.swiper { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.swiper::-webkit-scrollbar { display: none; }
.swiper__item { flex: 0 0 100%; scroll-snap-align: start; }
.swiper__dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 6px;
}
.swiper__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(0, 0, 0, .22); transition: all .2s; }
.swiper__dots i.on { width: 16px; border-radius: 3px; background: var(--brand); }

/* 退款原因选项 */
.reason-list { display: flex; flex-wrap: wrap; gap: 8px; }
.reason {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer;
}
.reason.on { border-color: var(--brand); color: var(--brand); background: #fff5ed; font-weight: 500; }
.detail-price { padding: 14px; background: #fff; }
.detail-price .now { font-size: 26px; }
.detail-body { padding: 14px; background: #fff; margin-top: 10px; line-height: 1.8; }
.detail-body img { border-radius: 8px; margin: 8px 0; }

.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px calc(8px + var(--safe-b));
  background: #fff; border-top: 1px solid var(--line);
}
.action-bar .icon-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  width: 48px; font-size: 10.5px; color: var(--text-2); cursor: pointer;
}
.action-bar .icon-btn .ic { font-size: 19px; }
.icon-btn__wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.action-bar .badge,
.icon-btn__wrap .badge {
  position: absolute; top: -7px; right: -11px; z-index: 2;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 10px; font-style: normal;
  font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 1.5px #fff;
  pointer-events: none;
}
.has-action-bar { padding-bottom: 72px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button { width: 30px; height: 28px; border: none; background: #fff; cursor: pointer; color: var(--text-2); }
.stepper button:hover { background: var(--bg); }
.stepper span { min-width: 34px; text-align: center; font-size: 13px; }

/* ---------- 购物车 / 订单 ---------- */

.line-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: none; }
.line-item .thumb { width: 78px; height: 78px; flex: none; border-radius: 8px; aspect-ratio: auto; }
.line-item .thumb .thumb__txt { font-size: 20px; }
.line-item__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.check {
  width: 20px; height: 20px; flex: none; align-self: center; cursor: pointer;
  border: 1.5px solid #cfd3d9; border-radius: 50%;
  display: grid; place-items: center; color: transparent; font-size: 12px;
}
.check.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.settle-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 55;
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #fff; border-top: 1px solid var(--line);
}
.settle-bar--plain { bottom: 0; padding-bottom: calc(10px + var(--safe-b)); }

.order-card { margin-bottom: 12px; }
.order-card__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.order-card__ft { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 14px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 12px; background: #fff; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; padding: 6px 14px; border-radius: 999px; font-size: 13px;
  color: var(--text-2); background: var(--bg); white-space: nowrap;
}
.tabs a.on { background: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 个人中心 / 分销 ---------- */

.profile-hero {
  padding: 18px 16px 46px;
  background: linear-gradient(140deg, #2b3038, #414957);
  color: #fff;
}
.profile-hero.brand { background: linear-gradient(140deg, var(--brand), #ff8a3c); }

/* 个人中心顶部是深色渐变，头像换成半透明白底才不会跟背景打架。
   必须限定在 .profile-hero 内，否则会覆盖顶栏等处的头像样式。 */
.profile-hero .avatar {
  background: rgba(255, 255, 255, .2);
  border: 2px solid rgba(255, 255, 255, .35);
}

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stat-grid > div { padding: 14px 4px; }
.stat-grid b { display: block; font-size: 17px; font-weight: 700; }
.stat-grid span { font-size: 11.5px; color: var(--text-3); }

.money-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.money-box { padding: 14px; border-radius: var(--radius); background: var(--bg); }
.money-box b { display: block; font-size: 20px; color: var(--brand); }
.money-box span { font-size: 12px; color: var(--text-3); }

.level-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.level-tabs a {
  flex: 1; text-align: center; padding: 9px; border-radius: var(--radius-sm);
  background: #fff; color: var(--text-2); font-size: 13px; box-shadow: var(--shadow);
}
.level-tabs a.on { background: var(--brand); color: #fff; font-weight: 600; }

.rule-box { padding: 12px 14px; background: #fffaf3; border-radius: var(--radius); font-size: 12.5px; color: #8a6d3b; line-height: 1.8; }
.rule-box b { color: #7a5a24; }

.invite-card {
  padding: 22px 18px; border-radius: var(--radius); text-align: center; color: #fff;
  background: linear-gradient(140deg, var(--brand), #ff8a3c);
}
.invite-card .code {
  display: inline-block; margin: 10px 0; padding: 8px 22px; border-radius: 10px;
  background: rgba(255, 255, 255, .2); font-size: 26px; font-weight: 800; letter-spacing: 4px;
}
.invite-qr { width: 190px; height: 190px; margin: 14px auto 0; background: #fff; padding: 8px; border-radius: 12px; }

.log-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.log-item:last-child { border-bottom: none; }
.log-item .amt { font-size: 16px; font-weight: 700; flex: none; }
.log-item .amt.plus { color: var(--brand); }
.log-item .amt.minus { color: var(--text); }

/* ---------- 弹层 ---------- */

/* z-index 要高于后台的 .modal（120）：确认框、输入框这类对话框
   经常是从表单弹窗内部唤起的，压在下面就点不到了。 */
.mask {
  position: fixed; inset: 0; z-index: 140; background: rgba(0, 0, 0, .45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s;
}
.mask--center { align-items: center; padding: 20px; }
@keyframes fade { from { opacity: 0; } }

.sheet {
  width: 100%; max-width: 560px; background: #fff;
  border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + var(--safe-b));
  animation: up .25s cubic-bezier(.2, .8, .3, 1);
  max-height: 86vh; overflow: auto;
}
@keyframes up { from { transform: translateY(100%); } }
.dialog { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 20px; animation: pop .2s; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.sheet__hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-weight: 600; font-size: 16px; }
.sheet__close { cursor: pointer; color: var(--text-3); font-size: 20px; line-height: 1; }

.pay-way {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; cursor: pointer;
}
.pay-way.on { border-color: var(--brand); background: var(--brand-soft); }
.pay-way .ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 17px; }
.pay-way .ic.wx { background: #07c160; }
.pay-way .ic.ali { background: #1677ff; }

.toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 200;
  max-width: 78vw; padding: 11px 18px; border-radius: 10px;
  background: rgba(0, 0, 0, .82); color: #fff; font-size: 13.5px; text-align: center;
  animation: fade .2s;
}

.pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 0; }

/* ---------- PC 布局 ---------- */

@media (min-width: 900px) {
  body { font-size: 14.5px; }

  .topbar { height: 62px; padding: 0 28px; }
  .topbar.brand-bg { background: #fff; color: var(--text); border-bottom: 1px solid var(--line); }
  .topbar__logo .dot { background: var(--brand); color: #fff; width: 26px; height: 26px; }
  .topbar__back { display: none; }
  .topbar__title { flex: none; }
  .topbar__nav { display: flex; align-items: center; gap: 4px; flex: 1; margin-left: 22px; }
  .topbar__nav a { padding: 7px 15px; border-radius: 8px; color: var(--text-2); font-size: 14.5px; }
  .topbar__nav a:hover { background: var(--bg); color: var(--text); }
  .topbar__nav a.on { color: var(--brand); font-weight: 600; background: var(--brand-soft); }

  .tabbar { display: none; }
  .main { padding-bottom: 40px; }
  .page { padding: 20px 28px; }

  .hero { border-radius: 0; padding: 26px 28px 52px; }
  .hero__inner { max-width: 1180px; margin: 0 auto; }
  .hero__search { max-width: 520px; }

  .pull-up { max-width: 1180px; margin: -30px auto 0; padding: 0 28px; }

  .cat-strip { grid-template-columns: repeat(10, 1fr); padding: 18px 10px; }

  .goods-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .goods__title { font-size: 14px; }

  .cat-layout { max-width: 1180px; margin: 0 auto; min-height: 60vh; border-radius: var(--radius); overflow: hidden; margin-top: 20px; box-shadow: var(--shadow); }
  .cat-side { width: 150px; }
  .cat-main { background: #fff; }
  .cat-main .goods-grid { grid-template-columns: repeat(4, 1fr); }

  .detail-wrap { display: grid; grid-template-columns: 420px 1fr; gap: 24px; align-items: start; }
  .detail-hero { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
  .detail-price { border-radius: var(--radius); box-shadow: var(--shadow); }
  .detail-body { border-radius: var(--radius); box-shadow: var(--shadow); }

  .action-bar {
    position: static; border: none; padding: 16px 0 0; background: transparent;
  }
  .action-bar .btn { height: 44px; }
  .has-action-bar { padding-bottom: 0; }

  .settle-bar {
    position: sticky; bottom: 0; max-width: 1180px; margin: 12px auto 0;
    border-radius: var(--radius); box-shadow: var(--shadow-lg); border: none;
  }
  .settle-bar--plain { bottom: 0; padding-bottom: 10px; }

  .goods-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .two-col { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
  .stat-grid b { font-size: 20px; }
  .money-grid { grid-template-columns: repeat(4, 1fr); }

  .sheet { border-radius: 16px; max-width: 460px; margin-bottom: 6vh; }
  .mask { align-items: center; }
  .invite-qr { width: 220px; height: 220px; }
}

@media (min-width: 1400px) {
  .page, .hero__inner, .pull-up, .cat-layout, .settle-bar { max-width: 1320px; }
  .goods-grid { grid-template-columns: repeat(6, 1fr); }
}
