/* Products polish — load AFTER style.css (enterprise layout + particles) */

.hot-products-main {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 42%, #ffffff 100%) !important;
  border-top: 1px solid #eef0f3 !important;
}

.hot-products-main .hp-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hot-products-main .hp-particles span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(22, 119, 255, 0.22);
  box-shadow: 0 0 12px rgba(22, 119, 255, 0.18);
  animation: hp-float linear infinite;
  opacity: 0;
}

.hot-products-main .hp-particles span:nth-child(1)  { width: 4px; height: 4px; left: 8%;  top: 72%; animation-duration: 18s; animation-delay: 0s; }
.hot-products-main .hp-particles span:nth-child(2)  { width: 6px; height: 6px; left: 18%; top: 80%; animation-duration: 22s; animation-delay: 2s; background: rgba(22,119,255,.16); }
.hot-products-main .hp-particles span:nth-child(3)  { width: 3px; height: 3px; left: 28%; top: 68%; animation-duration: 16s; animation-delay: 4s; }
.hot-products-main .hp-particles span:nth-child(4)  { width: 5px; height: 5px; left: 40%; top: 85%; animation-duration: 24s; animation-delay: 1s; background: rgba(64,150,255,.2); }
.hot-products-main .hp-particles span:nth-child(5)  { width: 4px; height: 4px; left: 52%; top: 74%; animation-duration: 20s; animation-delay: 3s; }
.hot-products-main .hp-particles span:nth-child(6)  { width: 7px; height: 7px; left: 63%; top: 82%; animation-duration: 26s; animation-delay: 5s; background: rgba(22,119,255,.14); }
.hot-products-main .hp-particles span:nth-child(7)  { width: 3px; height: 3px; left: 74%; top: 70%; animation-duration: 17s; animation-delay: 1.5s; }
.hot-products-main .hp-particles span:nth-child(8)  { width: 5px; height: 5px; left: 84%; top: 78%; animation-duration: 21s; animation-delay: 3.5s; }
.hot-products-main .hp-particles span:nth-child(9)  { width: 4px; height: 4px; left: 12%; top: 60%; animation-duration: 19s; animation-delay: 6s; }
.hot-products-main .hp-particles span:nth-child(10) { width: 6px; height: 6px; left: 91%; top: 66%; animation-duration: 23s; animation-delay: 2.5s; background: rgba(22,119,255,.18); }
.hot-products-main .hp-particles span:nth-child(11) { width: 3px; height: 3px; left: 35%; top: 88%; animation-duration: 15s; animation-delay: 7s; }
.hot-products-main .hp-particles span:nth-child(12) { width: 5px; height: 5px; left: 58%; top: 62%; animation-duration: 25s; animation-delay: 4.5s; }

@keyframes hp-float {
  0%   { transform: translate3d(0, 0, 0) scale(0.7); opacity: 0; }
  12%  { opacity: 0.85; }
  50%  { opacity: 0.55; }
  100% { transform: translate3d(28px, -220px, 0) scale(1.15); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hot-products-main .hp-particles span { animation: none !important; opacity: 0.25; }
}

.hot-products-main > .container {
  position: relative;
  z-index: 1;
  max-width: 1440px !important;
  padding-left: 64px !important;
  padding-right: 64px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hot-products-main.space2x {
  padding: 36px 0 40px !important;
}

.hot-products-main-content {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 auto !important;
  box-sizing: border-box;
}

.hot-products-main .title-main {
  margin: 0 auto 24px !important;
  max-width: 720px !important;
  text-align: center !important;
}

.hot-products-main .title-head {
  font-size: 32px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 12px !important;
}

.hot-products-main .sub-head {
  font-size: 15px !important;
  color: #8c8c8c !important;
  line-height: 1.75 !important;
}

.hot-products-main .view-all-link {
  display: inline-flex !important;
  margin-top: 14px !important;
}

/* Tabs: centered pills, not 6-col edge-hugging grid */
.hot-products-main .product-tabs,
.product-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px 12px !important;
  grid-template-columns: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
  border: none !important;
  border-bottom: none !important;
  background: transparent !important;
}

.hot-products-main .product-tab,
.product-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  gap: 0 !important;
  min-width: 0 !important;
  width: auto !important;
  padding: 10px 20px !important;
  margin: 0 !important;
  border: 1px solid #e5e8ef !important;
  border-radius: 0 !important;
  border-bottom: 1px solid #e5e8ef !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03) !important;
  color: #595959 !important;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  transform: none !important;
  white-space: nowrap !important;
}

.hot-products-main .product-tab:hover,
.product-tab:hover {
  color: #1677ff !important;
  border-color: #91caff !important;
  background: #f0f7ff !important;
  transform: none !important;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.08) !important;
}

.hot-products-main .product-tab.active,
.product-tab.active {
  color: #fff !important;
  background: #1677ff !important;
  border-color: #1677ff !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.22) !important;
  transform: none !important;
}

.hot-products-main .product-tab .ptab-icon,
.product-tab .ptab-icon {
  display: none !important;
}

.hot-products-main .product-tab .ptab-text,
.product-tab .ptab-text {
  flex: 0 1 auto !important;
}

.hot-products-main .product-panels,
.hot-products-main .product-panel,
.hot-products-main .panel-layout,
.hot-products-main .panel-products {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.hot-products-main .panel-sidebar {
  display: none !important;
}

/* Cards: center when fewer than 4 */
.hot-products-main .products-grid,
.products-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 20px !important;
  grid-template-columns: none !important;
  max-height: none !important;
  overflow: visible !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 4px 12px 8px !important;
  box-sizing: border-box !important;
}

/* 收紧产品区与下方「帮助与资讯」之间的空白 */
.home-news.space2x,
section.home-news.space2x {
  padding-top: 40px !important;
  padding-bottom: 56px !important;
}

.hot-products-main .products-grid .p-card:nth-child(n+9),
.products-grid .p-card:nth-child(n+9) {
  display: none !important;
}

.hot-products-main .p-card,
.products-grid .p-card {
  /* 4 列；左右内边距已从网格宽度扣除，避免贴边 */
  flex: 0 0 calc((100% - 60px) / 4) !important;
  width: calc((100% - 60px) / 4) !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 196px !important;
  height: auto !important;
  padding: 28px 26px 22px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 1px solid #e8ecf2 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05) !important;
  transform: none !important;
  gap: 0 !important;
}

.hot-products-main .p-card:hover,
.products-grid .p-card:hover {
  border-color: #b7d4ff !important;
  box-shadow: 0 12px 32px rgba(22, 119, 255, 0.1) !important;
  transform: translateY(-4px) !important;
  background: #fff !important;
}

.hot-products-main .p-card::before,
.products-grid .p-card::before {
  display: none !important;
  content: none !important;
}

.hot-products-main .p-card-top {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.hot-products-main .p-card-head {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.hot-products-main .p-card-flag {
  width: 26px !important;
  height: 17px !important;
  border-radius: 2px !important;
  flex: 0 0 26px !important;
}

.hot-products-main .p-card-head h4,
.hot-products-main .p-card h4 {
  font-size: 17px !important;
  font-weight: 600 !important;
  color: #1f1f1f !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.hot-products-main .p-card-tag,
.hot-products-main .p-card-ribbon {
  position: static !important;
  top: auto !important;
  right: auto !important;
  width: auto !important;
  padding: 2px 8px !important;
  border-radius: 0 !important;
  background: #e6f4ff !important;
  color: #1677ff !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  transform: none !important;
  box-shadow: none !important;
  flex: 0 0 auto !important;
}

.hot-products-main .p-card-flag {
  border-radius: 0 !important;
}

.hot-products-main .p-card-desc,
.hot-products-main .p-card p {
  font-size: 13px !important;
  color: #8c8c8c !important;
  line-height: 1.7 !important;
  margin: 0 !important;
  -webkit-line-clamp: 2;
}

.hot-products-main .p-card-more {
  display: inline-flex !important;
  align-items: center !important;
  margin-top: 20px !important;
  padding-top: 16px !important;
  border-top: 1px solid #f0f2f5 !important;
  color: #1677ff !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  width: 100% !important;
}

.hot-products-main .p-card-more::after {
  content: "→";
  margin-left: 4px;
}

.hot-products-main .p-card-body,
.hot-products-main .p-card-btn,
.hot-products-main .p-card-badge {
  display: none !important;
}

@media (max-width: 1100px) {
  .hot-products-main .p-card,
  .products-grid .p-card {
    flex: 0 0 calc((100% - 40px) / 3) !important;
    width: calc((100% - 40px) / 3) !important;
    max-width: none !important;
  }
}

@media (max-width: 992px) {
  .hot-products-main > .container {
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
  .hot-products-main.space2x {
    padding: 28px 0 32px !important;
  }
  .hot-products-main .title-head {
    font-size: 26px !important;
  }
  .hot-products-main .p-card,
  .products-grid .p-card {
    flex: 0 0 calc((100% - 20px) / 2) !important;
    width: calc((100% - 20px) / 2) !important;
  }
  .hot-products-main .products-grid,
  .products-grid {
    margin-bottom: 20px !important;
  }
}

@media (max-width: 640px) {
  .hot-products-main > .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  .hot-products-main .product-tabs,
  .product-tabs {
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hot-products-main .product-tabs::-webkit-scrollbar { display: none; }
  .hot-products-main .p-card,
  .products-grid .p-card {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}
