/* ============================================================
   食商宝 V5.1 视觉深化 — 玻璃拟态 / 微动效 / 品牌细节 / 排版留白
   叠加在 style.css + style-upgrade.css + home-enhance.css 之上
   ============================================================ */

/* ---------- 1. Header 头部：玻璃拟态 + 品牌细节 ---------- */
.header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  height: 68px;
}

.top-info-bar {
  background: linear-gradient(90deg, #143d2b 0%, #1a7a4c 45%, #143d2b 100%);
}

/* 品牌 Logo 细节增强 */
.logo-wrap {
  gap: 4px;
  padding: 4px 0;
}

.logo-brand {
  gap: 6px;
}

.logo-dragon {
  font-size: 26px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.12));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-wrap:hover .logo-dragon {
  transform: rotate(-6deg) scale(1.1);
}

.logo-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.logo-en {
  background: linear-gradient(135deg, #f7f8fa, #eef0f5);
  color: #6b7d75;
  border: 1px solid rgba(0,0,0,0.05);
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 2px 7px;
  border-radius: 4px;
}

.logo-slogan {
  font-size: 10.5px;
  color: #7a8b84;
  letter-spacing: 1.2px;
  font-weight: 500;
}

/* 导航下划线动效优化 */
.nav a {
  padding: 10px 18px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav a::after {
  bottom: 4px;
  height: 2.5px;
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav a:hover {
  background: rgba(26, 122, 76, 0.06);
  color: var(--primary);
}

.nav a:hover::after,
.nav a.active::after {
  width: 40%;
}

.nav a.active {
  background: rgba(26, 122, 76, 0.08);
  font-weight: 700;
}

/* 用户区头像 */
.avatar {
  width: 38px;
  height: 38px;
  box-shadow: 0 2px 10px rgba(26, 122, 76, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(26, 122, 76, 0.32);
}

/* ---------- 2. Hero 搜索框：玻璃质感 + 焦点动效 ---------- */
.hero-search {
  max-width: 680px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 48px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 14px 44px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.5);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.hero-search:focus-within {
  box-shadow: 0 18px 52px rgba(0,0,0,0.22), 0 0 0 4px rgba(26, 122, 76, 0.15);
  transform: translateY(-2px);
}

.hero-search-ico {
  font-size: 18px;
  color: #8a96a5;
  margin-right: 4px;
  transition: color 0.25s ease;
}

.hero-search:focus-within .hero-search-ico {
  color: var(--primary);
}

.hero-search input {
  font-size: 16px;
  padding: 12px 6px;
  color: #1a2332;
}

.hero-search input::placeholder {
  color: #9aa5b2;
}

.hero-search .btn {
  border-radius: 40px;
  padding: 13px 30px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(26, 122, 76, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-search .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 122, 76, 0.45);
}

.hero-search .btn:active {
  transform: translateY(0);
}

/* ---------- 3. Hero 整体排版与留白 ---------- */
.hero {
  padding: 72px 20px 64px;
  background: radial-gradient(1200px 500px at 20% -10%, rgba(46, 213, 115, 0.22), transparent 60%),
              radial-gradient(900px 500px at 90% 0%, rgba(30, 144, 255, 0.14), transparent 55%),
              linear-gradient(135deg, #0f3d2e 0%, #145a3c 45%, #1a7a4e 100%);
}

.hero-badge {
  padding: 7px 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  font-size: 12.5px;
  letter-spacing: 0.8px;
  margin-bottom: 22px;
}

.hero-title {
  font-size: 46px;
  line-height: 1.18;
  font-weight: 850;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero-sub {
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 660px;
  margin-bottom: 32px;
  color: #e8f5ef;
}

.hero-quick {
  margin-top: 20px;
}

.hero-quick-tag {
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 12.5px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s ease;
}

.hero-quick-tag:hover {
  background: #ffe066;
  color: #145a3c;
  border-color: #ffe066;
  transform: translateY(-1px);
}

.hero-stats {
  gap: 48px;
  margin-top: 40px;
}

.hero-stat strong {
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.hero-stat span {
  font-size: 12.5px;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

/* ---------- 4. 品类矩阵：卡片 hover 与留白 ---------- */
.cat-matrix {
  padding: 56px 20px 44px;
}

.cat-matrix-head {
  margin-bottom: 28px;
}

.cat-matrix-head h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.cat-matrix-head span {
  font-size: 14px;
  color: #6b7d75;
}

.cat-matrix-grid {
  gap: 22px;
}

.gm-group-title {
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 12px;
  padding-left: 12px;
}

.gm-card {
  border-radius: 14px;
  padding: 18px 10px;
  gap: 8px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.gm-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(26, 122, 76, 0.14);
  border-color: rgba(26, 122, 76, 0.25);
}

.gm-ico {
  font-size: 28px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gm-ico-svg {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gm-ico-svg svg {
  width: 100%;
  height: 100%;
}

.gm-card:hover .gm-ico {
  transform: scale(1.15) rotate(-4deg);
}

.gm-card:hover .gm-ico-svg {
  transform: scale(1.12);
}

.gm-name {
  font-size: 13px;
  font-weight: 500;
}

.gm-flag {
  top: 8px;
  right: 8px;
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: 10px;
}

/* ---------- 5. 信任背书：细腻分割与动效 ---------- */
.trust-bar {
  padding: 24px 20px;
  background: linear-gradient(90deg, #0f3d2e, #145a3c, #0f3d2e);
}

.trust-inner {
  gap: 18px;
}

.trust-item {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.25s ease;
}

.trust-item:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.trust-ico {
  font-size: 22px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.15));
}

.trust-item strong {
  font-size: 14px;
}

.trust-item em {
  font-size: 11.5px;
}

/* ---------- 6. 主内容区：排版与留白 ---------- */
.home-main {
  padding: 32px 24px;
}

.section {
  margin-bottom: 32px;
}

.section-header {
  margin-bottom: 18px;
  padding: 0 4px;
}

.section-header h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.section-header h2 .section-icon {
  font-size: 22px;
  margin-right: 2px;
}

.section-header a {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.section-header a:hover {
  background: var(--primary-light);
  text-decoration: none;
}

/* 列表搜索栏玻璃质感 */
.search-bar {
  background: #fff;
  border: 1px solid #e3e8e6;
  border-radius: 14px;
  padding: 8px 8px 8px 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.search-bar:focus-within {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 0 0 3px rgba(26, 122, 76, 0.1);
  border-color: rgba(26, 122, 76, 0.3);
}

.search-bar input {
  font-size: 14.5px;
  padding: 10px 4px;
}

.search-bar .btn {
  border-radius: 10px;
  padding: 10px 22px;
}

/* AI Banner */
.ai-banner {
  border-radius: 14px;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 18px rgba(74, 95, 224, 0.12);
}

/* ---------- 7. 卡片与列表 hover 动效 ---------- */
.card {
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.03);
}

.product-card {
  border-radius: 16px;
  padding: 22px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.08);
  border-color: rgba(26, 122, 76, 0.18);
}

.product-card .product-name {
  font-size: 16.5px;
  font-weight: 700;
}

.product-card .product-price {
  font-size: 22px;
  letter-spacing: -0.5px;
}

.list-item {
  border-radius: 10px;
  margin: 0 4px;
  transition: all 0.22s ease;
}

.list-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* ---------- 8. 侧边栏：更精致的卡片 ---------- */
.sidebar-card {
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.03);
  transition: box-shadow 0.25s ease;
}

.sidebar-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.sidebar-card h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 18px;
}

/* ---------- 9. 品类导航树细节 ---------- */
.category-tree li {
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 3px;
  transition: all 0.2s ease;
}

.category-tree li:hover {
  transform: translateX(3px);
}

/* ---------- 10. 广告大字报优化 ---------- */
.ad-carousel {
  border-radius: 16px;
  min-height: 96px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.ad-slide {
  padding: 24px 32px;
  min-height: 96px;
}

.ad-slide-title {
  font-size: 23px;
  font-weight: 850;
}

.ad-slide-sub {
  font-size: 14px;
  margin-top: 7px;
}

.ad-slide::after {
  padding: 9px 18px;
  border-radius: 24px;
  transition: all 0.25s ease;
}

.ad-slide:hover::after {
  background: rgba(255,255,255,0.32);
  transform: translateX(3px);
}

/* ---------- 11. Footer 品牌收尾 ---------- */
.site-footer {
  margin-top: 64px;
  padding: 36px 24px 44px;
  background: linear-gradient(180deg, #fff 0%, #f7f8fa 100%);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.site-footer p {
  font-size: 13px;
  line-height: 1.8;
}

/* ---------- 12. 全局微交互增强 ---------- */
.btn {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  box-shadow: 0 3px 10px rgba(26, 122, 76, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 22px rgba(26, 122, 76, 0.35);
}

.tag {
  transition: all 0.2s ease;
}

.tag:hover {
  transform: translateY(-1px);
}

/* ---------- 13. 页面加载淡入（更克制） ---------- */
@keyframes fadeUpSoft {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-inner > *,
.cat-matrix-inner > *,
.home-main > * {
  animation: fadeUpSoft 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.1s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.15s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.2s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.25s; }
.hero-inner > *:nth-child(6) { animation-delay: 0.3s; }

/* ---------- 14. 4K / 大屏断点优化 ---------- */
@media (min-width: 1920px) {
  .hero-inner,
  .cat-matrix-inner,
  .trust-inner,
  .home-main {
    max-width: 1560px;
  }

  .hero-title {
    font-size: 54px;
  }

  .hero-sub {
    font-size: 18px;
    max-width: 720px;
  }

  .hero-search {
    max-width: 760px;
  }

  .hero-search input {
    font-size: 17px;
  }

  .gm-group-items {
    grid-template-columns: repeat(10, 1fr);
  }
}

@media (min-width: 2560px) {
  .hero-inner,
  .cat-matrix-inner,
  .trust-inner,
  .home-main {
    max-width: 1800px;
  }

  .hero-title {
    font-size: 60px;
  }

  .gm-group-items {
    grid-template-columns: repeat(12, 1fr);
  }
}

/* ---------- 15. 移动端适配微调 ---------- */
@media (max-width: 768px) {
  .header {
    height: 60px;
  }

  .hero {
    padding: 48px 16px 40px;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-sub {
    font-size: 14.5px;
  }

  .hero-search {
    padding: 5px 5px 5px 16px;
  }

  .hero-search input {
    font-size: 14px;
    padding: 10px 4px;
  }

  .hero-search .btn {
    padding: 10px 18px;
    font-size: 14px;
  }

  .cat-matrix {
    padding: 40px 16px 32px;
  }

  .cat-matrix-head h2 {
    font-size: 22px;
  }

  .home-main {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .hero-search {
    border-radius: 40px;
  }

  .hero-search .btn {
    padding: 9px 14px;
  }

  .hero-stats {
    gap: 28px;
  }

  .hero-stat strong {
    font-size: 24px;
  }
}

/* ---------- 16. 减少动画偏好（无障碍） ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
