/* 全球商城 — 白黑极简 TikTok Shop 风 */
:root {
  --m-bg: #fff;
  --m-text: #111;
  --m-muted: #888;
  --m-line: #eee;
  --m-soft: #f5f5f5;
  --m-danger: #e11;
  --m-ok: #0a0;
  --m-radius: 10px;
  --m-top-h: 56px;
  --m-tab-h: 56px;
  --m-max: 960px;
  --m-max-pc: 1280px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--m-bg);
  color: var(--m-text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.mall-app {
  min-height: 100vh;
  padding-bottom: calc(var(--m-tab-h) + env(safe-area-inset-bottom, 0px));
}

/* ---- Top bar ---- */
.mall-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--m-line);
}
.mall-top-inner {
  max-width: var(--m-max);
  margin: 0 auto;
  height: var(--m-top-h);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mall-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 4px 2px;
  cursor: pointer;
  flex: 0 0 auto;
  font-weight: 900;
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  color: #111;
}
.mall-brand:active { opacity: .75; }
.mall-brand-mark {
  width: 26px;
  height: 25px;
  position: relative;
  flex: 0 0 auto;
  border-left: 5px solid currentColor;
  border-right: 5px solid currentColor;
  border-bottom: 5px solid currentColor;
  border-top: 0;
  border-radius: 0 0 15px 15px;
  box-sizing: border-box;
  transform: scale(.88);
  transform-origin: left bottom;
}
.mall-brand-mark::before,
.mall-brand-mark::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.mall-brand-mark::before {
  width: 5px;
  height: 11px;
  right: -5px;
  top: -1px;
  border-radius: 0 0 3px 3px;
}
.mall-brand-mark::after {
  width: 4px;
  height: 4px;
  left: 9px;
  top: -9px;
  border-radius: 1px;
  box-shadow: 6px 3px 0 currentColor, 12px 7px 0 currentColor, 6px -5px 0 currentColor;
}
.mall-brand-text {
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -.01em;
  text-transform: lowercase;
}

.mall-search {
  flex: 1 1 auto;
  min-width: 0;
}
.mall-pc-nav {
  display: none;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.mall-pc-nav-link {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--m-muted);
  white-space: nowrap;
}
.mall-pc-nav-link:hover { color: #111; background: var(--m-soft); }
.mall-pc-nav-link.is-active {
  color: #111;
  background: var(--m-soft);
}
.mall-search input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--m-line);
  border-radius: 999px;
  background: var(--m-soft);
  padding: 0 14px;
  outline: none;
}
.mall-search input:focus {
  border-color: #ccc;
  background: #fff;
}

.mall-top-bal {
  flex: 0 0 auto;
  border: 1px solid var(--m-line);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.2;
  text-align: right;
  max-width: 88px;
  overflow: hidden;
}
.mall-top-bal-label {
  display: block;
  color: var(--m-muted);
  font-size: 10px;
}
.mall-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mall-icon-menu {
  width: 18px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

/* ---- Main ---- */
.mall-main {
  max-width: var(--m-max);
  margin: 0 auto;
  padding: 12px 12px 24px;
  min-height: 50vh;
}

.mall-hero {
  padding: 8px 4px 16px;
}
.mall-hero h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.mall-hero p {
  margin: 0;
  color: var(--m-muted);
  font-size: 13px;
  line-height: 1.5;
}
.mall-seo-note {
  margin: 20px 4px 8px;
  padding: 0 2px 24px;
  color: var(--m-muted);
  font-size: 12px;
  line-height: 1.65;
}

.mall-muted { color: var(--m-muted); font-size: 13px; }
.mall-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--m-muted);
  font-size: 14px;
}
.mall-loading {
  text-align: center;
  padding: 40px 16px;
  color: var(--m-muted);
}

/* ---- Category chips ---- */
.mall-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mall-chips::-webkit-scrollbar { display: none; }
.mall-chip {
  flex: 0 0 auto;
  border: 1px solid var(--m-line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.mall-chip.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ---- Product grid ---- */
.mall-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  .mall-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (min-width: 960px) {
  .mall-grid { grid-template-columns: repeat(4, 1fr); }
}

.mall-card {
  display: block;
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  overflow: hidden;
  background: #fff;
  transition: transform .15s ease;
}
.mall-card:active { transform: scale(.98); }
.mall-card-cover {
  aspect-ratio: 1 / 1;
  background: var(--m-soft);
  position: relative;
  overflow: hidden;
}
.mall-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mall-card-cover .ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 28px;
}
.mall-card-body {
  padding: 10px;
}
.mall-card-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.mall-card-price {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.mall-card-price small {
  font-size: 11px;
  font-weight: 500;
  color: var(--m-muted);
  margin-left: 4px;
  text-decoration: line-through;
}
.mall-card-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--m-muted);
}

/* ---- Product detail ---- */
.mall-pd {
  display: block;
}
.mall-pd-cover,
.mall-pd-gallery-main {
  margin: -12px -12px 0;
  aspect-ratio: 1 / 1;
  max-height: 70vw;
  background: var(--m-soft);
  overflow: hidden;
}
@media (min-width: 720px) {
  .mall-pd-cover,
  .mall-pd-gallery-main { max-height: 520px; margin: 0; border-radius: var(--m-radius); }
}
.mall-pd-cover img,
.mall-pd-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mall-pd-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 0;
  scrollbar-width: thin;
}
.mall-pd-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border: 1px solid var(--m-line);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: var(--m-soft);
  cursor: pointer;
}
.mall-pd-thumb.is-active { border-color: #111; }
.mall-pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mall-pd-body { padding: 16px 4px 80px; }
.mall-pd-price {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0 0 8px;
}
.mall-pd-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}
.mall-pd-sub {
  margin: 0 0 16px;
  color: var(--m-muted);
  font-size: 13px;
  line-height: 1.5;
}
.mall-pd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--m-line);
  font-size: 14px;
}
.mall-pd-specs {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--m-line);
}
.mall-pd-specs li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--m-line);
  font-size: 13px;
  line-height: 1.45;
}
.mall-pd-specs .k {
  flex: 0 0 88px;
  color: var(--m-muted);
}
.mall-pd-specs .v {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.mall-pd-actions-inline {
  display: none;
  gap: 10px;
  margin-top: 20px;
}
.mall-pd-actions-inline .mall-btn { flex: 1; }
.mall-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--m-line);
  border-radius: 8px;
  overflow: hidden;
}
.mall-qty button {
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--m-soft);
  cursor: pointer;
}
.mall-qty span {
  min-width: 40px;
  text-align: center;
  font-weight: 700;
}
.mall-pd-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: #fff;
  border-top: 1px solid var(--m-line);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 10px;
  max-width: var(--m-max);
  margin: 0 auto;
}
.mall-pd-bar .mall-btn { flex: 1; }

/* hide tabbar on product detail (buy bar takes place) */
.mall-app.is-detail .mall-tabbar { display: none; }
.mall-app.is-detail { padding-bottom: 0; }

/* ---- Buttons ---- */
.mall-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.mall-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.mall-btn.ghost {
  background: #fff;
  color: #111;
}
.mall-btn.block { width: 100%; }
.mall-btn.sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

/* ---- Forms / panels ---- */
.mall-panel {
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}
.mall-panel h2, .mall-panel h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
}
.mall-field {
  margin-bottom: 12px;
}
.mall-field label {
  display: block;
  font-size: 12px;
  color: var(--m-muted);
  margin-bottom: 6px;
}
.mall-field input,
.mall-field textarea,
.mall-field select {
  width: 100%;
  border: 1px solid var(--m-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}
.mall-field textarea { min-height: 80px; resize: vertical; }
.mall-field input:focus,
.mall-field textarea:focus,
.mall-field select:focus { border-color: #bbb; }

.mall-bal-hero {
  text-align: center;
  padding: 28px 12px 20px;
}
.mall-bal-hero .label {
  font-size: 13px;
  color: var(--m-muted);
  margin-bottom: 6px;
}
.mall-bal-hero .val {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.mall-bal-hero .sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--m-muted);
}
.mall-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.mall-actions-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.mall-page-narrow {
  max-width: 720px;
  margin: 0 auto;
}
.mall-section-title {
  margin: 8px 0 14px;
  font-size: 20px;
  font-weight: 800;
}
.mall-wallet-hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--m-muted);
  line-height: 1.5;
  text-align: center;
}

/* ---- Lists ---- */
.mall-list { display: flex; flex-direction: column; gap: 10px; }
.mall-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  padding: 12px;
  background: #fff;
}
.mall-list-item .thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--m-soft);
  overflow: hidden;
  flex: 0 0 auto;
  align-self: flex-start;
}
.mall-list-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mall-list-item .body { flex: 1; min-width: 0; }
.mall-list-item .title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}
.mall-list-item .meta {
  font-size: 12px;
  color: var(--m-muted);
  line-height: 1.45;
}
.mall-list-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  max-width: none;
}
.mall-list-item > .mall-btn,
.mall-list-item > .mall-badge,
.mall-list-actions .mall-btn,
.mall-list-actions .mall-badge {
  flex: 0 0 auto;
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  min-height: 34px;
  height: 34px;
  padding: 0 14px;
  line-height: 1;
}
.mall-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--m-soft);
  border: 1px solid var(--m-line);
}
.mall-badge.ok { background: #111; color: #fff; border-color: #111; }
.mall-badge.warn { background: #fff; }

.mall-addr-card {
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #fff;
}
.mall-addr-card.is-default {
  border-color: #111;
  background: #fafafa;
}
.mall-addr-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.mall-addr-card-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.mall-addr-phone { color: var(--m-muted); font-weight: 500; }
.mall-addr-line {
  margin-top: 8px;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}
.mall-addr-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.mall-addr-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--m-muted);
  font-size: 14px;
  border: 1px dashed var(--m-line);
  border-radius: var(--m-radius);
  margin-bottom: 8px;
  background: #fafafa;
}
.mall-link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--m-muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.mall-link-btn:hover { color: #111; }

/* ---- Me page ---- */
.mall-me {
  max-width: 720px;
  margin: 0 auto;
}
.mall-me-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--m-line);
  margin-bottom: 16px;
}
.mall-me-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  flex: 0 0 auto;
}
.mall-me-meta { flex: 1; min-width: 0; }
.mall-me-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mall-me-sub {
  margin: 0;
  font-size: 13px;
  color: var(--m-muted);
}
.mall-me-side {
  display: none;
  text-align: right;
  flex: 0 0 auto;
}
.mall-me-side-label {
  font-size: 11px;
  color: var(--m-muted);
  margin-bottom: 2px;
}
.mall-me-side-val {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.mall-me-login { padding: 12px 0 24px; }
.mall-me-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.mall-me-quick-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--m-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  background: #fff;
}
.mall-me-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
}
.mall-me-section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.mall-me-count {
  font-size: 13px;
  color: var(--m-muted);
  font-weight: 600;
}
.mall-addr-list { margin-bottom: 20px; }
.mall-me-form {
  border-top: 1px solid var(--m-line);
  padding-top: 20px;
}
.mall-me-form h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
}
.mall-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 14px;
}
.mall-field-check label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--m-text);
  font-size: 14px;
  cursor: pointer;
}
.mall-field-check input { width: auto; }
.mall-me-form-actions {
  margin-top: 4px;
}
  .mall-me-form-actions .mall-btn {
    min-width: 140px;
  }

/* ---- Merchant hub / shop ---- */
.mall-shop-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--m-line);
  margin-bottom: 20px;
}
.mall-shop-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  flex: 0 0 auto;
  overflow: hidden;
}
.mall-shop-avatar.sm { width: 48px; height: 48px; font-size: 18px; }
.mall-shop-avatar.ph { border-radius: 50%; }
.mall-shop-meta h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}
.mall-mh-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.mall-mh-share input {
  flex: 1 1 200px;
  min-width: 0;
  border: 1px solid var(--m-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.mall-mh-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.mall-mh-stat {
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  padding: 14px 16px;
  background: #fff;
}
.mall-mh-stat .k {
  font-size: 12px;
  color: var(--m-muted);
  margin-bottom: 4px;
}
.mall-mh-stat .v {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
}

@media (min-width: 900px) {
  .mall-mh-stats { grid-template-columns: repeat(4, 1fr); }
  .mall-shop-meta h1 { font-size: 28px; }
  .mall-mh .mall-chips { margin-bottom: 20px !important; }
}

/* ---- Tab bar ---- */
.mall-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 35;
  height: calc(var(--m-tab-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--m-line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.mall-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--m-muted);
  font-weight: 600;
}
.mall-tab.is-active { color: #111; }
.mall-tab-ico { font-size: 16px; line-height: 1; }

/* ---- PC footer ---- */
.mall-pc-footer {
  display: none;
  margin-top: 48px;
  background: #0b0c0d;
  color: #fff;
  padding: 56px 24px 32px;
}
.mall-pc-footer-inner {
  max-width: var(--m-max-pc);
  margin: 0 auto;
}
.mall-pc-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px 40px;
}
.mall-pc-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 22px;
  margin-bottom: 14px;
  color: #fff;
}
.mall-pc-footer-logo .mall-brand-mark { color: #fff; }
.mall-pc-footer-tag {
  margin: 0;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.55;
  max-width: 280px;
}
.mall-pc-footer-col h3 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}
.mall-pc-footer-col a,
.mall-pc-footer-link {
  display: block;
  margin: 0 0 12px;
  border: 0;
  background: none;
  padding: 0;
  color: #9ca3af;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.mall-pc-footer-col a:hover,
.mall-pc-footer-link:hover { color: #fff; }
.mall-pc-footer-copy {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #222;
  color: #6b7280;
  font-size: 13px;
}
.mall-pc-footer-copy a { color: #fff; }

/* PC：加宽 + 隐藏底栏 + 显示页脚 */
@media (min-width: 900px) {
  :root { --m-max: var(--m-max-pc); }
  .mall-app {
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
  }
  .mall-main {
    flex: 1 1 auto;
    padding: 28px 32px 48px;
    width: 100%;
  }
  .mall-top-inner {
    padding: 0 24px;
    gap: 14px;
  }
  .mall-pc-nav { display: inline-flex; }
  .mall-search { max-width: 420px; margin-left: auto; }
  .mall-tabbar { display: none !important; }
  .mall-pc-footer {
    display: block;
    width: 100%;
  }
  .mall-hero h1 { font-size: 28px; }
  .mall-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 18px; }
  .mall-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.06); transform: translateY(-2px); }
  .mall-card:active { transform: none; }

  /* 商品详情：左图右信息（参考高端商城 PC） */
  .mall-pd {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 40px 48px;
    align-items: start;
  }
  .mall-pd-gallery {
    position: sticky;
    top: calc(var(--m-top-h) + 16px);
  }
  .mall-pd-cover,
  .mall-pd-gallery-main {
    margin: 0;
    max-height: none;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
  }
  .mall-pd-body {
    padding: 0;
  }
  .mall-pd-title { font-size: 22px; }
  .mall-pd-price { font-size: 28px; }
  .mall-pd-bar { display: none !important; }
  .mall-pd-actions-inline { display: flex; }
  .mall-app.is-detail { padding-bottom: 0; }

  /* 钱包 / 我的 / 订单 / 商户 */
  .mall-bal-hero {
    text-align: left;
    padding: 8px 0 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 24px;
    align-items: end;
    border-bottom: 1px solid var(--m-line);
    margin-bottom: 20px;
  }
  .mall-bal-hero .val { font-size: 40px; }
  .mall-bal-hero .sub { grid-column: 1 / -1; text-align: left; }
  .mall-actions {
    grid-template-columns: repeat(3, minmax(0, 200px));
    gap: 12px;
    margin-bottom: 28px;
  }
  .mall-page-narrow { max-width: 880px; }
  .mall-list-item {
    padding: 16px 18px;
  }
  .mall-list-item .thumb {
    width: 80px;
    height: 80px;
  }
  .mall-panel {
    padding: 20px 22px;
  }
  .mall-me {
    max-width: 960px;
  }
  .mall-me-hero {
    padding: 12px 0 28px;
    margin-bottom: 28px;
    gap: 18px;
  }
  .mall-me-avatar {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }
  .mall-me-title { font-size: 26px; }
  .mall-me-side { display: block; }
  /* PC 顶栏已有导航，隐藏重复快捷入口 */
  .mall-me-quick { display: none; }
  .mall-me-section-head h2 { font-size: 20px; }
  .mall-addr-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
  }
  .mall-addr-card {
    margin-bottom: 0;
    padding: 16px 18px;
    height: 100%;
  }
  .mall-addr-empty {
    grid-column: 1 / -1;
    padding: 40px 20px;
  }
  .mall-me-form {
    background: #fafafa;
    border: 1px solid var(--m-line);
    border-radius: 12px;
    padding: 24px 28px 28px;
    border-top: 1px solid var(--m-line);
  }
  .mall-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4px 18px;
  }
  .mall-field-full { grid-column: 1 / -1; }
  .mall-me-form-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
  }
  .mall-me-form-actions .mall-btn {
    min-width: 160px;
  }
  .mall-modal-sheet.mall-wallet-sheet {
    width: min(440px, calc(100% - 32px));
  }
}

@media (min-width: 1200px) {
  .mall-grid { grid-template-columns: repeat(5, 1fr) !important; }
  .mall-pd {
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    gap: 48px 64px;
  }
}

/* ---- Modal / drawer ---- */
.mall-modal, .mall-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
}
.mall-modal-backdrop,
.mall-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
}
.mall-modal-sheet {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100% - 32px));
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.mall-modal-sheet h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.mall-modal-sheet > .mall-muted { margin: 0 0 16px; }
.mall-portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 14px;
}
.mall-portal-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--m-line);
  border-radius: 14px;
  padding: 18px 12px 16px;
  background: #fff;
  cursor: pointer;
  margin: 0;
  min-height: 112px;
}
.mall-portal-opt.is-active {
  border-color: #111;
  background: var(--m-soft);
}
.mall-portal-opt-title {
  display: block;
  font-weight: 800;
  font-size: 14px;
  margin: 0;
  line-height: 1.2;
}
.mall-portal-ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: #f3f3f3;
  flex: 0 0 auto;
}
.mall-portal-opt.is-active .mall-portal-ico-mall {
  background: #111;
  color: #fff;
}
.mall-portal-ico .mall-brand-mark {
  transform: scale(.92);
  transform-origin: center bottom;
}
/* 交易所：沿用交易所主色（青） */
.mall-portal-ico-ex {
  background: #0b1c1f;
  color: #05c3dd;
}
.mall-portal-opt.is-active .mall-portal-ico-ex {
  background: #05c3dd;
  color: #061418;
}
.mall-portal-opt:not(.is-active) .mall-portal-ico-mall {
  background: #f3f3f3;
  color: #111;
}
.mall-lang-list {
  margin: 0 0 12px;
  max-height: min(52vh, 420px);
  overflow: auto;
}
.mall-lang-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--m-line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  margin: 0 0 8px;
  font-weight: 800;
  font-size: 15px;
}
.mall-lang-opt.is-active {
  border-color: #111;
  background: var(--m-soft);
}

.mall-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin: 0 0 14px;
  background: var(--m-soft);
  border-radius: 10px;
}
.mall-seg button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: var(--m-muted);
}
.mall-seg button.is-active {
  background: #fff;
  color: #111;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.mall-code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.mall-code-row input { flex: 1; min-width: 0; }
.mall-code-row .mall-btn { flex: 0 0 auto; white-space: nowrap; }
.mall-auth-note {
  margin: 12px 0 0;
  font-size: 12px;
  text-align: center;
}
.mall-auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
  color: #111;
  pointer-events: none;
}
.mall-auth-brand .mall-brand-mark {
  transform: scale(1.05);
  transform-origin: center bottom;
}
.mall-auth-sheet h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}
.mall-link {
  border: 0;
  background: none;
  padding: 0;
  color: #111;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
a.mall-link { color: inherit; }

.mall-drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(300px, 86vw);
  background: #fff;
  padding: 16px;
  box-shadow: -8px 0 30px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
}
.mall-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--m-line);
}
.mall-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mall-drawer-nav a,
.mall-drawer-nav button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.mall-drawer-nav a:hover,
.mall-drawer-nav button:hover { background: var(--m-soft); }

/* ---- Toast ---- */
.mall-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--m-tab-h) + 24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 100;
  max-width: min(320px, calc(100% - 32px));
  background: #111;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.mall-toast a { color: #fff; text-decoration: underline; }

.mall-section-title {
  margin: 4px 0 12px;
  font-size: 16px;
  font-weight: 800;
}

.mall-link {
  color: #111;
  text-decoration: underline;
  font-weight: 600;
}
