/* 网页版：照搬小程序 app.wxss 的设计令牌和组件（小程序 2rpx 约等于这里 1px） */
:root {
  --bg: #fafafa;
  --card: #ffffff;
  --border: #e5e5e5;
  --fg: #0a0a0a;
  --muted: #737373;
  --muted-bg: #f5f5f5;
  --primary: #171717;
  --accent: #ea580c;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); overflow: hidden; }

/* 顶栏：网站名 + 搜索（InputGroup） */
.top { position: sticky; top: 0; z-index: 10; background: rgba(250, 250, 250, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.top-row { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.brand-icon { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: center; }
.brand-icon img { width: 18px; height: 18px; }
.input-group {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.input-group > img { width: 16px; height: 16px; flex-shrink: 0; }
.input-group input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; color: var(--fg); }
.input-group input::placeholder { color: #a3a3a3; }
.input-group input::-webkit-search-cancel-button { display: none; }
.input-group:focus-within { border-color: #a3a3a3; box-shadow: 0 0 0 3px rgba(163, 163, 163, 0.25); }
.clear { padding: 4px; }
.clear img { width: 14px; height: 14px; }
@media (max-width: 480px) {
  .top-row { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; gap: 10px; }
  .input-group { flex-basis: 100%; }
}

main { padding-top: 16px; padding-bottom: 32px; min-height: 60vh; }

/* bento：4 列网格，大卡 2x2、全部菜单 2x1、其余 1x1（移植自 ReUI shop-hero-2，和小程序首页一样） */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 88px; gap: 8px; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 104px; gap: 12px; } }
.tile { position: relative; border-radius: 12px; overflow: hidden; transition: transform 0.15s ease; }
.tile:hover { transform: translateY(-2px); }
.tile-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 2px; opacity: 0.7; }
.tile-main { grid-column: span 2; grid-row: span 2; color: var(--fg); }
.tile-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-main.photo { color: #fff; }
.tile-main.photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08) 70%); }
.tile-deco { position: absolute; right: 12px; top: 12px; width: 60px; height: 60px; opacity: 0.16; }
.tile-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.tile-headline { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.15; }
.tile-desc { font-size: 11px; line-height: 1.5; opacity: 0.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-cta {
  align-self: flex-start;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  background: #fff;
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.tile-cta img { width: 12px; height: 12px; }
.tile-all { grid-column: span 2; padding: 12px; background: var(--primary); color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.tile-all-row { display: flex; align-items: flex-end; justify-content: space-between; }
.tile-all-row img { width: 18px; height: 18px; }
.tile-all-num { font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.5px; }
.tile-all-unit { font-size: 12px; opacity: 0.7; }
.tile-small { padding: 9px; display: flex; flex-direction: column; justify-content: space-between; color: var(--fg); }
.tile-small.none { opacity: 0.55; }
.tile-icon { width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, 0.75); display: flex; align-items: center; justify-content: center; }
.tile-icon img { width: 16px; height: 16px; }
.tile-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.tile-count { font-size: 10px; opacity: 0.6; }
.t-stirfry { background: #ffedd5; }
.t-noodle { background: #fef3c7; }
.t-cold { background: #dcfce7; }
.t-pastry { background: #fae8d4; }
.t-rice { background: #ecfccb; }
.t-soup { background: #e0e7ff; }
.t-hotpot { background: #fee2e2; }
.t-bbq { background: #f5e1d3; }
.t-fast { background: #fce7f3; }
.t-drink { background: #e0f2fe; }
.t-snack { background: #fef9c3; }
.t-other { background: #f5f5f4; }

/* 首页下面的最新菜品：照片网格（大家常点的竖卡放大版） */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 24px 4px 10px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.pcard { display: flex; flex-direction: column; padding: 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.pcard-img { position: relative; aspect-ratio: 4 / 3; border-radius: 7px; overflow: hidden; background: var(--muted-bg); display: flex; align-items: center; justify-content: center; }
.pcard-img .fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard-img .ph { width: 24px; height: 24px; }
.pcard-body { padding: 8px 4px 4px; }
.pcard-cat { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; color: var(--muted); }
.pcard-name { margin-top: 2px; font-size: 14px; font-weight: 500; }

/* 列表：面包屑 + 左侧分类 + 菜品行 */
.crumb { display: flex; align-items: center; gap: 6px; padding-bottom: 12px; font-size: 14px; }
.crumb-back { display: flex; align-items: center; gap: 2px; height: 28px; padding: 0 8px 0 4px; border-radius: 7px; border: 1px solid var(--border); background: var(--card); font-size: 13px; font-weight: 500; }
.crumb-back img { width: 16px; height: 16px; }
.crumb-sep { width: 1px; height: 14px; background: var(--border); margin: 0 2px; }
.crumb-icon { width: 14px; height: 14px; }
.crumb-title { font-weight: 600; min-width: 0; }
.crumb-count { margin-left: auto; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.menu { display: flex; gap: 16px; align-items: flex-start; }
.side { position: sticky; top: 80px; width: 84px; flex-shrink: 0; border-right: 1px solid var(--border); }
.side-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; color: var(--muted); }
.side-item.on { background: var(--card); color: var(--fg); }
.side-item.on::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.side-name { font-size: 13px; font-weight: 500; text-align: center; }
.side-count { font-size: 10px; }
.list { flex: 1; min-width: 0; }
.sec { scroll-margin-top: 80px; }
.list .sec:first-child .sec-head { padding-top: 0; }
.dish { display: flex; gap: 12px; padding: 12px; }
.dish + .dish { border-top: 1px solid var(--border); }
.dish:hover { background: #fcfcfc; }
.thumb { position: relative; width: 76px; height: 76px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--muted-bg); display: flex; align-items: center; justify-content: center; }
.thumb .fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { width: 20px; height: 20px; }
.dish-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.dish-name { font-size: 15px; font-weight: 500; line-height: 1.35; }
.dish-desc { margin-top: 2px; font-size: 12px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-likes { margin-top: 4px; display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.dish-likes img { width: 12px; height: 12px; }
.chev { width: 16px; height: 16px; align-self: center; flex-shrink: 0; }
@media (max-width: 480px) { .side { width: 72px; } .menu { gap: 10px; } }

/* 菜品详情（移植自 ReUI product-detail-5：大图 + 五列缩略图、分类眉标 + 菜名、介绍） */
.detail { display: grid; gap: 24px; }
@media (min-width: 720px) { .detail { grid-template-columns: 1fr 1fr; align-items: start; gap: 32px; } }
.gallery { display: flex; flex-direction: column; gap: 8px; }
.featured { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--muted-bg); display: flex; align-items: center; justify-content: center; }
.featured .fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.featured .ph { width: 32px; height: 32px; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.thumbs button { position: relative; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--muted-bg); opacity: 0.8; }
.thumbs button.on { opacity: 1; box-shadow: 0 0 0 2px var(--primary); }
.thumbs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-cat { font-size: 11px; font-weight: 500; letter-spacing: 1px; color: var(--muted); }
.d-name { margin: 4px 0 0; font-size: 26px; font-weight: 600; letter-spacing: -0.3px; line-height: 1.25; }
.likes { margin-top: 6px; display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.likes img { width: 12px; height: 12px; }
.about { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.about-text { margin-top: 6px; font-size: 15px; line-height: 1.75; white-space: pre-wrap; }
.about-text.muted { color: var(--muted); }
.order-tip { margin-top: 20px; display: flex; align-items: center; gap: 12px; padding: 12px; }
.order-tip-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; border: 1px solid var(--border); background: var(--muted-bg); display: flex; align-items: center; justify-content: center; }
.order-tip-icon img { width: 18px; height: 18px; }
.order-tip-title { font-size: 14px; font-weight: 500; }
.order-tip-desc { margin-top: 2px; font-size: 12px; color: var(--muted); }

/* 空状态（empty-state-7） */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 24px; }
.empty-media { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: center; }
.empty-media img { width: 22px; height: 22px; }
.empty-title { margin-top: 20px; font-size: 18px; font-weight: 600; }
.empty-desc { margin-top: 6px; max-width: 260px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 32px; margin-top: 20px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); font-size: 13px; font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }

/* 页脚：备案号 */
.foot { border-top: 1px solid var(--border); padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--muted); text-align: center; }
.foot-note { margin-bottom: 8px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.foot-links a:hover { color: var(--fg); text-decoration: underline; }
