/* ================= 基础 ================= */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",Roboto,sans-serif;
  background:#e9e9e9;color:#1a1a1a;
  -webkit-font-smoothing:antialiased;
}
img{display:block;max-width:100%;border:0}
button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:pointer}
a{color:inherit;text-decoration:none}
.ic{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* 桌面端居中，模拟手机宽度 */
.app{
  position:relative;max-width:480px;margin:0 auto;min-height:100vh;
  background:#fff;overflow-x:hidden;padding-bottom:24px;
  box-shadow:0 0 40px rgba(0,0,0,.08);
}

/* ================= 顶部工具条 ================= */
.topbar{
  position:absolute;top:0;left:0;right:0;z-index:20;
  display:flex;align-items:center;gap:8px;
  padding:calc(env(safe-area-inset-top) + 8px) 10px 8px;
  max-width:480px;margin:0 auto;
}
.pill{
  display:inline-flex;align-items:center;gap:5px;
  height:32px;padding:0 12px;border-radius:16px;
  background:rgba(255,255,255,.82);backdrop-filter:blur(8px);
  font-size:13px;font-weight:500;
  box-shadow:0 1px 3px rgba(0,0,0,.10);
}
.pill.round{width:32px;padding:0;justify-content:center}
.pill .ic{width:16px;height:16px}
.spacer{flex:1}

/* 封面 */
.hero{position:relative;height:200px;background:#f3f1ec;overflow:hidden}
.hero img{width:100%;height:100%;object-fit:cover}
.hero-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.55),rgba(255,255,255,0) 45%)}

/* ================= 店铺卡片 ================= */
.shopcard{
  position:relative;z-index:10;margin:-34px 10px 0;
  background:#fff;border-radius:14px;padding:14px 14px 16px;
  box-shadow:0 4px 18px rgba(0,0,0,.06);
}
.sc-head{display:flex;align-items:center;gap:10px}
.sc-avatar{width:44px;height:44px;border-radius:6px;object-fit:cover;background:#f0efeb;flex:0 0 auto}
.sc-meta{min-width:0}
.sc-meta h1{margin:0;font-size:17px;font-weight:600;letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sc-meta p{margin:4px 0 0;font-size:12.5px;color:#9a9a9a}

.sc-body{display:flex;gap:10px;margin-top:14px}
.contacts{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}
.cta{
  display:flex;align-items:center;gap:8px;height:38px;padding:0 12px;
  border-radius:8px;color:#fff;font-size:13.5px;font-weight:500;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.cta svg{width:17px;height:17px;flex:0 0 auto;fill:currentColor}
.cta.whatsapp{background:#25d366}
.cta.facebook{background:#1877f2}
.cta.reviews{background:#f59e0b}
.cta.telegram{background:#2aabee}
.cta.email,.cta.phone,.cta.wechat{background:#2f2f2f}

.qrcard{
  width:104px;flex:0 0 auto;border:1px solid #e6e3dc;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  background:#fff;overflow:hidden;min-height:38px;
}
.qrcard img{width:100%;height:100%;object-fit:contain;padding:4px}
.qrcard span{font-size:12px;color:#c9c4b8;letter-spacing:2px}
.qrcard.has-img span{display:none}

/* ================= 公告 ================= */
.notice{
  display:flex;align-items:center;justify-content:center;gap:6px;
  margin:12px 10px;padding:9px 10px;border-radius:6px;
  background:linear-gradient(90deg,#fff6e2,#fffdf5 50%,#fff6e2);
  font-size:13px;color:#8a6a1f;overflow:hidden;
}
.notice b{font-size:15px}
.notice span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ================= 横向卡片（旗帜等） ================= */
.gallery{display:flex;gap:10px;overflow-x:auto;padding:2px 10px 12px;scroll-snap-type:x mandatory}
.gallery::-webkit-scrollbar{display:none}
.gallery .g-item{flex:0 0 33%;max-width:170px;scroll-snap-align:start;text-align:center}
.gallery .g-item img{border-radius:8px;background:#f5f3ee;aspect-ratio:1/.92;object-fit:cover;width:100%}
.gallery .g-item p{margin:6px 0 0;font-size:11.5px;color:#666;line-height:1.35}

/* ================= 分区 ================= */
.section{margin-top:6px}
.section-banner{width:100%;object-fit:contain;background:#fff}
.grid{
  display:grid;grid-template-columns:repeat(5,1fr);
  gap:14px 6px;padding:14px 8px 10px;
}
.gcell{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.gcell .thumb{
  width:100%;aspect-ratio:1;border-radius:50%;background:#f1efe9;overflow:hidden;
  display:flex;align-items:center;justify-content:center;transition:transform .15s;
}
.gcell:active .thumb{transform:scale(.94)}
.gcell .thumb img{width:100%;height:100%;object-fit:cover}
.gcell p{
  margin:0;font-size:11px;color:#555;line-height:1.2;text-align:center;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
/* 少量条目也保持五列，只是上下留白更小 */
.grid.chips{padding-top:8px;padding-bottom:6px}

/* ================= 页脚 ================= */
.foot{margin-top:18px;padding:22px 16px 26px;background:#f7f7f7;text-align:center}
.foot-brand{display:flex;align-items:center;justify-content:center;gap:10px}
.foot-brand img{height:30px;width:auto;object-fit:contain}
.foot-brand span{font-size:17px;font-weight:500;letter-spacing:.5px}
.foot-line{margin-top:14px;font-size:13px;color:#555}
.foot-line a{color:#2a6df4}

/* ================= 悬浮按钮 ================= */
.fabs{position:fixed;right:max(10px,calc(50% - 240px + 10px));bottom:76px;z-index:30;display:flex;flex-direction:column;gap:10px}
.fab{
  width:48px;height:48px;border-radius:24px;display:flex;align-items:center;justify-content:center;
  box-shadow:0 3px 12px rgba(0,0,0,.18);
}
.fab.wa{background:#25d366;flex-direction:column;color:#fff;position:relative}
.fab.wa svg{width:26px;height:26px;fill:#fff}
.fab.wa em{
  position:absolute;bottom:3px;font-style:normal;font-size:7px;letter-spacing:.2px;
  background:#fff;color:#25d366;border-radius:6px;padding:0 3px;
}
.fab.top{background:#fff;color:#333;opacity:0;pointer-events:none;transition:opacity .2s}
.fab.top.on{opacity:1;pointer-events:auto}

/* ================= 抽屉 ================= */
.mask{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:40;opacity:0;pointer-events:none;transition:opacity .22s}
.mask.on{opacity:1;pointer-events:auto}

.drawer{
  position:fixed;top:0;left:0;bottom:0;width:74%;max-width:300px;z-index:50;
  background:#fff;transform:translateX(-100%);transition:transform .26s cubic-bezier(.4,0,.2,1);
  display:flex;flex-direction:column;
}
.drawer.on{transform:translateX(0)}
.drawer-head{display:flex;align-items:center;gap:10px;padding:calc(env(safe-area-inset-top) + 18px) 16px 18px;border-bottom:1px solid #f0f0f0}
.drawer-head img{width:34px;height:34px;border-radius:6px;object-fit:cover;background:#f3f1ec}
.drawer-head strong{font-size:15px}
.drawer nav{flex:1;overflow-y:auto;padding:6px 0}
.drawer nav a{display:block;padding:13px 18px;font-size:14px;color:#333;border-bottom:1px solid #f7f7f7}
.drawer nav a i{font-style:normal;color:#bbb;font-size:11px;margin-left:6px}
.drawer-foot{padding:14px 18px;border-top:1px solid #f0f0f0;font-size:12px;color:#888;line-height:1.7}

/* ================= 品牌详情 ================= */
.sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:50;max-width:480px;margin:0 auto;
  background:#fff;border-radius:16px 16px 0 0;
  transform:translateY(101%);transition:transform .28s cubic-bezier(.4,0,.2,1);
  display:flex;flex-direction:column;max-height:82vh;
}
.sheet.on{transform:translateY(0)}
.sheet-bar{width:36px;height:4px;border-radius:2px;background:#e2e2e2;margin:8px auto 0}
.sheet-head{display:flex;align-items:center;gap:10px;padding:12px 16px}
.sheet-head img{width:40px;height:40px;border-radius:50%;object-fit:cover;background:#f1efe9}
.sheet-head strong{display:block;font-size:15px}
.sheet-head small{display:block;font-size:11.5px;color:#999;margin-top:2px}
.sheet-x{margin-left:auto;font-size:16px;color:#aaa;padding:6px}
.sheet-body{overflow-y:auto;padding:0 12px 12px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pcard{border-radius:8px;overflow:hidden;background:#f7f6f3}
.pcard img{width:100%;aspect-ratio:1;object-fit:cover}
.pcard p{margin:0;padding:7px 8px;font-size:11.5px;color:#444;line-height:1.35;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sheet-cta{
  margin:6px 12px calc(env(safe-area-inset-bottom) + 12px);height:44px;border-radius:10px;
  background:#25d366;color:#fff;font-size:14.5px;font-weight:600;
  display:flex;align-items:center;justify-content:center;gap:8px;
}

/* ================= 搜索 ================= */
.search{
  position:fixed;inset:0;z-index:60;background:#fff;max-width:480px;margin:0 auto;
  transform:translateY(-100%);transition:transform .26s cubic-bezier(.4,0,.2,1);
  display:flex;flex-direction:column;
}
.search.on{transform:translateY(0)}
.search-bar{display:flex;align-items:center;gap:8px;padding:calc(env(safe-area-inset-top) + 10px) 12px 10px;border-bottom:1px solid #f0f0f0}
.search-bar .ic{color:#999;flex:0 0 auto}
.search-bar input{flex:1;border:0;outline:0;font-size:15px;background:transparent}
.search-bar button{font-size:14px;color:#666}
.search-body{flex:1;overflow-y:auto;padding:12px 8px}
.search-body .hint{padding:40px 12px;color:#aaa;font-size:13px;text-align:center}
