/* 好物推荐站 - 全站样式（PC + 移动端自适应） */
:root {
  --primary: #e4393c;
  --primary-dark: #c62828;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #222;
  --muted: #888;
  --line: #eee;
  --radius: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ===== 头部 ===== */
header.site {
  background: linear-gradient(120deg, #e4393c, #ff6a3d);
  color: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 58px; }
.logo { font-size: 21px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.logo small { font-size: 11px; font-weight: 400; opacity: .85; display: block; letter-spacing: 3px; }
nav.main { display: flex; gap: 4px; margin-left: auto; }
nav.main a { padding: 6px 14px; border-radius: 20px; font-size: 14px; opacity: .92; white-space: nowrap; }
nav.main a:hover, nav.main a.active { background: rgba(255,255,255,.22); opacity: 1; }
.search-box { display: none; }

/* ===== Banner ===== */
.banner { margin: 18px 0; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(110deg, #ff5f4d 0%, #ff8a5c 45%, #ffb26b 100%);
  color: #fff; padding: 34px 40px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.banner h2 { font-size: 26px; margin-bottom: 6px; }
.banner p { opacity: .92; font-size: 14px; max-width: 560px; }
.banner .tags { display: flex; gap: 10px; flex-wrap: wrap; }
.banner .tag { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4); padding: 4px 14px; border-radius: 16px; font-size: 13px; }

/* ===== 分类筛选 ===== */
.cats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.cats .cat-label { color: var(--muted); font-size: 13px; margin-right: 4px; }
.cats a { background: var(--card); border: 1px solid var(--line); padding: 6px 18px; border-radius: 18px; font-size: 14px; color: #444; cursor: pointer; }
.cats a:hover { border-color: var(--primary); color: var(--primary); }
.cats a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cats .search { margin-left: auto; display: flex; }
.cats .search input { border: 1px solid var(--line); border-radius: 18px 0 0 18px; padding: 6px 14px; font-size: 14px; outline: none; width: 180px; background: var(--card); }
.cats .search button { border: none; background: var(--primary); color: #fff; padding: 6px 16px; border-radius: 0 18px 18px 0; cursor: pointer; font-size: 14px; }

/* ===== 商品网格 ===== */
.goods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 30px; }
.goods-card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.goods-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.09); }
.goods-img { display: flex; align-items: center; justify-content: center; font-size: 58px; height: 150px; position: relative; }
.goods-img .quan { position: absolute; right: 8px; top: 8px; background: #fff44f; color: #b12704; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.goods-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.goods-title { font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price-after { color: var(--primary); font-weight: 700; font-size: 20px; }
.price-after::before { content: "¥"; font-size: 13px; }
.price-orig { color: #aaa; font-size: 12px; text-decoration: line-through; }
.sales { color: var(--muted); font-size: 12px; margin-left: auto; }
.shop-tag { font-size: 11px; color: var(--primary); border: 1px solid rgba(228,57,60,.4); border-radius: 3px; padding: 0 5px; width: fit-content; }

/* ===== 页面主体/文章样式 ===== */
.page { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 30px 34px; margin: 18px 0 30px; }
.page h1 { font-size: 22px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--primary); display: inline-block; }
.page h3 { margin: 20px 0 8px; font-size: 16px; }
.page p, .page li { color: #444; font-size: 14.5px; margin-bottom: 8px; }
.page ul { padding-left: 20px; }

/* ===== 详情页 ===== */
.detail { display: grid; grid-template-columns: 380px 1fr; gap: 30px; }
.detail-img { display: flex; align-items: center; justify-content: center; font-size: 130px; border-radius: var(--radius); height: 380px; }
.detail-price { background: linear-gradient(90deg, #fff2f0, #fff); border: 1px solid #ffd9d6; border-radius: var(--radius); padding: 14px 18px; margin: 14px 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.btn-buy { display: inline-block; background: linear-gradient(90deg, var(--primary), #ff6a3d); color: #fff; font-size: 16px; font-weight: 700;
  padding: 12px 46px; border-radius: 26px; border: none; cursor: pointer; margin-top: 8px; }
.btn-buy:hover { opacity: .92; }
.notice { background: #fffbe6; border: 1px solid #ffe58f; border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #8c6d1f; margin-top: 16px; }

/* ===== 页脚 ===== */
footer.site { background: #2b2f36; color: #9aa0a8; padding: 30px 0 90px; font-size: 13px; margin-top: 20px; }
.footer-nav { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.footer-nav a:hover { color: #fff; }
.copyright { text-align: center; line-height: 2; }
.copyright a { color: #9aa0a8; }
.copyright a:hover { color: #fff; }

/* ===== 移动端 ===== */
.m-nav { display: none; }
@media (max-width: 768px) {
  nav.main { display: none; }
  .header-inner { height: 50px; justify-content: center; }
  .logo { font-size: 18px; text-align: center; }
  .banner { padding: 22px 20px; }
  .banner h2 { font-size: 19px; }
  .cats { gap: 8px; }
  .cats a { padding: 5px 14px; font-size: 13px; }
  .cats .search { width: 100%; margin-left: 0; }
  .cats .search input { flex: 1; width: auto; }
  .goods-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .goods-img { height: 130px; font-size: 48px; }
  .price-after { font-size: 17px; }
  .page { padding: 20px 16px; }
  .detail { grid-template-columns: 1fr; gap: 16px; }
  .detail-img { height: 240px; font-size: 90px; }
  .btn-buy { display: block; text-align: center; }
  footer.site { padding-bottom: 76px; }
  /* 底部导航 */
  .m-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
    border-top: 1px solid var(--line); z-index: 100; }
  .m-nav a { flex: 1; text-align: center; padding: 8px 0 10px; font-size: 11px; color: #666; }
  .m-nav a .ico { display: block; font-size: 20px; line-height: 1.3; }
  .m-nav a.active { color: var(--primary); }
}
