/* ==========================================================================
   Page: Products, Taxonomy & Single Product (page-products.css)
   ========================================================================== */

/* ==========================================================================
   Products 专属 Hero 背景 (使用甲方的精密线缆图，防广告插件屏蔽)
   ========================================================================== */
.products-hero-section {
  position: relative;
  background: #082444 url('../images/products-hero-cover.jpg') center center / cover no-repeat !important;
  padding: 68px 0 72px !important;
  color: #ffffff !important;
  overflow: hidden;
}

.products-hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8, 36, 68, 0.88) 0%, rgba(17, 110, 184, 0.76) 50%, rgba(5, 20, 42, 0.92) 100%);
  z-index: 1;
}

.products-hero-section .container {
  position: relative;
  z-index: 2;
}

.products-hero-section .page-banner-title {
  font-size: 38px !important;
  font-weight: 900 !important;
  color: #ffffff !important; /* 标题纯白色 */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
  margin-bottom: 12px !important;
  letter-spacing: -0.5px;
}

.products-hero-section .page-banner-desc {
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #ffffff !important; /* 描述文字纯白色 */
  opacity: 1 !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6) !important;
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.65;
}

.page-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: flex-start;
}

/* 侧边栏分类筛选 */
.page-sidebar .sidebar-widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.page-sidebar .widget-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.page-sidebar .sidebar-cat-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 1. 一级大类标题卡片 (深色加大粗体，4px 工业蓝左指示条，高对比度) */
.page-sidebar .parent-cat-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 11px 14px !important;
  background-color: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-left: 4px solid #084b8a !important;
  border-radius: 6px !important;
  color: #0f172a !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.page-sidebar .parent-cat-header:hover {
  background-color: #e2e8f0 !important;
  border-left-color: #28a745 !important;
  color: #084b8a !important;
}

.page-sidebar .sidebar-parent-group.active > .parent-cat-header,
.page-sidebar .sidebar-parent-group.is-current > .parent-cat-header {
  background-color: #084b8a !important;
  border-color: #084b8a !important;
  border-left-color: #28a745 !important;
  color: #ffffff !important;
}

.page-sidebar .sidebar-parent-group.has-active-child > .parent-cat-header {
  background-color: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  border-left-color: #084b8a !important;
  color: #084b8a !important;
}

.page-sidebar .parent-cat-arrow {
  font-size: 11px;
  color: #64748b;
  transition: transform 0.2s ease;
}

.page-sidebar .sidebar-parent-group.active .parent-cat-arrow,
.page-sidebar .sidebar-parent-group.is-current .parent-cat-arrow {
  color: #ffffff;
  transform: rotate(90deg);
}

.page-sidebar .sidebar-parent-group.has-active-child .parent-cat-arrow {
  color: #084b8a;
  transform: rotate(90deg);
}

/* 2. 二级子分类列表 (明确缩进，高对比度灰色连接线，去掉大白框) */
.page-sidebar .sidebar-subcat-list {
  list-style: none !important;
  margin: 8px 0 2px 16px !important;
  padding: 0 0 0 14px !important;
  border-left: 2px solid #94a3b8 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.page-sidebar .subcat-link {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px 10px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 5px !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.page-sidebar .subcat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #94a3b8;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.page-sidebar .subcat-link:hover {
  background-color: #f1f5f9 !important;
  color: #084b8a !important;
  padding-left: 14px !important;
}

.page-sidebar .subcat-link:hover .subcat-dot {
  background-color: #28a745;
  transform: scale(1.3);
}

/* 当前选中的子分类 */
.page-sidebar .sidebar-subcat-list li.active .subcat-link {
  background-color: #e0f2fe !important;
  color: #0284c7 !important;
  font-weight: 700 !important;
}

.page-sidebar .sidebar-subcat-list li.active .subcat-dot {
  background-color: #0284c7;
  transform: scale(1.4);
}

/* 产品网格 (3 列规范卡片) */
.products-grid-clean {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.product-card-clean {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-clean:hover {
  border-color: #116eb8;
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(17, 110, 184, 0.14);
}

.product-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.product-thumb-clean {
  height: 220px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.product-thumb-clean img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card-clean:hover .product-thumb-clean img {
  transform: scale(1.05);
}

.product-title-clean {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  padding: 14px 16px;
  min-height: 72px;
  line-height: 1.45;
  text-align: center;
  margin: 0;
  transition: color 0.2s ease;
}

.product-card-clean:hover .product-title-clean {
  color: #116eb8;
}

/* 分页条 */
.pagination-wrap {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.pagination-wrap .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  transition: all 0.2s ease;
}

.pagination-wrap .page-numbers.current,
.pagination-wrap .page-numbers:hover {
  background: #084b8a;
  color: #ffffff;
  border-color: #084b8a;
}

/* 单个产品详情页 (single-products.php) */
.product-top-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 45px;
  align-items: flex-start;
  margin-bottom: 45px;
}

.p-detail-gallery {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.p-main-img-box img {
  max-height: 340px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.p-detail-summary {
  display: flex;
  flex-direction: column;
}

.p-detail-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 12px;
}

.p-model-code {
  display: inline-block;
  font-size: 14px;
  color: #116eb8;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 18px;
  align-self: flex-start;
}

.p-brief-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 24px;
}

.hero-actions .btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #28a745;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 32px;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(40, 167, 69, 0.25);
  transition: all 0.25s ease;
}

.hero-actions .btn-hero-primary:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(40, 167, 69, 0.35);
}

/* 技术规格参数表 */
.p-content-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 36px 32px;
  margin-bottom: 30px;
}

/* 后台富文本编辑器前台渲染样式 */
.product-entry-content {
  font-size: 15px;
  line-height: 1.85;
  color: #334155;
}

.product-entry-content p {
  margin-bottom: 16px;
}

.product-entry-content h2,
.product-entry-content h3,
.product-entry-content h4 {
  color: #0f172a;
  font-weight: 800;
  margin-top: 24px;
  margin-bottom: 12px;
}

.product-entry-content ul,
.product-entry-content ol {
  margin: 12px 0 20px 24px;
}

.product-entry-content li {
  margin-bottom: 8px;
}

.product-entry-content table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 20px 0 !important;
  font-size: 13.5px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}

.product-entry-content table th,
.product-entry-content table td {
  padding: 12px 16px !important;
  border: 1px solid #e2e8f0 !important;
  text-align: left !important;
}

.product-entry-content table th {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}

.product-entry-content table tr:nth-child(even) td {
  background-color: #f8fafc !important;
}

.product-entry-content table tr:hover td {
  background-color: #f1f5f9 !important;
}

.product-entry-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
  margin: 16px 0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
}

.box-section-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th,
.specs-table td {
  padding: 12px 18px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
}

.specs-table th {
  background-color: #f8fafc;
  color: #334155;
  font-weight: 700;
  width: 20%;
}

.specs-table td {
  color: #0f172a;
  width: 30%;
}

@media (max-width: 1024px) {
  .products-grid-clean {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .products-grid-clean {
    grid-template-columns: 1fr;
  }
  .specs-table th,
  .specs-table td {
    display: block;
    width: 100%;
  }
}
