/* ============================================================
   都来穿服饰商城 - 三端通用样式
   ============================================================ */

/* ---------- 基础重置 ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ★ 核心魔法：动态根字号 (完美兼容 Tailwind) */
html {
  font-size: calc(16px * (100vw / 375));
  -webkit-text-size-adjust: 100%;
}

/* ★ 当屏幕宽于 540px 时，锁定缩放比例 */
@media (min-width: 540px) {
  html {
    font-size: 23.04px; /* 16 * (540 / 375) */
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: #e5e7eb; /* ★ 大屏时的深灰色底色，用来衬托中间的手机白板 */
  color: #1a1a2e;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

/* ---------- 页面容器 ---------- */
.app-container {
  width: 100%;
  max-width: 540px; /* ★ 放大最大宽度 */
  margin: 0 auto;
  background: #F4F1FA;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 4.375rem; /* ★ 原 70px，改为 4.375rem 以适配动态字号 */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); /* ★ 电脑端加一点阴影更好看 */
}

/* ---------- 卡片 ---------- */
.app-card {
  background: #fff;
  border-radius: 14px;
  margin: 0 8px 12px;
  padding: 14px;
  border: 1px solid #F3F4F6;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.app-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
}

/* ---------- 区块标题栏 ---------- */
.app-section {
  padding: 14px 8px 0;
}

.app-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  background: #F9FAFB;
  padding: 8px 12px;
  border-radius: 6px;
}

.app-section-title .sub {
  font-size: 12px;
  color: #6B7280;
  font-weight: normal;
}

/* ---------- 底部导航栏（三端统一） ---------- */
.app-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;               /* ★ 改为居中定位 */
  transform: translateX(-50%); /* ★ 配合居中 */
  width: 100%;
  max-width: 540px;        /* ★ 匹配容器最大宽度 */
  background: #fff;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  z-index: 50;
}

.app-tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #94A3B8;
  text-decoration: none;
  min-width: 56px;
  padding: 2px 0 6px;
}

.app-tabbar-item .tabbar-icon {
  font-size: 1.25rem;
  line-height: 1;
  display: block;
  margin-top: -2px;
}

.app-tabbar-item.active {
  color: #7C3AED;
  font-weight: 700;
}

/* ---------- 页面头部 ---------- */
.app-header {
  background: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);
  color: #fff;
  padding: 18px 16px;
  text-align: center;
}

/* ---------- 颜色工具类 ---------- */
.text-brand { color: #7C3AED; }
.text-slate { color: #6B7280; }
.text-gray  { color: #9CA3AF; }
.bg-brand   { background: #7C3AED; }

/* ---------- 间距工具类 ---------- */
.px-2 { padding-left: 8px; padding-right: 8px; }
.mt-2 { margin-top: 8px; }
.mb-2 { margin-bottom: 8px; }

/* ---------- 按钮 ---------- */
.app-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: #7C3AED;
  color: #fff;
}

.app-btn:active {
  opacity: 0.85;
}

/* 营销标签通用样式 */
.m-tag {
  display: inline-block;
  padding: 1px 4px;
  margin-left: 4px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: bold;
  vertical-align: middle;
}
.m-tag-coupon { background: #FFF7ED; border: 1px solid #F97316; color: #F97316; }
.m-tag-reduce { background: #FEF2F2; border: 1px solid #EF4444; color: #EF4444; }
.m-tag-discount { background: #F5F3FF; border: 1px solid #8B5CF6; color: #8B5CF6; }