/* ===== products.css - 产品页面样式 ===== */
/* 版本: 2.0.0 */
/* 最后更新: 2026-02-27 */
/* 适用于产品列表页 (/products/) 和产品详情页 (/products/xxx/) */

/* ---------- 产品列表页布局 ---------- */
.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-xl);
  margin: var(--spacing-2xl) 0;
}

@media (max-width: 992px) {
  .products-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
}

/* ---------- 筛选侧边栏 ---------- */
.filter-sidebar {
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  align-self: start;
  position: sticky;
  top: 90px;
}

.filter-sidebar h3 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary);
}

.filter-group {
  margin-bottom: var(--spacing-xl);
}

.filter-group h4 {
  font-size: var(--text-base);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}

.filter-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.filter-group li {
  margin-bottom: var(--spacing-sm);
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.filter-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* 价格范围滑块（示例） */
.price-range {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.price-range input {
  width: 50%;
  padding: var(--spacing-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

/* 筛选按钮 */
.filter-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.filter-actions .btn {
  flex: 1;
  padding: var(--spacing-sm);
  font-size: var(--text-sm);
}

/* 移动端侧边栏切换 */
.filter-toggle {
  display: none;
  margin-bottom: var(--spacing-lg);
}

@media (max-width: 992px) {
  .filter-toggle {
    display: block;
  }
  .filter-sidebar {
    position: static;
    display: none;
  }
  .filter-sidebar.active {
    display: block;
  }
}

/* ---------- 产品网格 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

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

@media (max-width: 576px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* 产品卡片（已在 cards.css 定义，此处可覆盖或增强） */
.product-card {
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.product-image {
  position: relative;
  padding-top: 75%; /* 4:3 比例 */
  overflow: hidden;
  background-color: var(--background);
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-base);
}

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

.product-badge {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background-color: var(--primary);
  color: var(--text-light);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: bold;
  z-index: 1;
}

.product-badge.hot {
  background-color: var(--danger);
}

.product-badge.new {
  background-color: var(--success);
}

.product-content {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  color: var(--primary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  margin-bottom: var(--spacing-xs);
}

.product-title {
  font-size: var(--text-lg);
  font-weight: bold;
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

.product-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

.product-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: var(--spacing-md);
  flex: 1;
}

.product-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-md) 0;
  border-top: 1px solid var(--border);
  padding-top: var(--spacing-sm);
}

.product-specs li {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  margin-bottom: var(--spacing-xs);
}

.spec-label {
  color: var(--text-muted);
}

.spec-value {
  font-weight: 500;
}

.product-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: auto;
}

.btn-inquiry {
  flex: 1;
  background-color: var(--primary);
  color: var(--text-light);
  border: none;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  text-align: center;
}

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

.btn-detail {
  flex: 1;
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  text-align: center;
}

.btn-detail:hover {
  background-color: var(--primary);
  color: var(--text-light);
}

/* ---------- 产品详情页样式 ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  margin: var(--spacing-2xl) 0;
}

@media (max-width: 992px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
}

/* 产品图库 */
.product-gallery {
  position: relative;
}

.main-image {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: var(--spacing-md);
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-sm);
}

.thumbnail {
  aspect-ratio: 1/1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition-fast);
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--primary);
  opacity: 0.9;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 产品信息 */
.product-info {
  padding: var(--spacing-lg) 0;
}

.product-info .product-category {
  font-size: var(--text-sm);
  margin-bottom: var(--spacing-sm);
}

.product-info h1 {
  font-size: var(--text-3xl);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.product-meta {
  display: flex;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

.product-meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--spacing-xs);
}

.meta-value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.product-price {
  font-size: var(--text-2xl);
  font-weight: bold;
  color: var(--primary);
  margin-bottom: var(--spacing-lg);
}

.product-short-desc {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-xl);
}

/* 规格表格 */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-xl) 0;
}

.specs-table tr {
  border-bottom: 1px solid var(--border);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: var(--spacing-sm) 0;
  font-size: var(--text-sm);
}

.specs-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  width: 30%;
}

.specs-table td:last-child {
  color: var(--text-secondary);
}

/* 相关产品区域 */
.related-products {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-2xl);
  border-top: 1px solid var(--border);
}

.related-products h2 {
  font-size: var(--text-2xl);
  color: var(--text-primary);
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.related-products .product-grid {
  grid-template-columns: repeat(4, 1fr);
}

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

@media (max-width: 576px) {
  .related-products .product-grid {
    grid-template-columns: 1fr;
  }
}

/* 产品说明书下载 */
.product-downloads {
  background: var(--background);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.product-downloads h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.download-list {
  list-style: none;
  padding: 0;
}

.download-list li {
  margin-bottom: var(--spacing-sm);
}

.download-list a {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px dashed var(--border);
  transition: var(--transition-fast);
}

.download-list a:hover {
  color: var(--primary);
  padding-left: var(--spacing-sm);
}

.download-list i {
  color: var(--primary);
  font-size: var(--text-lg);
}

/* 无结果提示 */
.no-results {
  text-align: center;
  padding: var(--spacing-3xl);
  color: var(--text-muted);
  font-size: var(--text-lg);
  grid-column: 1 / -1;
}

/* 加载更多按钮 */
.load-more {
  text-align: center;
  margin-top: var(--spacing-xl);
}

/* ---------- 产品分类页 ---------- */
.category-header {
  background: var(--background);
  padding: var(--spacing-2xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.category-header h1 {
  font-size: var(--text-3xl);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.category-header p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto;
}
/* ===== 认证徽章展示 ===== 家电密封 */
.certification-showcase {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
  padding: 20px;
  background: var(--background-alt, #ffffff);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
}

.cert-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--background, #f8f9ff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: var(--radius-md, 8px);
  transition: all var(--transition-fast, 0.2s ease);
}

.cert-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
  border-color: var(--primary, #ea5513);
}

.cert-badge i {
  font-size: 24px;
  color: var(--primary, #ea5513);
}

.cert-badge span {
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  color: var(--text-primary, #1e1e2a);
  white-space: nowrap;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .certification-showcase {
    gap: 12px;
    padding: 15px;
  }

  .cert-badge {
    padding: 8px 15px;
  }

  .cert-badge span {
    font-size: 13px;
    white-space: normal; /* 允许文字换行 */
    text-align: center;
  }
}

/* 超小屏时单列显示 */
@media (max-width: 480px) {
  .certification-showcase {
    flex-direction: column;
    align-items: stretch;
  }

  .cert-badge {
    justify-content: center;
  }
}
/* raw row, col-md-6, case-studies-grid */
/* 基础布局类 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}
.col-md-6 {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}
@media (min-width: 768px) {
  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}
.align-items-center {
  align-items: center !important;
}
.section {
  padding: 70px 0;
}
.section.bg-light {
  background-color: var(--background, #f8f9ff);
}
.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.section-title {
  font-size: 36px;
  color: var(--text-dark);
  margin-bottom: 15px;
}
.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
}
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}
@media (max-width: 768px) {
  .case-studies-grid {
    grid-template-columns: 1fr;
  }
}
.case-study {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}
.case-study img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.case-study .case-content {
  padding: 20px;
}
.download-list {
  list-style: none;
  padding: 0;
}
.download-list li {
  margin-bottom: 10px;
}
.download-list a {
  color: var(--primary);
  text-decoration: none;
}
.feature-list {
  list-style: none;
  padding: 0;
}
.feature-list li {
  margin-bottom: 10px;
}
/* 标准认证网格 */
.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  justify-items: center;
  align-items: center;
  margin-top: 30px;
}

.standard-item {
  text-align: center;
  padding: 15px;
  background: var(--background-alt);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  width: 100%; /* 确保网格项占满网格单元格 */
}

.standard-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.standard-item i {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.standard-item h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text-dark);
}

.standard-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0;
}
/* 定制流程步骤 */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-xl);
  margin: var(--spacing-2xl) 0;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: white;
  font-size: var(--text-2xl);
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-lg);
  box-shadow: 0 5px 15px rgba(234, 85, 19, 0.3);
  transition: var(--transition-base);
}

.step:hover .step-number {
  transform: scale(1.1);
  background: var(--primary-dark);
}

.step h3 {
  font-size: var(--text-lg);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.step p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin: 0;
}

/* 步骤之间的连接线（可选，提升视觉效果） */
.process-steps .step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 30px;
  right: -25%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
  opacity: 0.3;
  pointer-events: none;
}

/* 移动端适配 */
@media (max-width: 992px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }

  .process-steps .step:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 576px) {
  .process-steps {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
}
