:root {
  --brown: #8b4513;
  --brown2: #a0522d;
  --bg: #fef7f0;
  --card: #fff;
  --text: #1a1a1a;
  --muted: #6b7280;
}
* { box-sizing: border-box; margin: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: linear-gradient(180deg, var(--bg), #f0f0f0);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 24px;
}
.hero {
  text-align: center;
  padding: 22px 16px;
  background: linear-gradient(135deg, var(--brown), var(--brown2));
  color: #fff;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.25);
}
.hero h1 { font-size: 20px; font-weight: 700; }
.hero p { font-size: 12px; opacity: 0.9; margin-top: 4px; }
.tabs {
  display: flex;
  gap: 6px;
  padding: 12px;
  flex-wrap: wrap;
}
.tabs button {
  flex: 1;
  min-width: 72px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 13px;
}
.tabs button.on {
  border-color: var(--brown);
  color: var(--brown);
  font-weight: 700;
}
.tabs em {
  background: #dc2626;
  color: #fff;
  font-style: normal;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 11px;
  margin-left: 4px;
}
.main { padding: 0 12px 12px; max-width: 720px; margin: 0 auto; }
.specialty-banner {
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #f0e6dc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  background: var(--card);
}
.specialty-banner img {
  width: 100%;
  height: auto;
  display: block;
}
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 520px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.card img { width: 100%; height: 110px; object-fit: cover; background: #f5f5f5; }
.card h3 { font-size: 14px; padding: 8px 10px 0; font-weight: 600; }
.meta { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; }
.price { color: var(--brown); font-weight: 700; }
.add {
  border: none;
  background: linear-gradient(135deg, var(--brown), var(--brown2));
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
}
.cart-row {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border: 1px solid #eee;
}
.sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.qty { width: 48px; padding: 4px; border-radius: 6px; border: 1px solid #ddd; }
.link { border: none; background: none; color: #dc2626; font-size: 13px; }
.sum { text-align: right; margin: 12px 0; font-size: 16px; }
.cta {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brown), var(--brown2));
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}
.cta.secondary { background: #e5e7eb; color: #374151; margin-top: 8px; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.form-row { margin-bottom: 10px; }
.form-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.form-row input,
.form-row select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}
.mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.mask.on { opacity: 1; pointer-events: auto; }
.mask.locpick-mask {
  z-index: 70;
}
.panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  z-index: 60;
  padding: 18px;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
}
.panel.on { transform: translateY(0); }
.panel.locpick-panel {
  z-index: 80;
  padding: 0 0 14px;
  max-height: 78vh;
  overflow: hidden;
}
.panel h2 { margin: 0 0 12px; font-size: 18px; }
.cart-delivery {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid #eee;
}
.cart-hint { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.panel.success { text-align: center; padding-bottom: 24px; }
.success-title { font-size: 18px; font-weight: 700; margin: 8px 0 16px; }
.success-desc { font-size: 15px; margin: 0 0 10px; color: #374151; line-height: 1.6; }
.success-eta { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.order-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #eee;
}
.order-head { display: flex; justify-content: space-between; font-weight: 600; }
.tag { font-size: 12px; color: var(--brown); }
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111827;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 送货位置：自定义列表（保证一级/二级说明括号在各机型上一致显示） */
.panel.locpick-panel h2 {
  margin: 0;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 16px 16px 0 0;
}
.loc-scroll {
  max-height: 56vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.loc-sec-title {
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px 6px;
  background: #fafafa;
  color: var(--text);
}
.loc-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px 12px 28px;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  font-size: 14px;
  color: var(--text);
}
.loc-row:active {
  background: #f3f4f6;
}
.locpick-trigger {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 14px;
  text-align: left;
  color: var(--text);
}
.locpick-trigger.placeholder {
  color: var(--muted);
}
