/* ==========================================================================
   汇发商务网 - 首页样式 home.css
   设计理念: 白色为主、橙色点缀、简洁大气、层次分明
   ========================================================================== */

/* ===== 全局变量 ===== */
:root {
  --hp-primary: #FF6600;
  --hp-primary-dark: #E55C00;
  --hp-primary-light: #FFF5EC;
  --hp-primary-bg: #FFF8F2;
  --hp-text: #333;
  --hp-text-2: #666;
  --hp-text-3: #999;
  --hp-border: #EAEAEA;
  --hp-border-light: #F0F0F0;
  --hp-bg: #F5F6FA;
  --hp-white: #FFF;
  --hp-radius: 8px;
  --hp-radius-sm: 4px;
  --hp-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --hp-shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
  --hp-shadow-card: 0 1px 4px rgba(0,0,0,0.04);
  --hp-transition: all 0.25s ease;
  --hp-container: 1200px;
}

/* ===== 基础重置 ===== */
.hp-container {
  max-width: var(--hp-container);
  margin: 0 auto;
  padding: 0 12px;
}

.hp-section {
  padding: 32px 0;
}

.hp-section-gray {
  background: var(--hp-bg);
}

/* ===== Section标题 ===== */
.hp-sec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--hp-border);
}

.hp-sec-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--hp-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hp-sec-bar {
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--hp-primary);
  border-radius: 2px;
}

.hp-sec-cats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.hp-sec-cats a {
  color: var(--hp-text-2);
  text-decoration: none;
  transition: var(--hp-transition);
}

.hp-sec-cats a:hover {
  color: var(--hp-primary);
}

.hp-sec-more {
  color: var(--hp-primary) !important;
  font-weight: 500;
}

/* ===== Hero区域 ===== */
.hp-hero {
  background: var(--hp-white);
  padding: 12px 0;
}

.hp-hero .hp-container {
  display: grid;
  grid-template-columns: 210px 1fr 250px;
  gap: 12px;
  align-items: start;
}

/* --- 左侧分类导航 --- */
.hp-hero-cate {
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  overflow: hidden;
}

.hp-cate-hd {
  background: linear-gradient(135deg, var(--hp-primary), var(--hp-primary-dark));
  color: var(--hp-white);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  letter-spacing: 1px;
}

.hp-cate-bd ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-cate-bd li {
  position: relative;
  padding: 7px 14px;
  border-bottom: 1px solid var(--hp-border-light);
  cursor: pointer;
  transition: var(--hp-transition);
}

.hp-cate-bd li:last-child {
  border-bottom: none;
}

.hp-cate-bd li:hover {
  background: var(--hp-primary-light);
}

.hp-cate-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hp-cate-name {
  font-size: 14px;
  color: var(--hp-text);
  text-decoration: none;
  font-weight: 500;
  flex-shrink: 0;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-cate-name:hover {
  color: var(--hp-primary);
}

.hp-cate-sub {
  flex: 1;
  font-size: 12px;
  color: var(--hp-text-3);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hp-cate-sub a {
  color: var(--hp-text-3);
  text-decoration: none;
  margin-right: 4px;
}

.hp-cate-sub a:hover {
  color: var(--hp-primary);
}

.hp-cate-arrow {
  color: var(--hp-text-3);
  font-size: 14px;
  flex-shrink: 0;
}

/* 分类弹出层 */
.hp-cate-panel {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  width: 480px;
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: 0 var(--hp-radius) var(--hp-radius) 0;
  box-shadow: var(--hp-shadow-hover);
  z-index: 100;
  padding: 16px;
}

.hp-cate-bd li:hover .hp-cate-panel {
  display: block;
}

.hp-cate-panel-inner dl {
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--hp-border-light);
}

.hp-cate-panel-inner dl:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.hp-cate-panel-inner dt {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.hp-cate-panel-inner dt a {
  color: var(--hp-text);
  text-decoration: none;
}

.hp-cate-panel-inner dt a:hover {
  color: var(--hp-primary);
}

.hp-cate-panel-inner dd {
  font-size: 12px;
  line-height: 1.8;
}

.hp-cate-panel-inner dd a {
  color: var(--hp-text-2);
  text-decoration: none;
}

.hp-cate-panel-inner dd em {
  color: var(--hp-border);
  margin: 0 3px;
}

.hp-cate-panel-inner dd a:hover {
  color: var(--hp-primary);
}

/* --- 中间Banner --- */
.hp-hero-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-banner {
  height: 340px;
  border-radius: var(--hp-radius);
  overflow: hidden;
  background: var(--hp-border-light);
}

/* Custom CSS */
.hp-banner .slide,
.hp-banner .slide img,
.hp-banner .slide a,
.hp-banner img,
.hp-banner a {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

.hp-banner img {
  transition: transform 0.4s ease;
}

.hp-banner:hover img {
  transform: scale(1.02);
}

.hp-hero-ads {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  height: 70px;
}

.hp-hero-ads > div {
  border-radius: var(--hp-radius-sm);
  overflow: hidden;
  background: var(--hp-border-light);
}

.hp-hero-ads img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 右侧用户面板 --- */
.hp-hero-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-user-card {
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 16px;
  text-align: center;
}

.hp-user-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--hp-primary-light);
}

.hp-user-greet {
  margin-top: 10px;
}

.hp-user-greet p {
  font-size: 13px;
  color: var(--hp-text-2);
  margin: 0 0 8px 0;
}

.hp-user-greet strong {
  color: var(--hp-primary);
}

.hp-btn-sm {
  display: inline-block;
  padding: 5px 16px;
  font-size: 12px;
  border-radius: var(--hp-radius-sm);
  text-decoration: none;
  margin: 0 3px;
  transition: var(--hp-transition);
}

.hp-btn-primary {
  background: var(--hp-primary);
  color: var(--hp-white) !important;
  border: 1px solid var(--hp-primary);
}

.hp-btn-primary:hover {
  background: var(--hp-primary-dark);
}

.hp-btn-outline {
  background: var(--hp-white);
  color: var(--hp-primary) !important;
  border: 1px solid var(--hp-primary);
}

.hp-btn-outline:hover {
  background: var(--hp-primary-light);
}

.hp-publish-btn {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, var(--hp-primary), var(--hp-primary-dark));
  color: var(--hp-white) !important;
  font-size: 14px;
  font-weight: 600;
  padding: 10px;
  border-radius: var(--hp-radius);
  text-decoration: none;
  transition: var(--hp-transition);
  box-shadow: 0 2px 8px rgba(255,102,0,0.3);
}

.hp-publish-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,102,0,0.4);
}

.hp-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 10px;
}

.hp-quick-grid a {
  text-align: center;
  text-decoration: none;
  padding: 8px 4px;
  border-radius: var(--hp-radius-sm);
  transition: var(--hp-transition);
}

.hp-quick-grid a:hover {
  background: var(--hp-primary-light);
}

.hp-quick-grid span {
  display: block;
  font-size: 12px;
  color: var(--hp-text-2);
}

.hp-quick-grid a:hover span {
  color: var(--hp-primary);
}

/* 公告区 */
.hp-announce {
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  overflow: hidden;
}

.hp-ann-tabs {
  display: flex;
  border-bottom: 1px solid var(--hp-border-light);
}

.hp-ann-tab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  cursor: pointer;
  transition: var(--hp-transition);
}

.hp-ann-tab a {
  color: var(--hp-text-2);
  text-decoration: none;
}

.hp-ann-tab.on {
  border-bottom: 2px solid var(--hp-primary);
}

.hp-ann-tab.on a {
  color: var(--hp-primary);
  font-weight: 600;
}

.hp-ann-bd {
  padding: 8px 12px;
  min-height: 100px;
}

.hp-ann-bd ul,
.hp-news-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-ann-bd li {
  font-size: 12px;
  line-height: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-ann-bd li a {
  color: var(--hp-text-2);
  text-decoration: none;
}

.hp-ann-bd li a:hover {
  color: var(--hp-primary);
}

.hp-ann-bd span {
  display: block;
  font-size: 13px;
  color: var(--hp-text-2);
  padding: 6px 0;
  border-bottom: 1px dashed var(--hp-border-light);
}

.hp-ann-bd span:last-child {
  border-bottom: none;
}

/* ===== 信任背书条 ===== */
.hp-trust {
  background: linear-gradient(135deg, #FFF8F2, #FFF);
  border-top: 1px solid var(--hp-border-light);
  border-bottom: 1px solid var(--hp-border-light);
  padding: 18px 0;
}

.hp-trust .hp-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.hp-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hp-trust-icon {
  width: 28px;
  height: 28px;
  background: var(--hp-primary);
  color: var(--hp-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.hp-trust-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--hp-primary);
}

.hp-trust-label {
  font-size: 13px;
  color: var(--hp-text-2);
}

/* ===== 产品区域 ===== */
.hp-prod-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: start;
}

.hp-prod-side {
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 14px;
}

.hp-prod-side h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--hp-primary);
  color: var(--hp-text);
}

.hp-prod-side h3 a {
  color: var(--hp-text);
  text-decoration: none;
}

.hp-prod-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-prod-side li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--hp-border-light);
}

.hp-prod-side li:last-child {
  border-bottom: none;
}

.hp-prod-side li a {
  font-size: 13px;
  color: var(--hp-text-2);
  text-decoration: none;
  transition: var(--hp-transition);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-prod-side li a:hover {
  color: var(--hp-primary);
  padding-left: 4px;
}

.hp-side-publish {
  display: block;
  text-align: center;
  margin-top: 14px;
  padding: 8px;
  font-size: 12px;
  color: var(--hp-primary);
  background: var(--hp-primary-light);
  border-radius: var(--hp-radius-sm);
  text-decoration: none;
  transition: var(--hp-transition);
}

.hp-side-publish:hover {
  background: var(--hp-primary);
  color: var(--hp-white);
}

/* 产品网格 */
.hp-prod-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.hp-grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

/* 产品卡片 */
.hp-card {
  background: var(--hp-white);
  border: 1px solid var(--hp-border-light);
  border-radius: var(--hp-radius);
  overflow: hidden;
  transition: var(--hp-transition);
  cursor: pointer;
}

.hp-card:hover {
  border-color: var(--hp-primary);
  box-shadow: var(--hp-shadow-hover);
  transform: translateY(-2px);
}

.hp-card-img {
  display: block;
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--hp-bg);
}

.hp-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hp-card:hover .hp-card-img img {
  transform: scale(1.08);
}

.hp-card-info {
  padding: 10px;
}

.hp-card-title {
  margin: 0 0 8px 0;
  font-size: 13px;
  line-height: 1.4;
  height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hp-card-title a {
  color: var(--hp-text);
  text-decoration: none;
  transition: var(--hp-transition);
}

.hp-card:hover .hp-card-title a {
  color: var(--hp-primary);
}

.hp-card-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hp-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--hp-primary);
}

.hp-price em {
  font-size: 12px;
  font-style: normal;
  margin-right: 2px;
}

.hp-price-mian {
  font-size: 14px;
}

.hp-card-sold {
  font-size: 11px;
  color: var(--hp-text-3);
}

.hp-tag-self {
  display: inline-block;
  font-size: 10px;
  color: var(--hp-white);
  background: var(--hp-primary);
  padding: 1px 4px;
  border-radius: 2px;
  vertical-align: middle;
}

/* ===== 资讯区域 ===== */
.hp-news-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
}

.hp-news-imgs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.hp-news-img-item {
  position: relative;
  height: 120px;
  border-radius: var(--hp-radius);
  overflow: hidden;
  background: var(--hp-border-light);
}

.hp-news-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hp-news-img-item:hover img {
  transform: scale(1.05);
}

.hp-news-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--hp-white);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-news-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hp-news-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-news-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--hp-border-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hp-news-list li:last-child {
  border-bottom: none;
}

.hp-news-list li a {
  flex: 1;
  font-size: 13px;
  color: var(--hp-text-2);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: var(--hp-transition);
}

.hp-news-list li a:hover {
  color: var(--hp-primary);
}

/* ===== 企业服务 ===== */
.hp-svc-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.hp-svc-col {
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 16px;
}

.hp-svc-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--hp-primary);
  margin-bottom: 10px;
}

.hp-svc-hd h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--hp-text);
}

.hp-svc-more,
.hp-ai-btn {
  font-size: 12px;
  color: var(--hp-text-3);
  text-decoration: none;
  transition: var(--hp-transition);
}

.hp-svc-more:hover {
  color: var(--hp-primary);
}

.hp-ai-btn {
  background: #5E4EFF;
  color: var(--hp-white) !important;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
}

.hp-svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-svc-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--hp-border-light);
  font-size: 13px;
}

.hp-svc-list li:last-child {
  border-bottom: none;
}

.hp-svc-list li a {
  flex: 1;
  color: var(--hp-text-2);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: var(--hp-transition);
}

.hp-svc-list li a:hover {
  color: var(--hp-primary);
}

.hp-svc-date {
  font-size: 11px;
  color: var(--hp-primary);
  background: var(--hp-primary-light);
  padding: 2px 6px;
  border-radius: 2px;
  flex-shrink: 0;
}

.hp-svc-area {
  font-size: 11px;
  color: var(--hp-text-3);
  flex-shrink: 0;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-svc-credit {
  font-size: 11px;
  color: #E4393C;
  flex-shrink: 0;
}

/* ===== 推荐企业Tab ===== */
.hp-company {
  background: var(--hp-white);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  overflow: hidden;
}

.hp-tab-head {
  display: flex;
  background: var(--hp-bg);
  border-bottom: 2px solid var(--hp-primary);
}

.hp-tab {
  padding: 12px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--hp-transition);
}

.hp-tab a {
  color: var(--hp-text-2);
  text-decoration: none;
}

.hp-tab.on {
  background: var(--hp-white);
}

.hp-tab.on a {
  color: var(--hp-primary);
  font-weight: 600;
}

.hp-tab:hover a {
  color: var(--hp-primary);
}

.hp-tab-bd {
  padding: 16px;
  min-height: 200px;
}

/* ===== 友情链接 ===== */
.hp-friend-logo {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.hp-friend-logo a {
  display: block;
  height: 50px;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-sm);
  overflow: hidden;
  background: var(--hp-white);
  transition: var(--hp-transition);
}

.hp-friend-logo a:hover {
  border-color: var(--hp-primary);
  box-shadow: var(--hp-shadow);
}

.hp-friend-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.hp-friend-text {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.hp-friend-text a {
  font-size: 12px;
  color: var(--hp-text-2);
  text-decoration: none;
  transition: var(--hp-transition);
}

.hp-friend-text a:hover {
  color: var(--hp-primary);
}

/* ===== 响应式: 平板 ===== */
@media (max-width: 1200px) {
  .hp-prod-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .hp-grid-6 {
    grid-template-columns: repeat(4, 1fr);
  }
  .hp-hero .hp-container {
    grid-template-columns: 180px 1fr 220px;
  }
}

@media (max-width: 1023px) {
  .hp-prod-layout {
    grid-template-columns: 1fr;
  }

  .hp-prod-side {
    display: none;
  }

  .hp-prod-grid,
  .hp-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }

  .hp-news-layout {
    grid-template-columns: 1fr;
  }

  .hp-svc-layout {
    grid-template-columns: 1fr;
  }

  .hp-trust .hp-container {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .hp-sec-cats {
    display: none;
  }

  .hp-friend-logo {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== 响应式: 手机 ===== */
@media (max-width: 767px) {
  .hp-section {
    padding: 20px 0;
  }

  .hp-sec-title {
    font-size: 18px;
  }

  .hp-hero .hp-container {
    grid-template-columns: 1fr;
  }

  .hp-hero-cate,
  .hp-hero-side {
    display: none;
  }

  .hp-banner {
    height: 180px;
  }

  .hp-hero-ads {
    grid-template-columns: repeat(2, 1fr);
    height: auto;
  }

  .hp-hero-ads > div {
    height: 60px;
  }

  .hp-prod-grid,
  .hp-grid-6 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .hp-card-img {
    height: 120px;
  }

  .hp-card-info {
    padding: 8px;
  }

  .hp-card-title {
    font-size: 12px;
    height: 32px;
  }

  .hp-price {
    font-size: 14px;
  }

  .hp-news-imgs {
    grid-template-columns: 1fr;
  }

  .hp-news-img-item {
    height: 100px;
  }

  .hp-news-text {
    grid-template-columns: 1fr;
  }

  .hp-trust .hp-container {
    gap: 8px;
  }

  .hp-trust-item {
    gap: 4px;
  }

  .hp-trust-num {
    font-size: 16px;
  }

  .hp-trust-label {
    font-size: 11px;
  }

  .hp-friend-logo {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-tab {
    padding: 10px 14px;
    font-size: 13px;
  }
}