/* ===== 食商宝 首页增强样式 ===== */

/* ---------- Hero 首屏 ---------- */
.hero {
  background: radial-gradient(1200px 500px at 20% -10%, #2ed57333, transparent 60%),
              radial-gradient(900px 500px at 90% 0%, #1e90ff22, transparent 55%),
              linear-gradient(135deg, #0f3d2e 0%, #145a3c 45%, #1a7a4e 100%);
  color: #fff;
  padding: 54px 20px 46px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 36px;
  background: var(--bg, #f5f7f6);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
  opacity: .0;
}
.hero-inner { max-width: 1080px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  font-size: 13px; letter-spacing: .5px; margin-bottom: 18px; backdrop-filter: blur(4px);
}
.hero-title { font-size: 42px; line-height: 1.25; font-weight: 800; margin: 0 0 14px; letter-spacing: 1px; text-shadow: 0 2px 16px rgba(0,0,0,.25); }
.hero-title-hl { color: #ffe066; }
.hero-sub { font-size: 16px; color: #e9f7ef; opacity: .92; margin: 0 auto 26px; max-width: 640px; }
.hero-search {
  display: flex; align-items: center; gap: 8px; max-width: 620px; margin: 0 auto;
  background: #fff; border-radius: 40px; padding: 7px 7px 7px 18px;
  box-shadow: 0 12px 36px rgba(0,0,0,.28);
}
.hero-search-ico { font-size: 18px; color: #aaa; }
.hero-search input {
  flex: 1; border: none; outline: none; font-size: 15px; color: #222; background: transparent; padding: 10px 4px;
}
.hero-search .btn { border-radius: 30px; padding: 11px 26px; font-size: 15px; }
.hero-quick { margin-top: 16px; font-size: 13px; color: #d8f3e3; }
.hero-quick-label { opacity: .8; }
.hero-quick-tag {
  display: inline-block; margin: 0 4px; padding: 3px 12px; border-radius: 14px;
  background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-size: 12.5px; transition: .15s;
}
.hero-quick-tag:hover { background: #ffe066; color: #145a3c; }
.hero-stats {
  display: flex; justify-content: center; gap: 38px; margin-top: 30px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 26px; font-weight: 800; color: #ffe066; }
.hero-stat span { font-size: 12.5px; color: #d8f3e3; }

/* ---------- 品类矩阵 ---------- */
.cat-matrix { background: #f5f7f6; padding: 40px 20px 30px; }
.cat-matrix-inner { max-width: 1120px; margin: 0 auto; }
.cat-matrix-head { margin-bottom: 20px; }
.cat-matrix-head h2 { font-size: 24px; margin: 0 0 6px; color: #1c3d2f; }
.cat-matrix-head span { color: #6b7d75; font-size: 13.5px; }
.cat-matrix-grid { display: flex; flex-direction: column; gap: 18px; }
.gm-group-title {
  font-size: 14px; font-weight: 700; color: #2c5543; margin: 4px 0 10px;
  padding-left: 10px; border-left: 4px solid #27ae60;
}
.gm-group-items { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.gm-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: #fff; border: 1px solid #e6ece9; border-radius: 12px; padding: 14px 8px;
  text-decoration: none; color: #333; position: relative; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.gm-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(39,174,96,.18); border-color: #27ae60; }
.gm-ico { font-size: 26px; line-height: 1; }
.gm-name { font-size: 12.5px; text-align: center; }
.gm-flag {
  position: absolute; top: 6px; right: 6px; font-size: 10px; background: #ffb300; color: #5a3d00;
  padding: 1px 6px; border-radius: 8px; font-weight: 600;
}
.gm-gold { background: linear-gradient(180deg,#fffdf5,#fff7e0); }
.gm-green { background: linear-gradient(180deg,#fff,#eefaf1); }
.gm-blue { background: linear-gradient(180deg,#fff,#eef5fc); }
.gm-purple { background: linear-gradient(180deg,#fff,#f6eeff); }

/* ---------- 信任背书 ---------- */
.trust-bar { background: #0f3d2e; color: #fff; padding: 20px; }
.trust-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
.trust-item { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 160px; }
.trust-ico { font-size: 24px; }
.trust-item strong { display: block; font-size: 14.5px; }
.trust-item em { font-style: normal; font-size: 12px; color: #bfe3d0; }

/* ---------- 广告大字报 ---------- */
.ad-carousel {
  margin: 16px 0; border-radius: 14px; overflow: hidden; position: relative;
  min-height: 92px; box-shadow: 0 6px 18px rgba(0,0,0,.1);
}
.ad-slide {
  display: none; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 28px; cursor: pointer; color: #fff;
  background: linear-gradient(120deg, #c0392b, #e67e22);
  min-height: 92px;
}
.ad-slide:nth-child(2) { background: linear-gradient(120deg, #6c3483, #2980b9); }
.ad-slide.active { display: flex; }
.ad-slide-title { font-size: 22px; font-weight: 800; line-height: 1.3; letter-spacing: .5px; }
.ad-slide-sub { font-size: 14px; opacity: .92; margin-top: 6px; }
.ad-slide::after { content: "立即查看 →"; font-size: 14px; font-weight: 700; background: rgba(255,255,255,.2); padding: 8px 16px; border-radius: 20px; white-space: nowrap; }
.ad-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.ad-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.ad-dot.active { background: #fff; width: 18px; border-radius: 5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) { .gm-group-items { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 860px)  { .gm-group-items { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 680px) {
  .hero { padding: 36px 16px 30px; }
  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 14px; }
  .hero-search { flex-wrap: nowrap; }
  .hero-search .btn { padding: 10px 16px; font-size: 14px; }
  .hero-stats { gap: 22px; }
  .hero-stat strong { font-size: 20px; }
  .gm-group-items { grid-template-columns: repeat(3, 1fr); }
  .trust-inner { gap: 10px; }
  .trust-item { min-width: 140px; }
}
@media (max-width: 420px) { .gm-group-items { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 全宽主内容区（替代老版3栏布局） ---------- */
.home-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}
.home-main .ai-banner {
  margin-bottom: 20px;
}
.home-main .section {
  margin-bottom: 28px;
}
.home-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 2px solid #e6ece9;
}
.home-bottom-grid .section-header h2 {
  font-size: 18px;
  font-weight: 700;
}
.home-bottom-grid .sidebar-card {
  background: #f9fafb;
  border: 1px solid #e6ece9;
  border-radius: 16px;
  padding: 20px;
}
@media (max-width: 860px) {
  .home-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 品类子分类面板：横版统一布局（2026-07-20 修复保健食品竖排问题） ---------- */
.gm-sub-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  width: 100%;
  min-width: 240px;
  max-width: 320px;
  margin: 6px auto 0;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e6e9e6;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  justify-content: flex-start;
}
.gm-sub-item {
  display: inline-block;
  font-size: 12px;
  line-height: 1.4;
  color: #2c3e50;
  padding: 3px 8px;
  background: #f0f5f1;
  border: 1px solid #d8e3da;
  border-radius: 6px;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.15s ease;
}
.gm-sub-item:hover {
  background: #27ae60;
  color: #fff;
  border-color: #27ae60;
}
