* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: #faf7f2;
  color: #222;
  padding-bottom: 88px;
}
button, select, input, textarea { font: inherit; }
button {
  border: 1px solid #bbb;
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.primary { background: #e8590c; border-color: #e8590c; color: #fff; }

.store-header {
  background: #e8590c;
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.store-header h1 { font-size: 20px; margin: 0; }
.status { font-size: 13px; padding: 2px 8px; border-radius: 999px; background: #fff3; }
.status.open { background: #2e7d32; }
.status.closed { background: #666; }
.line-btn {
  margin-left: auto;
  background: #06c755;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.menu { max-width: 640px; margin: 0 auto; padding: 8px 12px; }
.category h2 { font-size: 17px; margin: 18px 0 6px; color: #7a3500; }
.item {
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px #0001;
}
.item.sold { opacity: 0.55; }
.item-head { display: flex; justify-content: space-between; gap: 8px; }
.item-name { font-weight: 600; }
.item-price { color: #444; }
.item-controls, .addons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { padding: 2px 10px; }
.stepper span { min-width: 1.5em; text-align: center; }
.stepper-label { font-size: 13px; color: #555; margin-right: 2px; }

.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #222;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-total { margin-left: 10px; font-weight: 600; }

.modal {
  position: fixed;
  inset: 0;
  background: #0008;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
}
.modal[hidden] { display: none; }
.modal-body {
  background: #fff;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 18px;
}
.modal-body h2 { margin: 0 0 10px; font-size: 18px; }
.modal-body h3 { margin: 16px 0 8px; font-size: 15px; }
.modal-body label { display: block; margin-bottom: 10px; font-size: 14px; }
.modal-body input, .modal-body select, .modal-body textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.cart-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #ddd; font-size: 14px; }
.sum { font-weight: 600; }
.error { color: #c62828; min-height: 1.2em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* ===== 首頁／區域頁 ===== */
body.home { background: #fbf8f3; padding-bottom: 96px; }
.muted { color: #888; font-size: 14px; }
.error { color: #c62828; font-size: 14px; }
.count { font-size: 13px; color: #888; font-weight: normal; }
.back-link { color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; }

.home-hero {
  background: linear-gradient(135deg, #ff6a00, #ff8c00);
  color: #fff;
  padding: 20px 18px 28px;
  border-radius: 0 0 28px 28px;
}
.district-hero {
  background: linear-gradient(135deg, #ff6a00, #ff8c00);
  color: #fff;
  padding: 16px 18px 24px;
  border-radius: 0 0 28px 28px;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-name { font-size: 28px; font-weight: 900; letter-spacing: 4px; }
.brand-en { font-size: 11px; letter-spacing: 3px; opacity: 0.8; }
.brand-line { margin: 4px 0 0; font-size: 12px; opacity: 0.85; }
.home-hero h1, .district-hero h1 { font-size: 28px; line-height: 1.25; margin: 14px 0 6px; }
.home-hero-sub { margin: 0 0 14px; font-size: 14px; opacity: 0.9; }
.home-search {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 13px 16px;
  font-size: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  outline: none;
}

.home-main { padding: 6px 14px 0; max-width: 640px; margin: 0 auto; }
.home-section { margin-top: 18px; }
.section-title {
  font-size: 16px;
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 4px solid #ff6a00;
  line-height: 1.2;
}

.district-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.district-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 116px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff6a00, #ff8c00);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(255, 106, 0, 0.2);
}
.district-card.is-soon { background: #e9e6e1; color: #777; box-shadow: none; }
.district-name { font-size: 20px; font-weight: 900; }
.district-sub { font-size: 12px; opacity: 0.9; }
.district-count { margin-top: auto; font-size: 12px; font-weight: 700; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap;
  border: 1.5px solid #eadfd2;
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  color: #555;
}
.chip.is-on { background: #ff6a00; border-color: #ff6a00; color: #fff; }

.hot-grid, .store-list { display: grid; gap: 12px; }
.store-card {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.store-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.store-card-head h3 { margin: 0; font-size: 17px; }
.store-meta { margin: 6px 0 0; font-size: 13px; color: #777; }
.store-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #fff3e8; color: #c2410c; }
.hot-badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #ffe0cc; color: #b53d00; font-weight: 700; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; font-weight: 700; }
.badge-open { background: #e8f5e9; color: #2e7d32; }
.badge-closed { background: #eeeeee; color: #777; }
.badge-holiday { background: #fff3e0; color: #b45309; }
.btn-order {
  background: linear-gradient(90deg, #ff6a00, #ff8c00);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 12px;
}
.btn-disabled { color: #999; font-size: 13px; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.nav-item {
  flex: 1;
  border: 0;
  background: none;
  padding: 2px 0;
  font-size: 12px;
  color: #999;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}
.nav-item.is-active { color: #ff6a00; font-weight: 700; }
.nav-icon { font-size: 20px; line-height: 1.1; }

/* ===== 首頁改版：美團／大眾點評風格（純文字、無圖片） ===== */
body.home { background: #f5f5f5; }
.home-top {
  background: linear-gradient(180deg, #ffd100, #ffe14d);
  padding: 12px 14px 14px;
}
.top-row { display: flex; align-items: center; justify-content: space-between; color: #222; }
.home-top .brand-name { font-size: 20px; font-weight: 900; letter-spacing: 2px; }
.top-loc { font-size: 15px; font-weight: 700; }
.home-top .home-search {
  margin-top: 10px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 15px;
  background: #fff;
  box-shadow: none;
  outline: none;
}

.home-main { padding: 0; max-width: 640px; margin: 0 auto; }
.home-section { margin-top: 8px; background: #fff; padding: 14px; }
.home-section:first-child { margin-top: 0; }
.section-title {
  font-size: 16px;
  font-weight: 800;
  color: #222;
  padding-left: 0;
  border-left: 0;
  margin: 0 0 12px;
}

.district-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.district-card {
  min-height: auto;
  padding: 12px;
  border-radius: 10px;
  background: #fff8e6;
  border: 1px solid #ffe08a;
  color: #222;
  box-shadow: none;
}
.district-name { font-size: 17px; font-weight: 800; }
.district-sub { font-size: 12px; color: #777; opacity: 1; }
.district-count { font-size: 13px; color: #ff6a00; font-weight: 700; }
.district-card.is-soon { background: #f3f3f3; border-color: #eee; color: #999; }

.chips { gap: 18px; padding-bottom: 2px; }
.chip {
  border: 0;
  background: none;
  border-radius: 0;
  padding: 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}
.chip.is-on { background: none; color: #ff6a00; font-weight: 800; border-bottom: 2px solid #ff6a00; }

.hot-grid, .store-list { gap: 0; }
.store-card {
  background: #fff;
  border-radius: 0;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: none;
}
.store-card:last-child { border-bottom: 0; }
.store-card img { display: none; }
.store-card-head h3 { font-size: 16px; font-weight: 800; }
.store-meta { color: #888; font-size: 13px; }
.store-card-foot { margin-top: 8px; }
.tag { background: #f5f5f5; color: #666; font-size: 12px; }
.hot-badge { background: #fff1e6; color: #ff6a00; font-size: 12px; }
.btn-order {
  background: #ff6a00;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
}
.btn-disabled { color: #aaa; font-size: 13px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 60;
  white-space: nowrap;
}

