/* ============================================
   Products Page - 产品中心页面专属样式
   ============================================ */

/* ========== Products Hero ========== */
.products-hero {
  position: relative;
  height: 50vh;
  min-height: 400px;
  max-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.products-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.products-hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.products-hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}

.products-hero-container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.products-hero-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--white);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  text-wrap: balance;
}

.products-hero-subtitle {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.85);
  line-height: var(--leading-relaxed);
  max-width: 540px;
  margin: 0 auto;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .products-hero-title {
    font-size: var(--text-4xl);
  }

  .products-hero-subtitle {
    font-size: var(--text-lg);
  }
}

@media (min-width: 1024px) {
  .products-hero-title {
    font-size: var(--text-5xl);
  }
}

/* ========== Product System Overview ========== */
.overview-desc {
  max-width: 720px;
  margin: 0 auto var(--space-10);
  text-align: center;
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
  text-wrap: pretty;
}

/* 三层堆焊示意图 */
.layer-diagram {
  max-width: 680px;
  margin: 0 auto var(--space-10);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--white);
}

.layer-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--gray-100);
}

.layer-row:last-child {
  border-bottom: 0;
}

.layer-bar {
  width: 8px;
  flex-shrink: 0;
}

.layer-bar-high { background: var(--primary); }
.layer-bar-mid { background: #f59e0b; }
.layer-bar-buffer { background: #3b82f6; }
.layer-bar-base { background: var(--gray-400); }

.layer-info {
  flex: 1;
  padding: var(--space-4) var(--space-5);
}

.layer-name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--gray-900);
  margin-bottom: var(--space-1);
}

.layer-desc {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

/* 产品形态卡片 */
.product-type-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.product-type-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
}

.product-type-card.primary-card {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-alpha-10);
}

.product-type-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--primary);
  background: var(--primary-alpha-10);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
  letter-spacing: var(--tracking-wide);
}

.product-type-name {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.product-type-desc {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

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

/* ========== Tab Navigation ========== */
.tab-nav {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-8);
  border-bottom: 2px solid var(--gray-100);
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex-shrink: 0;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.tab-btn:hover {
  color: var(--gray-900);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: var(--font-semibold);
}

@media (min-width: 768px) {
  .tab-btn {
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-6);
  }
}

/* ========== Tab Panel ========== */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Industry Header ========== */
.industry-header {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.industry-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.industry-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--white);
}

.industry-info h3 {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--gray-900);
  margin-bottom: var(--space-1);
}

.industry-info .industry-condition {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-bottom: var(--space-2);
}

.industry-info .industry-apps {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
}

/* ========== Product Table ========== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-6);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}

.product-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.product-table thead {
  background: var(--gray-50);
}

.product-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: var(--font-semibold);
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

.product-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.product-table tbody tr:last-child td {
  border-bottom: none;
}

.product-table tbody tr:hover {
  background: var(--gray-50);
}

/* 型号列固定宽度，加粗 */
.product-table .col-model {
  font-weight: var(--font-semibold);
  color: var(--gray-900);
  white-space: nowrap;
}

/* 产品 badge */
.table-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: var(--font-bold);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-left: var(--space-2);
  vertical-align: middle;
  line-height: 1.6;
}

.badge-hot {
  background: #fef2f2;
  color: var(--primary);
  border: 1px solid rgba(227, 27, 35, 0.2);
}

.badge-recommend {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* 询盘按钮 */
.btn-inquiry {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--primary);
  background: var(--primary-alpha-10);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

.btn-inquiry svg {
  width: 14px;
  height: 14px;
}

/* ========== Recommendation Box ========== */
.recommendation-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border: 1px solid #f59e0b33;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

.recommendation-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: #92400e;
  margin-bottom: var(--space-3);
}

.recommendation-title svg {
  width: 18px;
  height: 18px;
  stroke: #f59e0b;
  flex-shrink: 0;
}

.recommendation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recommendation-list li {
  font-size: var(--text-sm);
  color: #78350f;
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(245, 158, 11, 0.15);
  line-height: var(--leading-relaxed);
}

.recommendation-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* 行业 CTA 按钮 */
.industry-cta {
  text-align: center;
  padding-top: var(--space-2);
}

/* ========== Product Gallery ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========== Advantages Section ========== */
.advantages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.advantage-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
}

.advantage-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  background: var(--primary-alpha-10);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.advantage-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--primary);
}

.advantage-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.advantage-desc {
  font-size: var(--text-sm);
  color: var(--gray-500);
  line-height: var(--leading-relaxed);
}

@media (min-width: 768px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .advantages-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========== Products CTA Section ========== */
.products-cta-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.products-cta-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--white);
  text-align: center;
  margin-bottom: var(--space-2);
  text-wrap: balance;
}

.products-cta-desc {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  margin-bottom: var(--space-8);
  text-wrap: balance;
}

/* 感兴趣的产品字段 */
.form-product-field {
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .products-cta-title {
    font-size: var(--text-3xl);
  }
}

/* ========== 灰色背景区块 ========== */
.section-light-gray {
  background: var(--gray-50);
}
