/* 门面型模板（餐饮 / 实体店）。主色可在 config.json 的 storefront.color 改，前端写进 --sf。 */
html, body { overflow-x: clip; }
body.sf { --sf: var(--green); --sf-soft: var(--green-soft); padding-bottom: 24px; }
body.sf .topbar { background: var(--sf); }

.sf-announce {
  background: #fef3c7; color: #92400e; font-size: 14px; font-weight: 600; text-align: center;
  padding: 10px 16px; border-bottom: 1px solid #fde68a;
}

.sf-hero { position: relative; background: var(--sf); color: #fff; }
.sf-cover {
  height: 230px; background-size: cover; background-position: center;
  background-color: var(--sf);
}
.sf-cover.art {
  background-image:
    radial-gradient(circle at 78% 30%, rgba(255,255,255,.18) 0 38px, transparent 39px),
    radial-gradient(circle at 18% 70%, rgba(255,255,255,.10) 0 70px, transparent 71px),
    linear-gradient(160deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.25));
  display: flex; align-items: center; justify-content: center; font-size: 88px;
}
.sf-hero-body {
  position: relative; margin-top: -64px; padding: 70px 18px 18px;
  background: linear-gradient(180deg, transparent 0, rgba(0,0,0,.55) 46px, var(--sf) 120px);
}
.sf-name { font-size: 28px; font-weight: 800; line-height: 1.15; margin: 6px 0 4px; text-wrap: balance; }
.sf-tagline { opacity: .9; margin: 0 0 10px; font-size: 15px; }
.sf-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.16); padding: 4px 12px; border-radius: 999px; }
.sf-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; }
.sf-status.closed::before { background: #f87171; }
.sf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-tags span { font-size: 12px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 2px 10px; }

.sf-main { padding: 16px 16px 0; max-width: 720px; margin: 0 auto; }
.sf-actions { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.sf-act {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; font-size: 13px; font-weight: 600; color: var(--text); text-align: center; padding: 8px 6px;
}
.sf-act span { font-size: 20px; }
.sf-act.wa { background: #25d366; border-color: #25d366; color: #fff; }

.sf-luck {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; margin-bottom: 18px;
  background: linear-gradient(100deg, #fff7ed, #fdf2f8); border: 1px solid #fed7aa; border-radius: 16px; padding: 12px 14px; color: var(--text);
}
.sf-luck-box { font-size: 30px; animation: sf-wiggle 2.6s ease-in-out infinite; }
@keyframes sf-wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-6deg); } }
.sf-luck-text { flex: 1; display: flex; flex-direction: column; }
.sf-luck-text b { font-size: 15px; }
.sf-luck-text small { color: var(--muted); font-size: 12px; }
.sf-luck-go { font-weight: 800; color: #c2410c; }
@media (prefers-reduced-motion: reduce) { .sf-luck-box { animation: none; } }

/* 招牌 */
.sf-sig { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 18px; padding: 0 16px 4px; }
.sf-sig-card { flex: 0 0 62%; scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sf-sig-card .ph { aspect-ratio: 4/3; background: var(--sf-soft); display: flex; align-items: center; justify-content: center; font-size: 46px; }
.sf-sig-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.sf-sig-card .bd { padding: 10px 12px; }
.sf-sig-card .nm { font-weight: 700; font-size: 15px; }
.sf-sig-card .ds { font-size: 12px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-sig-card .pr { color: var(--sf); font-weight: 800; margin-top: 6px; }

/* 菜单 */
.sf-cats { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 10px; padding-bottom: 2px; }
.sf-cats .chip { flex: 0 0 auto; }
.sf-cats .chip.active { background: var(--sf); border-color: var(--sf); }
.sf-cat-title { font-size: 14px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }
.sf-item { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.sf-item .th { flex: 0 0 64px; height: 64px; border-radius: 10px; background: var(--sf-soft); display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden; }
.sf-item .th img { width: 100%; height: 100%; object-fit: cover; }
.sf-item .bd { flex: 1; min-width: 0; }
.sf-item .nm { font-weight: 600; font-size: 15px; }
.sf-item .nm .sig { font-size: 11px; color: #c2410c; background: #fff7ed; border-radius: 999px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.sf-item .ds { font-size: 12px; color: var(--muted); }
.sf-item .pr { font-weight: 800; color: var(--sf); white-space: nowrap; }
.sf-item.out { opacity: .55; }
.sf-item.out .pr { color: var(--muted); font-weight: 600; font-size: 12px; }

/* 视频 */
.sf-videos { display: grid; gap: 8px; margin-bottom: 18px; }
.sf-video { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: var(--text); }
.sf-video .pl { width: 40px; height: 40px; border-radius: 50%; background: var(--sf); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }

/* 资料 */
.sf-info { display: grid; gap: 10px; margin: 18px 0; }
@media (min-width: 640px) { .sf-info { grid-template-columns: 1fr 1fr; } }
.sf-info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.sf-info-card h3 { font-size: 15px; margin-bottom: 8px; }
.sf-hours-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.sf-hours-row:last-child { border-bottom: 0; }
.sf-hours-row.today { font-weight: 700; color: var(--sf); }
.sf-hours-row .t { white-space: nowrap; }
.sf-map-btns { display: flex; gap: 8px; margin: 10px 0 6px; }

.sf-review { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.sf-review .btn { flex: 0 0 auto; width: auto; padding: 0 16px; background: #f59e0b; border-color: #f59e0b; }
.sf-social { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.sf-social a { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--text); }

.sf-fab {
  position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px;
  box-shadow: 0 8px 20px rgba(0,0,0,.2); z-index: 50;
}

/* 出示优惠券 */
.coupon-show { text-align: center; }
.coupon-show .big { font-size: 40px; font-weight: 900; color: #c2410c; margin: 6px 0; }
.coupon-show .code { font-family: ui-monospace, Menlo, monospace; font-size: 30px; font-weight: 800; letter-spacing: 3px; background: #fff7ed; border: 2px dashed #fb923c; border-radius: 14px; padding: 14px 8px; margin: 10px 0; }
.coupon-show .nav { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* 响应式：平板 / 电脑 / 手机横屏 */
@media (min-width: 640px) {
  .sf-sig-card { flex-basis: 40%; }
  .sf-cover { height: 280px; }
  .sf-hero-body { padding-left: max(18px, calc((100% - 720px) / 2 + 16px)); padding-right: max(18px, calc((100% - 720px) / 2 + 16px)); }
}
@media (min-width: 1024px) {
  .sf-main { max-width: 1100px; padding: 24px 32px 0; }
  .sf-hero-body { padding-left: max(32px, calc((100% - 1100px) / 2 + 32px)); padding-right: max(32px, calc((100% - 1100px) / 2 + 32px)); }
  .sf-cover { height: 360px; font-size: 120px; }
  .sf-name { font-size: 40px; }
  .sf-actions { grid-template-columns: 2fr 1fr 1fr; }
  .sf-sig { margin: 0 0 22px; padding: 0 0 4px; }
  .sf-sig-card { flex-basis: calc((100% - 30px) / 4); }
  #sf-menu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; }
  #sf-menu > .sf-cat-title { grid-column: 1 / -1; }
  .sf-videos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sf-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-fab { right: 28px; bottom: 28px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .sf-cover { height: 150px; font-size: 64px; }
  .sf-hero-body { margin-top: -50px; padding-top: 50px; }
  .sf-name { font-size: 24px; }
  .sf-sig-card { flex-basis: 30%; }
  #sf-menu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; }
  #sf-menu > .sf-cat-title { grid-column: 1 / -1; }
}

.sf-lb { font-style: normal; }
.sf-branch { padding: 10px 0; border-top: 1px solid var(--line, #eee); }
.sf-branch:first-child { border-top: 0; padding-top: 0; }
.sf-branch b { display: block; }
.sf-branch p { margin: 2px 0 8px; font-size: 14px; }
