* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f4f5f7;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 56px;
  color: #222;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* 顶部导航 */
.top-bar {
  position: sticky; top: 0; z-index: 10;
  background: #fff; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #f0f0f0;
}
.top-bar .title { font-size: 16px; font-weight: 600; color: #222; }
.top-bar .back { position: absolute; left: 12px; font-size: 20px; color: #333; background:none; border:none; padding:4px 8px; }

/* Hero banner */
.hero { margin: 10px 12px 0; border-radius: 10px; overflow: hidden; background: #fafafa; }
.hero img { display: block; width: 100%; height: auto; }

/* 4 宫格 */
.grid4 {
  margin: 10px 12px 0; background: #fff; border-radius: 10px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 14px 0 10px;
}
.grid4 .item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor:pointer; }
.grid4 .ic { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.grid4 .ic img { width: 100%; height: 100%; object-fit: cover; }
.grid4 .lb { font-size: 11px; color: #555; }

/* 商品卡片 */
.goods {
  margin: 10px 12px 0; background: #fff; border-radius: 10px; overflow: hidden;
}
.goods .img { height: 110px; background: #f0f0f0; position: relative; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #999; overflow:hidden; }
.goods .img img { width:100%; height:100%; object-fit: cover; display:block; }
.goods .img .tag { position: absolute; left: 8px; top: 8px; background: #ff5a00; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.goods .body { padding: 10px 12px; }
.goods .t { font-size: 14px; color: #222; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.goods .sub { font-size: 11px; color: #999; margin-top: 4px; }
.goods .row1 { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.goods .price { color: #ff5000; }
.goods .price .cur { font-size: 18px; font-weight: 800; }
.goods .price .old { color: #bbb; text-decoration: line-through; font-size: 12px; margin-left: 6px; font-weight: 400; }
.goods .rebate { display: inline-flex; align-items: center; gap: 2px; background: #fff3e8; color: #ff5000; font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.goods .row2 { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #eee; }
.goods .cd { font-size: 11px; color: #999; display: flex; align-items: center; gap: 4px; }
.goods .cd b { color: #ff5000; font-size: 12px; }
.goods .btn { padding: 5px 16px; border-radius: 14px; color: #fff; font-size: 12px; font-weight: 600; border: none; background: linear-gradient(90deg, #ff6a00, #ff5000); }
.goods .btn.share { background: linear-gradient(90deg,#ffb800,#ff9000); }

/* 底部 Tab */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 56px; background: #fff; border-top: 1px solid #eee; display: flex; z-index: 30;
}
.tabbar .t { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #999; font-size: 10px; cursor:pointer; }
.tabbar .t .i { width: 22px; height: 22px; color: #aaa; transition: color .2s; }
.tabbar .t.on { color: #ff5000; }
.tabbar .t.on .i { color: #ff5000; }
/* 次级推广 banner */
.guide { margin: 10px 12px 0; border-radius: 10px; overflow: hidden; background: #fff; }
.guide img { width: 100%; height: auto; display: block; }
.guide-placeholder {
  margin: 10px 12px 0; border-radius: 10px;
  background: linear-gradient(135deg, #ff9a3d, #ff5000);
  color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 4px 12px rgba(255,90,54,.25);
}
.guide-placeholder .t1 { font-size: 15px; font-weight: 700; }
.guide-placeholder .t2 { font-size: 11px; opacity: .95; margin-top: 2px; }
.guide-placeholder .pill { font-size: 11px; background: rgba(255,255,255,.95); color: #ff5000; padding: 4px 10px; border-radius: 12px; font-weight: 600; }

/* 通用工具 */
.hide { display: none !important; }
.muted { color:#999; }
.center { text-align:center; }
.spinner { text-align:center; padding:30px 0; color:#999; font-size:13px; }
.empty { text-align:center; padding:40px 20px; color:#bbb; font-size:13px; }
