/* =====================================================================
 * components-spare-parts.css — Components & Spare Parts 产品分类页面专属样式
 * =====================================================================
 *
 * 【维护规则】
 *   1. 不定义 h1/h2/h3 样式，由 common.css 统一管理
 *   2. 优先使用 common.css 的工具类：
 *      .section-container / .section-content / .text-center / .bgf9f9f9 等
 *   3. 本文件只写页面独有的组件和布局样式
 *
 * ===================================================================== */
.components-page {
  margin-top: 65px;
}

/* Hero Section */
.components-hero {
  background: linear-gradient(135deg, #0B1F3F 0%, #1E3A5F 100%);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 30px 0 60px 0;
}

.components-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 16px;
}

/* Hero Breadcrumb */
.hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

.hero-breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.hero-breadcrumb .separator {
  color: rgba(255, 255, 255, 0.6);
  user-select: none;
}

.hero-breadcrumb .current {
  color: #fff;
  font-weight: 500;
}

/* Components Grid - 3列布局 */
.components-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 20px;
}

/* Component Card */
.component-card {
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
}

.component-card:hover {
  border-color: #424ad2;
}

/* Featured Card - Water Treatment Filter占2列 */
.component-card--featured {
  grid-column: span 2;
}

.component-card--featured .component-card-content h2 {
  font-size: 24px;
}

.component-card--featured .component-card-content p {
  font-size: 16px;
}

/* Card Image */
.component-card-image {
  position: relative;
  width: 100%;
  padding-top: 66.67%;
  overflow: hidden;
  background: #f8fafc;
}

.component-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

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

/* Card Overlay */
.component-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(66, 74, 210, 0.92), rgba(66, 74, 210, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.component-card:hover .component-card-overlay {
  opacity: 1;
}

.view-products {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid #fff;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.view-products i {
  transition: transform 0.3s ease;
}

.component-card:hover .view-products i {
  transform: translateX(4px);
}

/* Card Content */
.component-card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.component-card-content h2 {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
  line-height: 1.3;
}

.component-card-content p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
  flex: 1;
}

/* Feature Tags */
.component-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  white-space: nowrap;
}

.feature-tag i {
  font-size: 12px;
  color: #424ad2;
}

/* Sub Categories - 仅用于Featured卡片 */
.sub-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.sub-tag {
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
}

/* ========== 响应式设计 ========== */

/* Tablet */
@media (max-width: 1024px) {
  .components-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .component-card--featured {
    grid-column: span 2;
  }

  .component-card-content h2 {
    font-size: 20px;
  }

  .component-card-content p {
    font-size: 14px;
  }

  .hero-subtitle {
    font-size: 17px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .components-hero {
    min-height: 280px;
  }

  .hero-content {
    padding: 30px 16px;
  }

  .hero-subtitle {
    font-size: 16px;
    margin-top: 12px;
  }

  .components-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .component-card--featured {
    grid-column: span 1;
  }

  .component-card-content {
    padding: 20px;
  }

  .component-card-content h2 {
    font-size: 19px;
  }

  .component-card--featured .component-card-content h2 {
    font-size: 21px;
  }

  .component-card-content p {
    font-size: 14px;
    margin-bottom: 14px;
  }

  .feature-tag {
    font-size: 12px;
    padding: 5px 10px;
  }

  .sub-tag {
    font-size: 11px;
    padding: 3px 8px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .components-hero {
    min-height: 240px;
  }

  .hero-content {
    padding: 24px 16px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .component-card-content {
    padding: 18px;
  }

  .component-card-content h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .component-card--featured .component-card-content h2 {
    font-size: 20px;
  }

  .component-card-content p {
    font-size: 14px;
    line-height: 1.5;
  }

  .view-products {
    font-size: 15px;
    padding: 10px 20px;
  }
}
