/* ==========================================================================
   见山点单 · 顾客端首页（落地页）+ 左侧类目边栏
   - 首页：hero 大图 / 三段入口 / 会员卡 / 进行中订单 / 今日推荐 / 门店卡
   - 动效：hero 慢推、内容错峰上浮、入口弹性入场、数字滚动（prefers-reduced-motion 尊重系统设置）
   - 点单页：类目从顶部横滑改为左侧固定边栏
   ========================================================================== */

/* ---------- 首页容器 ---------- */
.home {
  min-height: 100vh;
  padding: 0 0 112px;
  background: var(--bg);
}

/* ---------- hero ---------- */
.home-hero {
  position: relative;
  height: 288px;
  overflow: hidden;
  border-radius: 0 0 26px 26px;
  background: #20241f;
}
.home-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 40%;
  animation: homeHeroZoom 1.8s var(--ease) both;
}
.home-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 20, 16, 0.22) 0%, rgba(12, 20, 16, 0.05) 38%, rgba(12, 20, 16, 0.72) 100%),
    linear-gradient(90deg, rgba(12, 20, 16, 0.24) 0%, rgba(12, 20, 16, 0) 60%);
}
.home-hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 20px 26px;
  color: #fff;
}
.home-hero__brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  animation: homeRise 0.6s 0.06s var(--ease) both;
}
.home-hero__mark {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.home-hero__en {
  font-size: 9px;
  letter-spacing: 0.22em;
  opacity: 0.72;
}
.home-hero__title {
  margin: 10px 0 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: 0.02em;
  animation: homeRise 0.6s 0.14s var(--ease) both;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}
.home-hero__title span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  opacity: 0.82;
}
.home-hero__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.92;
  animation: homeRise 0.6s 0.22s var(--ease) both;
}
.home-hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.22);
}
.home-hero__sep { opacity: 0.5; }
.home-hero__ann {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  animation: homeRise 0.6s 0.3s var(--ease) both;
}
.home-hero__ann span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 三段入口 ---------- */
.home-modes {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: -20px 16px 0;
}
.home-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 17px 6px 13px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 14px 30px -22px rgba(24, 38, 32, 0.55), 0 1px 0 rgba(24, 38, 32, 0.04);
  border: 1px solid transparent;
  transition: transform 0.16s var(--ease), border-color 0.16s;
  animation: homePop 0.55s var(--ease) both;
}
.home-modes .home-mode:nth-child(1) { animation-delay: 0.1s; }
.home-modes .home-mode:nth-child(2) { animation-delay: 0.18s; }
.home-modes .home-mode:nth-child(3) { animation-delay: 0.26s; }
.home-mode:active { transform: scale(0.965); border-color: var(--line); }
.home-mode__ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 5px;
  border-radius: 15px;
  color: var(--accent);
  background: var(--accent-soft);
  transition: transform 0.2s var(--ease);
}
.home-mode:active .home-mode__ico { transform: scale(1.08) rotate(-3deg); }
.home-mode__title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.home-mode__en {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* ---------- 会员卡 ---------- */
.home-member {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  margin: 14px 16px 0;
  padding: 15px 16px;
  border-radius: 20px;
  text-align: left;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(11, 138, 110, 0.12) 0%, rgba(11, 138, 110, 0) 58%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  animation: homeRise 0.6s 0.3s var(--ease) both;
  transition: transform 0.16s var(--ease);
}
.home-member:active { transform: scale(0.99); }
.home-member__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
}
.home-member__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-member__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.home-member__level {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
}
.home-member__label {
  font-size: 10px;
  color: var(--ink-3);
}
.home-member__bal {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: var(--accent);
}
.home-member__bal i { font-size: 10px; font-style: normal; font-weight: 700; }
.home-member__bal b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.home-member__arrow { color: var(--ink-3); display: grid; }

/* ---------- 进行中订单 ---------- */
.home-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  padding: 14px 16px;
  border-radius: 18px;
  text-align: left;
  background: var(--accent-soft);
  border: 1px solid rgba(11, 138, 110, 0.18);
  animation: homeRise 0.55s 0.34s var(--ease) both;
  transition: transform 0.16s var(--ease);
}
.home-order:active { transform: scale(0.99); }
.home-order__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.home-order__badge {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
}
.home-order__code {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.home-order__meta {
  font-size: 10px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-order__right { color: var(--accent); display: grid; flex: none; }

/* ---------- 今日推荐 ---------- */
.home-reco { margin-top: 22px; }
.home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 18px;
}
.home-section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.home-reco__row {
  display: flex;
  gap: 11px;
  margin-top: 11px;
  padding: 0 16px 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.home-reco__row::-webkit-scrollbar { display: none; }
.home-reco-card {
  flex: none;
  width: 124px;
  text-align: left;
  scroll-snap-align: start;
  animation: homeRise 0.5s var(--ease) both;
}
.home-reco-card:nth-child(1) { animation-delay: 0.04s; }
.home-reco-card:nth-child(2) { animation-delay: 0.1s; }
.home-reco-card:nth-child(3) { animation-delay: 0.16s; }
.home-reco-card:nth-child(4) { animation-delay: 0.22s; }
.home-reco-card:nth-child(5) { animation-delay: 0.28s; }
.home-reco-card:nth-child(6) { animation-delay: 0.34s; }
.home-reco-card:active { transform: scale(0.97); }
.home-reco-card__media {
  position: relative;
  display: block;
  width: 124px;
  height: 106px;
  border-radius: 17px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-card);
}
.home-reco-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}
.home-reco-card:active .home-reco-card__media img { transform: scale(1.05); }
.home-reco-card__tag {
  position: absolute;
  left: 7px;
  top: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  color: #fff;
  background: rgba(17, 24, 20, 0.62);
  backdrop-filter: blur(4px);
}
.home-reco-card__name {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-reco-card__price {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
}

/* ---------- 门店卡 / 页脚 ---------- */
.home-store {
  margin: 20px 16px 0;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  animation: homeRise 0.6s 0.2s var(--ease) both;
}
.home-store__name {
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 800;
}
.home-store__row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 3px 0;
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.home-store__row svg { color: var(--ink-3); margin-top: 2px; flex: none; }
.home-store__row a { color: var(--accent); text-decoration: none; }
.home-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

/* ---------- 点单页：左侧类目边栏 ---------- */
.menu-body {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: start;
  gap: 2px;
  margin-top: 8px;
}
.catnav {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0 24px;
}
.catnav__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  min-height: 52px;
  padding: 11px 8px 11px 12px;
  border-radius: 0 14px 14px 0;
  border-left: 3px solid transparent;
  text-align: left;
  background: transparent;
  transition: background 0.18s var(--ease), border-color 0.18s, transform 0.14s;
}
.catnav__item:active { transform: scale(0.97); }
.catnav__name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  line-height: 1.35;
  transition: color 0.18s, font-weight 0.18s;
}
.catnav__count {
  font-size: 9.5px;
  color: var(--ink-3);
  line-height: 1.3;
}
.catnav__item.is-on {
  background: var(--surface);
  border-left-color: var(--accent);
  box-shadow: 0 8px 18px -16px rgba(24, 38, 32, 0.5);
}
.catnav__item.is-on .catnav__name {
  color: var(--ink);
  font-weight: 800;
}
.catnav__item.is-on .catnav__count { color: var(--accent); }
.menu-body .menu-list {
  gap: 9px;
  padding: 2px 0 14px 6px;
  min-width: 0;
}
.menu-body .item-card { padding: 10px; gap: 10px; border-radius: 16px; }
.menu-body .thumb-wrap { width: 74px; height: 74px; border-radius: 12px; }
.menu-body .thumb { width: 100%; height: 100%; object-fit: cover; }
.menu-body .item-name { font-size: 13.5px; }
.menu-body .item-desc { font-size: 10.5px; }
.menu-body .item-desc { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.menu-body .price { font-size: 16px; }
.menu-body .add-btn { width: 30px; height: 30px; }

/* 三段模式（堂食/自取/外卖） */
.segmented--3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex: 0 0 auto;
}
.segmented--3 .seg-btn { padding: 0 12px; }
.mode-row .segmented--3 + .mode-hint { font-size: 10px; }

/* ---------- 动效 ---------- */
@keyframes homeHeroZoom {
  from { transform: scale(1.09); }
  to { transform: scale(1); }
}
@keyframes homeRise {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes homePop {
  0% { opacity: 0; transform: translateY(16px) scale(0.94); }
  62% { opacity: 1; transform: translateY(-2px) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes homeBalPop {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@media (max-width: 380px) {
  .menu-body { grid-template-columns: 82px minmax(0, 1fr); }
  .menu-body .thumb-wrap { width: 66px; height: 66px; }
  .home-mode__title { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__bg,
  .home-hero__brand,
  .home-hero__title,
  .home-hero__meta,
  .home-hero__ann,
  .home-mode,
  .home-member,
  .home-order,
  .home-reco-card,
  .home-store {
    animation: none !important;
  }
  .home-mode,
  .home-member,
  .home-order,
  .home-reco-card,
  .menu-body .item-card {
    transition: none;
  }
}


/* 18) 双币种与会员身份 */
.price-alt {
  margin-left: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0;
}
.price-alt::before { content: '≈ '; }
.home-reco-card__alt { display: block; }
.home-reco-card__alt::before { content: ''; }
.home-reco-card__price { display: flex; align-items: baseline; gap: 4px; }
.home-reco-card__price .home-reco-card__alt { font-size: 10px; font-weight: 600; color: var(--ink-3); }
.cart-alt {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  color: var(--ink-3);
}
.amount-row--alt { padding-top: 2px; }
.amount-row--alt span { color: var(--ink-3); font-size: 11.5px; }
.checkout-amt-alt { display: block; margin-top: 1px; font-size: 10px; color: var(--ink-3); text-align: right; }
.order-amt-alt { display: block; font-size: 10px; font-style: normal; font-weight: 600; color: var(--ink-3); }
.home-member--guest .home-member__avatar { color: var(--ink-2); background: var(--surface-2); }
.home-member__level.is-vip {
  color: #8a5a00;
  background: linear-gradient(135deg, #fff1c9, #ffe2a1);
}
.home-member__cta {
  flex: none;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
}
.badge--vip {
  color: #8a5a00 !important;
  background: linear-gradient(135deg, #fff1c9, #ffe2a1) !important;
}
.member-card--guest .balance-box { background: var(--surface-2); }
.member-submit { width: 100%; margin-top: 4px; }
.sheet--member .sheet-body { padding: 16px 18px 26px; }
.sheet--member .field + .field { margin-top: 12px; }
.menu-body { padding-bottom: 92px; }
.home-reco__row { scroll-snap-type: none; }
.home-reco-card { scroll-snap-align: none; }


/* 19) 会员登录/注册 + 图形验证码 */
.member-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--surface-2);
}
.member-tab {
  height: 36px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  transition: background 0.18s var(--ease), color 0.18s;
}
.member-tab.is-on {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.captcha-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.captcha-img {
  flex: none;
  width: 132px;
  height: 44px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f2f6f3;
}
.captcha-img svg { display: block; width: 132px; height: 44px; }
.captcha-field { flex: 1; min-width: 0; margin-top: 0; }
.captcha-loading {
  display: grid;
  place-items: center;
  width: 132px;
  height: 44px;
  font-size: 11px;
  color: var(--ink-3);
}
.sheet--member .field + .field { margin-top: 12px; }
.sheet--member .field { margin-top: 12px; }
.sheet--member .member-submit { width: 100%; margin-top: 16px; }


/* 20) 储值预付 / 预约说明 */
.prepay-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(11, 138, 110, 0.18);
  color: var(--ink);
}
.prepay-box.is-reserve {
  background: var(--surface-2);
  border-color: var(--line);
}
.prepay-box.is-warn {
  background: #fff4ec;
  border-color: rgba(196, 92, 38, 0.25);
}
.prepay-box__main { display: flex; flex-direction: column; gap: 3px; }
.prepay-box__main b { font-size: 12.5px; font-weight: 800; }
.prepay-box__main span { font-size: 10.5px; color: var(--ink-3); line-height: 1.5; }
.prepay-box.is-warn .prepay-box__main b { color: #a8431c; }
