/* ===== 基础样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --primary: #1a2b4a;      /* 深蓝，用于店名头部 */
  --accent: #e23b3b;       /* 价格/强调红 */
  --bg: #f2f4f7;
  --card: #ffffff;
  --text: #1f2430;
  --text2: #6b7280;
  --line: #e6e9ef;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(20, 30, 60, .06);
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 15px; }
.muted { color: var(--text2); }
.hidden { display: none !important; }

/* 通用容器 */
.wrap {
  max-width: 1000px; margin: 0 auto;
  /* 左右留白加大并适配全面屏安全区（刘海/圆角两侧不被遮挡） */
  padding-right: 16px; padding-left: 16px;
  padding-right: calc(16px + env(safe-area-inset-right));
  padding-left: calc(16px + env(safe-area-inset-left));
}

/* ===== 空状态 ===== */
.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--text2);
}
.empty .big { font-size: 44px; margin-bottom: 12px; }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 17px; }

/* ===== 骨架屏 ===== */
.skeleton {
  background: linear-gradient(90deg, #edf0f4 25%, #f7f8fa 50%, #edf0f4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== 通用标签 ===== */
.badge {
  display: inline-block; font-size: 12px; line-height: 1;
  padding: 5px 9px; border-radius: 999px; font-weight: 600;
}
.badge-on   { background: #e6f7ee; color: #128a4d; }
.badge-sold { background: #fdeaea; color: var(--accent); }
.badge-off  { background: #eef0f3; color: #8a919c; }

@media (max-width: 640px) {
  /* 手机上也保持与桌面一致的左右留白（覆盖旧的 10px 贴边值） */
  .wrap {
    padding-right: 16px; padding-left: 16px;
    padding-right: calc(16px + env(safe-area-inset-right));
    padding-left: calc(16px + env(safe-area-inset-left));
  }
}
