:root {
  --blue: #2f7fd6;
  --blue-dark: #246ab8;
  --blue-soft: #e8f2fc;
  --warn: #f3e6c8;
  --warn-text: #8a6d3b;
  --bg: #f2f3f5;
  --card: #ffffff;
  --text: #222;
  --muted: #888;
  --line: #ececec;
  --danger: #e54d42;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --top-h: 48px;
  --notice-h: 34px;
  --dock-h: 56px;
  --tab-h: 52px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  background: #e8edf3;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  overflow: hidden;
}

button, input {
  font: inherit;
  border: 0;
  background: none;
  color: inherit;
}

button { cursor: pointer; }

.app {
  width: 100%;
  max-width: 480px;
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(15, 40, 80, .08);
}

.page {
  display: none;
  position: absolute;
  inset: 0 0 calc(var(--tab-h) + var(--safe-bottom)) 0;
  flex-direction: column;
  background: var(--bg);
}

.page.active { display: flex; }

.page-detail {
  inset: 0;
  z-index: 20;
  background: #fff;
}

.page-detail.active ~ .tabbar,
.page-detail.active ~ .cart-dock { display: none; }

/* Top bar */
.top-bar {
  height: var(--top-h);
  background: var(--blue);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  flex-shrink: 0;
}

.sort-btn {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  white-space: nowrap;
  padding: 6px 4px;
}

.sort-icon {
  font-style: normal;
  font-size: 12px;
  opacity: .9;
}

.sort-btn.asc .sort-icon::after { content: none; }
.sort-btn.asc .sort-icon { content: "↑"; }
.sort-btn.desc .sort-icon { }

.search-wrap {
  flex: 1;
  height: 32px;
  background: #fff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
  min-width: 0;
}

.search-ico { font-size: 12px; opacity: .55; }

.search-wrap input {
  flex: 1;
  min-width: 0;
  outline: none;
  font-size: 13px;
}

/* Notice */
.notice {
  height: var(--notice-h);
  background: var(--warn);
  color: var(--warn-text);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 12px;
}

.notice-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.notice-text {
  display: inline-block;
  margin: 0;
  padding-left: 100%;
  animation: marquee 18s linear infinite;
}

@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* Catalog */
.catalog {
  flex: 1;
  display: flex;
  min-height: 0;
  padding-bottom: var(--dock-h);
}

.cats {
  width: 88px;
  background: #f7f8fa;
  overflow-y: auto;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}

.cat-item {
  width: 100%;
  padding: 14px 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #666;
  text-align: center;
  border-left: 3px solid transparent;
  position: relative;
}

.cat-item.active {
  background: #fff;
  color: var(--blue);
  font-weight: 600;
  border-left-color: var(--blue);
}

.goods {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.product {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: pointer;
}

.product:hover {
  background: #fafbfd;
}

.product-cover {
  width: 78px;
  height: 78px;
  border-radius: 6px;
  background: #f0f2f5;
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
}

.cover-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
}

.play-badge {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(47, 127, 214, .92);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.product-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.product-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.product-price {
  margin: 2px 0 0;
  color: var(--blue);
  font-size: 18px;
  font-weight: 700;
}

.product-stock {
  font-size: 12px;
  color: var(--muted);
}

.product-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
}

.add-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.add-btn:active { background: var(--blue-dark); }

.empty, .contact-card {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.contact-card {
  text-align: left;
  background: #fff;
  margin: 12px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.contact-card h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 16px;
}

.contact-card p {
  margin: 6px 0;
  color: #555;
  font-size: 13px;
  line-height: 1.5;
}

/* Cart dock：贴在首页底部；.page 已为 tabbar 留空，这里不要再加 tab 高度 */
.cart-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--dock-h);
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 16px;
  z-index: 5;
}

.cart-fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(47,127,214,.35);
}

.cart-fab-ico { font-size: 20px; }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.cart-dock-spacer {
  flex: 1;
}

.checkout-btn {
  min-width: 120px;
  height: 40px;
  padding: 0 20px;
  border-radius: 20px;
  background: #9ec5ef;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.checkout-btn.has-items {
  background: var(--blue);
}

/* Tabbar */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 10;
}

.page-detail.active ~ .tabbar { display: none; }

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #999;
  font-size: 11px;
}

.tab.active { color: var(--blue); }

.tab-ico { font-size: 18px; line-height: 1; }

/* Detail */
.detail-header {
  height: 46px;
  background: var(--blue);
  color: #fff;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  flex-shrink: 0;
}

.detail-header h1 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}

.back-btn {
  color: #fff;
  font-size: 30px;
  line-height: 1;
  height: 46px;
}

.detail-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 1;
  background: #f3f4f6;
  object-fit: contain;
  display: block;
}

.detail-info {
  padding: 14px 16px 8px;
  background: #fff;
}

.detail-info h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.detail-price {
  color: var(--blue);
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.detail-specs {
  margin-top: 10px;
  background: #fff;
  border-top: 8px solid var(--bg);
  padding: 4px 16px;
}

.spec-row {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.spec-row:last-child { border-bottom: 0; }

.spec-label {
  width: 56px;
  color: #666;
  flex-shrink: 0;
}

.spec-value { color: #333; }

.video-link {
  color: var(--blue);
  font-weight: 600;
}

.detail-video-block {
  margin: 12px 16px 0;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.detail-video-block video {
  width: 100%;
  display: block;
  max-height: 240px;
  background: #000;
}

.detail-video-block .caption {
  margin: 0;
  padding: 8px 12px;
  color: #ddd;
  font-size: 12px;
  background: #111;
}

.detail-dock {
  height: calc(56px + var(--safe-bottom));
  padding: 8px 12px calc(8px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.detail-home {
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #666;
  font-size: 11px;
}

.detail-add {
  flex: 1;
  height: 42px;
  border-radius: 21px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

/* Sheet */
.sheet[hidden], .video-modal[hidden], .toast[hidden] { display: none !important; }

.sheet {
  position: absolute;
  inset: 0;
  z-index: 30;
}

.sheet-mask, .video-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 70%;
  background: #fff;
  border-radius: 14px 14px 0 0;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.sheet-head h2 {
  margin: 0;
  font-size: 16px;
}

.sheet-head button {
  color: var(--muted);
  font-size: 13px;
}

.sheet-body {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 0;
  min-height: 0;
}

.cart-row {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  align-items: center;
  min-width: 0;
}

.cart-row .product-cover,
.cart-row .cover-placeholder,
.cart-row img {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px;
  max-width: 56px;
  aspect-ratio: auto !important;
  border-radius: 6px;
  object-fit: cover;
  background: #f0f2f5;
  flex-shrink: 0;
  font-size: 10px;
  padding: 4px;
}

.cart-row-main { flex: 1; min-width: 0; }

.cart-row-main h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.cart-row-main p {
  margin: 0;
  color: var(--blue);
  font-weight: 700;
}

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f0f2f5;
  font-size: 16px;
}

.sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.sheet-total strong {
  color: var(--blue);
  font-size: 18px;
}

.sheet-foot > button {
  height: 40px;
  padding: 0 22px;
  border-radius: 20px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.wechat-body {
  padding: 12px 16px 8px;
}

.wechat-tip {
  margin: 0 0 8px;
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}

.wechat-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8px 0 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.wechat-qr {
  width: min(220px, 70vw);
  height: auto;
  border-radius: 8px;
  display: block;
  background: #fff;
}

.wechat-qr-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.wechat-id-line {
  margin: 0 0 10px;
  font-size: 14px;
  color: #333;
  text-align: center;
}

.contact-qr {
  margin: 14px 0;
  text-align: center;
}

.contact-qr img {
  width: min(200px, 70%);
  height: auto;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.contact-qr p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.wechat-id-line strong {
  color: var(--blue);
  font-size: 16px;
}

.order-text {
  margin: 0;
  padding: 12px;
  background: #f5f7fa;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: #333;
  max-height: 42vh;
  overflow: auto;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.checkout-form {
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #555;
}

.checkout-form label em {
  color: var(--danger);
  font-style: normal;
}

.checkout-form input,
.checkout-form textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: #fff;
  outline: none;
  resize: vertical;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  border-color: var(--blue);
}

.checkout-sum {
  margin: 4px 0 0;
  font-size: 15px;
  color: #444;
}

.checkout-sum strong {
  color: var(--blue);
  font-size: 20px;
}

.checkout-submit {
  height: 44px;
  border-radius: 22px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
}

.order-contact {
  color: #555 !important;
}

.order-card h3 {
  align-items: center;
  gap: 8px;
}

.order-status {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  background: #e8f2fc;
  padding: 2px 8px;
  border-radius: 999px;
}

.order-total {
  margin: 4px 0 0 !important;
  color: var(--blue) !important;
  font-size: 18px !important;
  font-weight: 700;
}

#checkout-phone[readonly] {
  background: #f5f7fa;
  color: #666;
}

.wechat-actions {
  gap: 10px;
}

.wechat-actions .ghost-btn {
  background: #eef2f6 !important;
  color: #333 !important;
}

.wechat-actions #open-wechat-btn {
  flex: 1;
}

/* Video modal */
.video-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-box {
  position: relative;
  width: calc(100% - 32px);
  max-width: 420px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  z-index: 1;
}

.video-box video {
  width: 100%;
  display: block;
  max-height: 70vh;
  background: #000;
}

.video-caption {
  margin: 0;
  padding: 10px 12px;
  color: #eee;
  font-size: 13px;
  background: #111;
}

.video-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

/* Orders / Mine */
.sub-header, .mine-hero {
  background: var(--blue);
  color: #fff;
  flex-shrink: 0;
}

.sub-header {
  height: 46px;
  display: grid;
  place-items: center;
}

.sub-header h1 {
  margin: 0;
  font-size: 17px;
}

.orders-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.order-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.order-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

.order-card p {
  margin: 4px 0;
  font-size: 13px;
  color: #666;
}

.order-empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
}

.mine-hero {
  padding: 28px 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}

.mine-hero h1 {
  margin: 0 0 4px;
  font-size: 18px;
}

.mine-hero p {
  margin: 0;
  opacity: .85;
  font-size: 13px;
}

.mine-list {
  margin: 12px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.mine-list button {
  width: 100%;
  text-align: left;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.mine-list button:last-child { border-bottom: 0; }

.mine-tip {
  margin: 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  padding: 4px 16px 0;
}

.auth-tabs button {
  flex: 1;
  height: 36px;
  border-radius: 18px;
  background: #eef2f6;
  color: #666;
  font-size: 14px;
}

.auth-tabs button.active {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.auth-form {
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #555;
}

.auth-form label em {
  color: var(--danger);
  font-style: normal;
}

.auth-form input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: #fff;
  outline: none;
}

.auth-form input:focus {
  border-color: var(--blue);
}

.auth-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.code-row {
  display: flex;
  gap: 8px;
}

.code-row input {
  flex: 1;
  min-width: 0;
}

.send-code-btn {
  flex-shrink: 0;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--blue-soft, #e8f2fc);
  color: var(--blue);
  font-size: 13px;
  white-space: nowrap;
}

.send-code-btn:disabled {
  opacity: .55;
  color: #888;
}

/* Toast */
.toast {
  position: absolute;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(0,0,0,.78);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  max-width: 80%;
  text-align: center;
  pointer-events: none;
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 6px;
  line-height: 1.25;
}

/* ========== 平板 / 电脑适配 ========== */
@media (min-width: 768px) {
  .app {
    max-width: 1080px;
  }

  .top-bar {
    height: 56px;
    padding: 0 16px;
    gap: 12px;
  }

  .search-wrap {
    height: 36px;
    max-width: 520px;
    margin: 0 auto;
  }

  .search-wrap input {
    font-size: 14px;
  }

  .sort-btn {
    font-size: 14px;
  }

  .cats {
    width: 148px;
  }

  .cat-item {
    padding: 16px 14px;
    font-size: 14px;
    text-align: left;
  }

  .goods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
  }

  .product {
    flex-direction: column;
    gap: 0;
    padding: 0 0 12px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(20, 40, 80, .06);
    overflow: hidden;
    min-height: 100%;
    transition: box-shadow .2s ease, transform .2s ease;
  }

  .product:hover {
    background: #fff;
    box-shadow: 0 8px 20px rgba(20, 40, 80, .1);
    transform: translateY(-2px);
  }

  /* 仅作用于商品列表，避免污染购物车缩略图 */
  .goods .cover-wrap,
  .goods .product-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1.15 / 1;
    border-radius: 0;
  }

  .goods .cover-wrap .cover-placeholder,
  .goods .cover-wrap .product-cover {
    border-radius: 0;
  }

  .product-main {
    padding: 12px 12px 8px;
    gap: 6px;
  }

  .product-name {
    font-size: 16px;
  }

  .add-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
  }

  .contact-card,
  .empty {
    grid-column: 1 / -1;
    margin: 0;
  }

  .cart-dock {
    padding: 0 20px;
  }

  .checkout-btn {
    min-width: 140px;
  }

  .detail-scroll {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 0 28px;
    align-content: start;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 24px 12px;
  }

  .detail-cover {
    grid-column: 1;
    grid-row: 1 / span 5;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    align-self: start;
    position: sticky;
    top: 16px;
  }

  .detail-info,
  .detail-specs,
  .detail-video-block {
    grid-column: 2;
  }

  .detail-info {
    padding: 8px 0 4px;
  }

  .detail-specs {
    margin-top: 0;
    border-top: 0;
    padding: 0;
  }

  .detail-video-block {
    margin: 12px 0 0;
  }

  .detail-dock {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
  }

  .sheet-panel {
    left: 50%;
    right: auto;
    width: min(480px, 100%);
    transform: translateX(-50%);
    border-radius: 14px 14px 0 0;
  }

  .video-box {
    width: min(720px, calc(100% - 48px));
    max-width: 720px;
  }

  .orders-body,
  .mine-list {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }

  .mine-hero {
    padding-left: max(20px, calc((100% - 720px) / 2 + 20px));
    padding-right: max(20px, calc((100% - 720px) / 2 + 20px));
  }

  .mine-tip {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 1100px) {
  .app {
    max-width: 1200px;
  }

  .goods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
  }

  .cats {
    width: 168px;
  }

  .product-name {
    font-size: 17px;
  }

  .detail-scroll {
    max-width: 1080px;
    grid-template-columns: 460px minmax(0, 1fr);
  }

  .detail-dock {
    max-width: 1080px;
  }
}

/* 超小屏手机微调 */
@media (max-width: 360px) {
  .cats {
    width: 76px;
  }

  .cat-item {
    font-size: 11px;
    padding: 12px 6px;
  }

  .product-name {
    font-size: 14px;
  }

  .checkout-btn {
    min-width: 96px;
  }
}
