@charset "UTF-8";
/* app.scss —— 当餐美食 Taro 全局样式（阶段0 从小程序 app.wxss 移植） */
/* CSS 变量：H5 用 :root，小程序端 page 选择器 */
page, :root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.7rem;
  color: #333;
  background: #f5f5f5;
  --brand: #e85d2c;
  --brand-light: #ff7a3a;
  --brand-bg: #fff5ef;
  --brand-border: #ffe6d6;
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-page: #f5f5f5;
  --bg-card: #ffffff;
  --radius: 0.4rem;
  --radius-lg: 0.6rem;
  --shadow: 0 0.1rem 0.4rem rgba(0,0,0,0.06);
  --shadow-brand: 0 0.2rem 0.6rem rgba(232,93,44,0.2);
}

/* ========== 通用布局 ========== */
.flex {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
}

.flex-col {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
}

.flex-center {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.flex-between {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
}

.flex-1 {
  -webkit-flex: 1;
      -ms-flex: 1;
          flex: 1;
  min-width: 0;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ellipsis-2 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ========== 搜索栏 ========== */
.search-bar {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  background: #f2f2f2;
  border-radius: 0.8rem;
  padding: 0.35rem 0.6rem;
  margin: 0.4rem 0.6rem;
}

.search-bar .search-icon {
  font-size: 0.8rem;
  color: #999;
  margin-right: 0.3rem;
}

.search-bar .search-input {
  -webkit-flex: 1;
      -ms-flex: 1;
          flex: 1;
  font-size: 0.65rem;
  color: #333;
}

.search-bar .search-btn {
  font-size: 0.65rem;
  color: var(--brand);
  font-weight: 600;
  margin-left: 0.3rem;
}

/* ========== 标题栏 ========== */
.section-header {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  padding: 0.6rem 0.6rem 0.3rem;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a1a1a;
}

.section-more {
  font-size: 0.6rem;
  color: #999;
}

/* ========== 商品卡片 ========== */
.product-grid {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: row;
      -ms-flex-direction: row;
          flex-direction: row;
  -webkit-flex-wrap: wrap;
      -ms-flex-wrap: wrap;
          flex-wrap: wrap;
  padding: 0 0.4rem;
}

.product-card {
  /* 2026-09-18：calc() 在 RN 非法被丢弃 → 改百分比+百分比边距 */
  width: 48%;
  margin: 0.2rem 1%;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  -webkit-box-shadow: var(--shadow);
          box-shadow: var(--shadow);
}

.product-card:active {
  -webkit-transform: scale(0.98);
      -ms-transform: scale(0.98);
          transform: scale(0.98);
}

.product-card .card-img {
  width: 100%;
  height: 7.5rem;
  background: #f5f5f5;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
}

.product-card .card-img .img-emoji {
  font-size: 2rem;
}

.product-card .card-img taro-image-core {
  width: 100%;
  height: 100%;
}

.product-card .card-body {
  padding: 0.4rem;
}

.product-card .card-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.2rem;
}

.product-card .card-desc {
  font-size: 0.55rem;
  color: #999;
  margin-bottom: 0.3rem;
}

.product-card .card-bottom {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: flex-end;
      -ms-flex-align: end;
          align-items: flex-end;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
}

/* ========== 价格 ========== */
.price {
  color: var(--brand);
  font-weight: 700;
}

.price-symbol {
  font-size: 0.55rem;
}

.price-integer {
  font-size: 0.9rem;
}

.price-decimal {
  font-size: 0.55rem;
}

.price-original {
  font-size: 0.55rem;
  color: #999;
  text-decoration: line-through;
  margin-left: 0.2rem;
}

/* ========== 标签 ========== */
.tag {
  display: inline-block;
  font-size: 0.5rem;
  padding: 0.1rem 0.3rem;
  border-radius: 0.15rem;
  font-weight: 600;
}

.tag-hot {
  background: #ff4444;
  color: #fff;
}

.tag-new {
  background: #4caf50;
  color: #fff;
}

.tag-brand {
  background: var(--brand-bg);
  color: var(--brand);
}

.tag-sale {
  background: #fff3e0;
  color: #ff6f00;
}

/* ========== 按钮 ========== */
.btn {
  display: -webkit-inline-flex;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  padding: 0.4rem 0.8rem;
  border-radius: 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  border: none;
  line-height: 1.4;
}

.btn:active {
  -webkit-transform: scale(0.97);
      -ms-transform: scale(0.97);
          transform: scale(0.97);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-gradient {
  background: -webkit-linear-gradient(315deg, #e85d2c, #ff7a3a);
  background: linear-gradient(135deg, #e85d2c, #ff7a3a);
  color: #fff;
  -webkit-box-shadow: var(--shadow-brand);
          box-shadow: var(--shadow-brand);
}

.btn-outline {
  background: #fff;
  color: var(--brand);
  border: 0.05rem solid var(--brand);
}

.btn-gray {
  background: #f5f5f5;
  color: #666;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.2rem 0.5rem;
  font-size: 0.6rem;
}

.btn-lg {
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
}

/* ========== 状态徽标 ========== */
.status-badge {
  display: -webkit-inline-flex;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 0.5rem;
  font-size: 0.55rem;
  font-weight: 600;
}

.status-pending {
  background: #fff3e0;
  color: #ff9800;
}

.status-paid {
  background: #e3f2fd;
  color: #2196f3;
}

.status-shipping {
  background: #fce4ec;
  color: #e91e63;
}

.status-completed {
  background: #e8f5e9;
  color: #4caf50;
}

.status-cancelled {
  background: #f5f5f5;
  color: #999;
}

/* ========== 空状态 ========== */
.empty-state {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 3rem 1rem;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.6rem;
  opacity: 0.5;
}

.empty-text {
  font-size: 0.7rem;
  color: #999;
  margin-bottom: 0.6rem;
}

/* ========== 加载状态 ========== */
.loading-mask {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  padding: 2rem 0;
  color: #999;
  font-size: 0.65rem;
}

/* ========== 底部安全区 ========== */
.safe-bottom {
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
}
