/* ============================================
   汉驰科技 - 产品中心页面样式
   ============================================ */

/* ===== Products Hero ===== */
.products-hero {
  position: relative;
  padding: 140px 0 80px;
  background: linear-gradient(135deg, #0F234A 0%, #1a3a6e 50%, #0d3060 100%);
  overflow: hidden;
}

.products-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.12;
}

.products-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #f8f9fa);
}

.products-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.breadcrumb a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,0.9); }

.products-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin: 12px 0 16px;
  line-height: 1.2;
}

.products-hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 600px;
}

.products-hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.prod-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prod-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.prod-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prod-stat-sep {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
}

/* ===== Products Main ===== */
.products-main {
  padding: 60px 0 80px;
  background: #f8f9fa;
  min-height: 600px;
}

/* ===== Filter Bar ===== */
.products-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.prod-cat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px solid #e8edf5;
  border-radius: 10px;
  background: #fff;
  color: #555;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.prod-cat-btn:hover {
  border-color: #1a3a6e;
  color: #1a3a6e;
  background: #f0f4ff;
}

.prod-cat-btn.active {
  border-color: #1a3a6e;
  background: #1a3a6e;
  color: #fff;
}

.prod-cat-btn.active svg {
  stroke: #fff;
}

.cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: rgba(255,255,255,0.2);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.prod-cat-btn:not(.active) .cat-count {
  background: #f0f4ff;
  color: #1a3a6e;
}

/* ===== Search Bar ===== */
.products-search-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  stroke: #999;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid #e8edf5;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #333;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.search-input:focus {
  border-color: #1a3a6e;
}

.products-count-info {
  font-size: 0.9rem;
  color: #777;
}

.products-count-info strong {
  color: #1a3a6e;
  font-weight: 700;
}

/* ===== Products Grid ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ===== Product Card ===== */
.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.04);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(26,58,110,0.15);
}

.product-card-img {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edf5 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: transform 0.4s;
}

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

.product-card-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #b0bdd0;
  width: 100%;
  height: 100%;
}

.product-card-img-placeholder svg {
  opacity: 0.4;
}

.product-card-img-placeholder span {
  font-size: 0.8rem;
  opacity: 0.6;
}

.product-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cat-badge-storage { background: rgba(26,58,110,0.1); color: #1a3a6e; }
.cat-badge-ev_moto { background: rgba(0,150,100,0.1); color: #007a52; }
.cat-badge-ev_car { background: rgba(0,120,200,0.1); color: #0078c8; }
.cat-badge-charger { background: rgba(200,100,0,0.1); color: #c86400; }
.cat-badge-solar { background: rgba(180,130,0,0.1); color: #b48200; }

.product-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1a2a4a;
  margin-bottom: 6px;
  line-height: 1.4;
}

.product-card-model {
  font-size: 0.82rem;
  color: #1a3a6e;
  font-weight: 600;
  margin-bottom: 10px;
  font-family: 'Courier New', monospace;
  background: #f0f4ff;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}

.product-card-desc {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.feature-tag {
  padding: 3px 8px;
  background: #f0f4ff;
  color: #1a3a6e;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.product-card-footer {
  padding: 14px 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 10px;
}

.prod-btn-view {
  flex: 1;
  padding: 9px 14px;
  background: #1a3a6e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.prod-btn-view:hover { background: #0f234a; }

.prod-btn-inquiry {
  padding: 9px 14px;
  background: transparent;
  color: #1a3a6e;
  border: 2px solid #1a3a6e;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.prod-btn-inquiry:hover {
  background: #1a3a6e;
  color: #fff;
}

/* ===== Products Empty ===== */
.products-empty {
  text-align: center;
  padding: 80px 20px;
  color: #aaa;
}

.products-empty svg {
  margin-bottom: 16px;
  stroke: #ccc;
}

.products-empty p {
  font-size: 1rem;
}

/* ===== Product Modal ===== */
.prod-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  backdrop-filter: blur(4px);
}

.prod-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.prod-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}

.prod-modal-overlay.active .prod-modal {
  transform: scale(1) translateY(0);
}

.prod-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1;
}

.prod-modal-close:hover { background: #e0e0e0; }

.prod-modal-content {
  padding: 32px;
}

.prod-modal-img {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edf5 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  overflow: hidden;
}

.prod-modal-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 20px;
}

.prod-modal-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #b0bdd0;
}

.prod-modal-header {
  margin-bottom: 20px;
}

.prod-modal-cat {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.prod-modal-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a2a4a;
  margin-bottom: 8px;
  line-height: 1.3;
}

.prod-modal-model-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.prod-modal-model-label {
  font-size: 0.82rem;
  color: #888;
  font-weight: 500;
}

.prod-modal-model-val {
  font-size: 0.88rem;
  color: #1a3a6e;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  background: #f0f4ff;
  padding: 4px 10px;
  border-radius: 5px;
}

.prod-modal-desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 3px solid #1a3a6e;
}

.prod-modal-features-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prod-modal-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.prod-modal-feature-tag {
  padding: 6px 14px;
  background: #f0f4ff;
  color: #1a3a6e;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(26,58,110,0.1);
}

.prod-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.prod-modal-btn-primary {
  flex: 1;
  min-width: 160px;
  padding: 14px 24px;
  background: #1a3a6e;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.prod-modal-btn-primary:hover { background: #0f234a; }

.prod-modal-btn-secondary {
  padding: 14px 24px;
  background: transparent;
  color: #1a3a6e;
  border: 2px solid #1a3a6e;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.prod-modal-btn-secondary:hover {
  background: #1a3a6e;
  color: #fff;
}

/* ===== Products CTA ===== */
.products-cta {
  background: linear-gradient(135deg, #0F234A 0%, #1a3a6e 100%);
  padding: 60px 0;
}

.products-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.products-cta-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.products-cta-text p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.products-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Nav Active State ===== */
.nav-link-active {
  color: #1a3a6e !important;
}

.nav-link-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #1a3a6e;
  border-radius: 1px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .products-hero {
    padding: 120px 0 60px;
  }

  .products-hero-stats {
    gap: 16px;
  }

  .prod-stat-num {
    font-size: 1.4rem;
  }

  .products-filter-bar {
    gap: 8px;
    padding: 14px;
  }

  .prod-cat-btn {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

  .products-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrap {
    max-width: 100%;
  }

  .prod-modal-content {
    padding: 20px;
  }

  .products-cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .products-cta-actions {
    justify-content: center;
  }
}

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

  .prod-modal-actions {
    flex-direction: column;
  }

  .prod-modal-btn-primary,
  .prod-modal-btn-secondary {
    min-width: unset;
  }
}
