/* ============================================================
   index.css — 首页专属样式
   ============================================================ */

/* ========== HERO 区域 ========== */
.hero-section {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 50%, #e6f7ff 100%);
  padding: 25px 0; position: relative; overflow: hidden;
}
.hero-section::before {
  content: ''; position: absolute; top: -50%; left: -20%;
  width: 60%; height: 200%; background: radial-gradient(circle, rgba(49,130,206,.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 15px;
  display: grid; grid-template-columns: 260px 1fr 260px; gap: 20px;
  position: relative; z-index: 1;
}

/* 左侧卡片通用 */
.hero-left { display: flex; flex-direction: column; gap: 15px; }
.hero-card {
  background: #fff; border-radius: 12px; padding: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05); transition: box-shadow .3s;
}
.hero-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.card-title {
  font-size: 14px; font-weight: 700; color: #1a365d;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
  padding-bottom: 8px; border-bottom: 2px solid #edf2f7;
}
.card-title .fa, .card-title .fas { color: #3182ce; font-size: 13px; }

/* 公告列表 */
.announce-list { display: flex; flex-direction: column; gap: 7px; }
.announce-list li { display: flex; align-items: center; gap: 6px; }
.announce-list a { font-size: 12.5px; color: #4a5568; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce-list a:hover { color: #3182ce; }
.tag {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.tag-hot { background: #e53e3e; }
.tag-new { background: #3182ce; }
.tag-blue { background: #00b5d8; }
.tag-orange { background: #ed8936; }
.tag-green { background: #38a169; }

/* 快捷入口网格 */
.quick-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.quick-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 4px; border-radius: 8px;
  background: #f7fafc; transition: all .25s; font-size: 12px; color: #4a5568;
}
.quick-item .fa, .quick-item .fas { font-size: 18px; color: #3182ce; }
.quick-item:hover { background: #3182ce; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(49,130,206,.3); }
.quick-item:hover .fa, .quick-item:hover .fas { color: #fff; }

/* 中间 Tab */
.hero-center { min-width: 0; }
.hero-tab-wrap {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.hero-tab-head {
  display: flex; background: linear-gradient(135deg, #1a365d, #2d3748);
}
.hero-tab-btn {
  flex: 1; padding: 12px 10px; border: none; background: transparent;
  color: #cbd5e0; font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .3s; position: relative;
}
.hero-tab-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.hero-tab-btn.active { color: #fff; background: rgba(49,130,206,.25); }
.hero-tab-btn.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 50%; height: 2px; background: #63b3ed; border-radius: 1px;
}
.hero-tab-body { padding: 18px;height:414px; }

/* ===== 企业卡片网格（一行3个，共15个 = 5行） ===== */
.company-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.company-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: #f7fafc;
  border: 1px solid #e2e8f0; border-radius: 10px;
  transition: all .3s; text-decoration: none;
  position: relative; overflow: hidden;
}
.company-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #3182ce, #63b3ed); opacity: 0; transition: opacity .25s;
}
.company-card:hover {
  border-color: #3182ce; background: #fff;
  box-shadow: 0 4px 16px rgba(49,130,206,.15);
  transform: translateY(-2px);
}
.company-card:hover::before { opacity: 1; }
.company-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #ebf8ff, #bee3f8);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.company-avatar img { width: 100%; height: 100%; object-fit: cover; }
.company-avatar .fa, .company-avatar .fas { font-size: 20px; color: #3182ce; }
.company-info { min-width: 0; flex: 1; }
.company-name {
  font-size: 13px; font-weight: 600; color: #1a365d;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 2px;
}
.company-card:hover .company-name { color: #3182ce; }
.company-biz {
  font-size: 11px; color: #a0aec0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 产品/资讯 Tab 里的列表 */
.hero-news-list { display: flex; flex-direction: column; gap: 8px; }
.hero-news-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; border-bottom: 1px dashed #edf2f7;
}
.hero-news-list li:last-child { border-bottom: none; }
.hero-news-list .news_date {
  display: inline-block; padding: 2px 6px; border-radius: 3px;
  background: #ebf8ff; color: #3182ce; font-size: 11px; font-weight: 600;
  flex-shrink: 0; font-family: 'Courier New', monospace;
}
.hero-news-list a { font-size: 13px; color: #2d3748; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-news-list a:hover { color: #3182ce; }

/* 右侧统计 */
.hero-right { display: flex; flex-direction: column; gap: 15px; }
.stat-card {
  background: #fff; border-radius: 12px; padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.stat-card-title { font-size: 13px; font-weight: 700; color: #1a365d; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.stat-card-title .fa { color: #38a169; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-item {
  text-align: center; padding: 10px 6px;
  background: linear-gradient(135deg, #f7fafc, #ebf8ff); border-radius: 8px;
  transition: transform .25s;
}
.stat-item:hover { transform: scale(1.03); }
.stat-num { font-size: 20px; font-weight: 800; color: #1a365d; font-family: 'Arial Black', sans-serif; }
.stat-label { font-size: 11px; color: #718096; margin-top: 2px;align-items: center; }

.litltefont{font-size:8px;}
/* 热门推荐 */
.hot-card {
  background: #fff; border-radius: 12px; padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.hot-card .card-title { color: #e53e3e; }
.hot-card .card-title .fa { color: #e53e3e; }
.hot-list { display: flex; flex-direction: column; gap: 6px; }
.hot-item { display: flex; align-items: center; gap: 8px; }
.hot-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 4px; font-size: 11px; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.hot-rank-1 { background: #e53e3e; }
.hot-rank-2 { background: #ed8936; }
.hot-rank-3 { background: #ecc94b; color: #744210; }
.hot-rank-4, .hot-rank-5, .hot-rank-6 { background: #a0aec0; }
.hot-item a { font-size: 12.5px; color: #4a5568; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-item a:hover { color: #e53e3e; }

/* ========== 通用区块 ========== */
.section-block {
  max-width: 1200px; margin: 25px auto; padding: 0 15px;
}
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; margin-bottom: 15px;
  border-bottom: 2px solid #e2e8f0; position: relative;
}
.section-head::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 80px; height: 2px; background: linear-gradient(90deg, #3182ce, #63b3ed);
}
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 700; color: #1a365d;
}
.section-title .fa, .section-title .fas { font-size: 18px; color: #3182ce; }
.section-more { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.section-more a { color: #718096; transition: color .2s; }
.section-more a:hover { color: #3182ce; }
.more-link {
  color: #3182ce !important; font-weight: 600;
  display: inline-flex; align-items: center; gap: 2px;
}
.more-link:hover { color: #2b6cb0 !important; }


/* 企业卡片列表容器 */
#tab-company ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* 单个企业卡片 */
#tab-company ul li {
  flex: 1 1 calc(33.333% - 20px);
  max-width: calc(33.333% - 20px);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
}

/* 卡片悬停效果 */
#tab-company ul li:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 卡片内链接样式 */
#tab-company ul li a {
  display: block;
  padding: 17.7px 24px;
  text-align: center;
  text-decoration: none;
  color: #333333;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

/* 链接悬停颜色 */
#tab-company ul li a:hover {
  color: #1677ff; /* 与头部城市按钮同色系 */
}

/* 响应式适配 */
@media (max-width: 768px) {
  #tab-company ul li {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}

@media (max-width: 480px) {
  #tab-company ul li {
    flex: 1 1 100%;
    max-width: 100%;
  }
}
/* ========== 供应区块 ========== */
.supply-section { }
.supply-body {
  display: grid; grid-template-columns: 1fr 2fr; gap: 20px;
}
/* 分类网格（核心：多列横向排列，41个也不撑破） */
.supply-cats { }
.cat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.cat-item {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 10px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 6px; font-size: 12.5px; color: #4a5568;
  transition: all .25s; position: relative; overflow: hidden;
}
.cat-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #3182ce, #63b3ed); opacity: 0; transition: opacity .25s;
}
.cat-item:hover { border-color: #3182ce; color: #3182ce; transform: translateX(2px); box-shadow: 0 2px 8px rgba(49,130,206,.12); }
.cat-item:hover::before { opacity: 1; }
.cat-item .cat-icon { font-size: 11px; color: #a0aec0; flex-shrink: 0; }
.cat-item:hover .cat-icon { color: #3182ce; }
.cat-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-count {
  font-size: 10px; color: #a0aec0; background: #edf2f7; padding: 0 5px;
  border-radius: 10px; flex-shrink: 0;
}

/* 产品图文 */
.supply-products { }
.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.product-card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.05); transition: all .3s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,.1); }
.product-img-wrap { position: relative; overflow: hidden; aspect-ratio: 4/3; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-img-wrap img { transform: scale(1.08); }
.product-overlay {
  position: absolute; inset: 0; background: rgba(49,130,206,.7);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 600;
  opacity: 0; transition: opacity .3s;
}
.product-card:hover .product-overlay { opacity: 1; }
.product-info { padding: 8px 10px; }
.product-title { font-size: 12.5px; color: #2d3748; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== 资讯区块 ========== */
.news-section { }
.news-body {
  display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 20px;
}
/* 资讯分类网格 */
.news-cats { }
.cat-grid-news { grid-template-columns: repeat(2, 1fr); }
.cat-item-news .cat-icon { color: #68d391; }
.cat-item-news:hover { border-color: #38a169; color: #38a169; }
.cat-item-news:hover .cat-icon { color: #38a169; }
.cat-item-news::before { background: linear-gradient(180deg, #38a169, #68d391); }

/* 图片资讯 */
.news-images { display: flex; flex-direction: column; gap: 10px; }
.news-img-card {
  position: relative; border-radius: 10px; overflow: hidden;
  aspect-ratio: 16/10; box-shadow: 0 2px 10px rgba(0,0,0,.08); transition: transform .3s;
}
.news-img-card:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.news-img-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-img-card:hover img { transform: scale(1.06); }
.news-img-mask {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 15px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff; transition: padding .3s;
}
.news-img-card:hover .news-img-mask { padding-bottom: 14px; }
.news-img-mask h4 { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 文字资讯列表 */
.news-lists { display: flex; flex-direction: column; gap: 12px; }
.news-list-block { }
.text-news-list { display: flex; flex-direction: column; gap: 7px; }
.text-news-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px dashed #edf2f7;
}
.text-news-list li:last-child { border-bottom: none; }
.news_date_sm {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  background: #f0fff4; color: #38a169; font-size: 11px; font-weight: 600;
  flex-shrink: 0; font-family: 'Courier New', monospace;
}
.text-news-list a { font-size: 12.5px; color: #4a5568; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-news-list a:hover { color: #3182ce; }

/* ========== 响应式 ========== */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 240px 1fr 240px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 15px; }
  .hero-left { flex-direction: row; }
  .hero-left .hero-card { flex: 1; }
  .hero-right { flex-direction: row; }
  .hero-right .stat-card, .hero-right .hot-card { flex: 1; }
  .company-grid { grid-template-columns: repeat(3, 1fr); }
  .supply-body { grid-template-columns: 1fr; }
  .news-body { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .hero-left { flex-direction: column; }
  .hero-right { flex-direction: column; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid-news { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-more { flex-wrap: wrap; gap: 8px; }
  /* 手机端企业卡片一行2个 */
  .company-grid { grid-template-columns: repeat(2, 1fr); }
}
