/* 餐小保 App · 移动端样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --orange: #d97706; --orange-light: #fef3c7; --orange-dark: #92400e;
  --teal: #0d9488; --teal-light: #ccfbf1;
  --bg: #f5f5f4; --card: #ffffff; --border: #e7e5e4;
  --text: #1c1917; --text-sec: #57534e; --text-hint: #a8a29e;
  --red: #dc2626; --green: #16a34a; --blue: #2563eb;
}
html { font-size: 16px; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column;
}

/* 顶部 */
.header {
  background: var(--orange); color: #fff; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 10;
}
.header .title { font-size: 17px; font-weight: 600; }
.header .phone-btn {
  background: rgba(255,255,255,.2); border: none; color: #fff;
  padding: 6px 12px; border-radius: 20px; font-size: 13px; cursor: pointer;
}

/* 页面容器 */
.page { flex: 1; overflow-y: auto; padding: 12px 12px 70px; display: none; }
.page.active { display: block; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: var(--card);
  border-top: 1px solid var(--border); display: flex; z-index: 20;
}
.tabbar button {
  flex: 1; border: none; background: none; padding: 8px 0 6px;
  font-size: 12px; color: var(--text-hint); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar button.active { color: var(--orange); }
.tabbar .icon { font-size: 20px; }

/* 通用卡片 */
.card {
  background: var(--card); border-radius: 12px; border: 1px solid var(--border);
  padding: 14px; margin-bottom: 10px;
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }

/* 首页双入口 */
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.entry {
  border-radius: 12px; padding: 18px 12px; text-align: center;
  font-size: 15px; font-weight: 600; cursor: pointer; border: none;
}
.entry.ware { background: #fee2e2; color: #991b1b; }
.entry.pest { background: var(--teal-light); color: #134e4a; }
.entry .sub { font-size: 12px; font-weight: 400; margin-top: 4px; opacity: .8; }

/* 商品卡 */
.product-card { display: flex; gap: 12px; }
.product-img {
  width: 72px; height: 72px; border-radius: 10px; background: var(--orange-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; flex-shrink: 0;
}
.product-info { flex: 1; min-width: 0; }
.product-name { font-size: 15px; font-weight: 600; }
.product-desc { font-size: 12px; color: var(--text-sec); margin: 2px 0; }
.product-price { font-size: 15px; color: var(--red); font-weight: 600; }
.product-price small { font-size: 12px; color: var(--text-hint); font-weight: 400; }
.btn {
  border: none; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:active { background: var(--orange-dark); }
.btn-outline { background: #fff; border: 1px solid var(--orange); color: var(--orange); }
.btn-block { width: 100%; padding: 12px; font-size: 15px; font-weight: 600; border-radius: 10px; }
.btn-ghost { background: none; border: none; color: var(--blue); font-size: 13px; }

/* 配送提示条 */
.delivery-tip {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 10px;
}

/* 规格弹层 */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 30;
  display: none;
}
.sheet-mask.show { display: block; }
.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: var(--card);
  border-radius: 16px 16px 0 0; padding: 16px; z-index: 31;
  max-height: 70vh; overflow-y: auto;
}
.spec-option {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
  font-size: 13px; cursor: pointer; margin-right: 8px; margin-bottom: 8px; display: inline-block;
}
.spec-option.selected { border-color: var(--orange); background: var(--orange-light); color: var(--orange-dark); }
.qty-stepper { display: flex; align-items: center; gap: 12px; }
.qty-stepper button {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; font-size: 18px; cursor: pointer;
}
.qty-stepper .qty { font-size: 16px; font-weight: 600; min-width: 40px; text-align: center; }

/* 清单 */
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }
.cart-item .info { flex: 1; }
.cart-item .name { font-size: 14px; font-weight: 500; }
.cart-item .spec { font-size: 12px; color: var(--text-sec); }
.cart-item .price { font-size: 14px; color: var(--red); }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: var(--text-sec); }
.summary-row.total { font-size: 16px; font-weight: 600; color: var(--text); border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.hint { font-size: 12px; color: var(--text-hint); }
.hint-green { color: var(--green); }
.hint-orange { color: var(--orange); }

/* 表单 */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; color: var(--text-sec); margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: inherit; background: #fff;
}
.form-group textarea { resize: vertical; min-height: 60px; }

/* 订单 */
.order-status-tag {
  display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px;
}
.st-wait-quote { background: #fef3c7; color: #92400e; }
.st-wait-confirm { background: #dbeafe; color: #1e40af; }
.st-wait-pay { background: #fce7f3; color: #9d174d; }
.st-wait-ship { background: #e0e7ff; color: #3730a3; }
.st-shipping { background: #d1fae5; color: #065f46; }
.st-done { background: #f3f4f6; color: #6b7280; }
.st-cancel { background: #f3f4f6; color: #9ca3af; }

.timeline { border-left: 2px solid var(--border); padding-left: 14px; margin: 10px 0; }
.timeline-item { position: relative; padding-bottom: 12px; font-size: 13px; }
.timeline-item::before {
  content: ''; position: absolute; left: -19px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--orange);
}
.timeline-item .time { font-size: 12px; color: var(--text-hint); }

.quote-box {
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
  padding: 12px; margin: 10px 0;
}
.quote-box .row { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; }
.quote-box .total { font-size: 16px; font-weight: 600; color: var(--blue); }

/* 消杀服务 */
.service-card { display: flex; justify-content: space-between; align-items: center; }
.service-card .info { flex: 1; }
.service-card .name { font-size: 14px; font-weight: 600; }
.service-card .desc { font-size: 12px; color: var(--text-sec); }
.service-card .price { font-size: 14px; color: var(--red); font-weight: 600; margin-top: 2px; }
.check-wrap { margin-left: 10px; }
.check-wrap input { width: 20px; height: 20px; accent-color: var(--teal); }
.badge-rec { font-size: 11px; background: var(--orange); color: #fff; padding: 1px 6px; border-radius: 8px; margin-left: 4px; }

/* 我的 */
.menu-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item .arrow { color: var(--text-hint); }

/* 空状态 */
.empty { text-align: center; padding: 40px 20px; color: var(--text-hint); font-size: 13px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }

/* Toast */
#toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.75); color: #fff; padding: 8px 20px;
  border-radius: 20px; font-size: 13px; z-index: 100; display: none;
}
