/*
 * components.css
 * 作用：定义各种可复用的 UI 组件：按钮、卡片、表单、徽章、Hero、产品卡片等
 */

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-outline:hover {
  background: var(--bg-secondary);
}

/* 用于深色背景上的白色描边按钮 */
.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: var(--card-border);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

/* ===== 卡片 ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(14, 165, 233, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== 徽章 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: rgba(14, 165, 233, 0.12);
  color: var(--color-primary);
}

.badge-accent {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-accent);
}

/* ===== 资质认证证书 ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.cert-card {
  background: transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: none;
  text-align: center;
}

.cert-card .feature-image {
  margin-bottom: 0;
  height: clamp(180px, 30vw, 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
}

.cert-card .feature-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cert-card-wide {
  grid-column: span 2;
}

.cert-name {
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  color: var(--text-primary);
}

@media (max-width: 576px) {
  .cert-card-wide {
    grid-column: span 1;
  }
}

/* ===== Hero 区域 ===== */
.hero {
  position: relative;
  background: var(--bg-hero);
  color: var(--text-on-dark);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-sm);
}

.hero p {
  font-size: 1.25rem;
  color: rgba(248, 250, 252, 0.85);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
}

.hero-stat span {
  font-size: 0.875rem;
  color: rgba(248, 250, 252, 0.7);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: var(--space-md);
  }

  .hero-stat strong {
    font-size: 1.25rem;
  }
}

/* ===== 数据/优势卡片 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.stat-card {
  text-align: center;
  padding: var(--space-md);
}

.stat-card .number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-card .label {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

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

/* ===== 分类卡片 ===== */
.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.5) 50%, rgba(15, 23, 42, 0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
  color: #fff;
  transition: background 0.4s ease;
}

.category-card:hover .category-overlay {
  background: linear-gradient(to top, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.6) 55%, rgba(15, 23, 42, 0.2) 100%);
}

.category-overlay h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.category-overlay p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.category-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-light);
  transform: translateX(-8px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.category-card:hover .category-arrow {
  transform: translateX(0);
  opacity: 1;
}

.category-card:hover .category-arrow svg {
  transform: translateX(3px);
}

/* ===== 首页分类网格 ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

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

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

  .category-card {
    aspect-ratio: 16 / 10;
  }
}

/* ===== 首页资料下载 ===== */
.home-download {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  text-align: center;
}

.home-download h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.home-download p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* ===== 产品卡片 ===== */
.products-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  justify-content: center;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-primary);
  color: #fff;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

.product-image {
  aspect-ratio: 4 / 3;
  background: #ffffff;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

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

.product-body {
  padding: var(--space-md);
}

.product-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.product-model {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.product-spec {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

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

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

/* ===== 首页新产品 / 热销产品板块 ===== */
.home-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.home-products-more {
  margin-top: var(--space-lg);
  text-align: center;
}

.home-products-loading,
.home-products-error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: var(--space-lg) 0;
}

.home-product-card .product-image {
  position: relative;
}

.home-product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.badge-new {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.badge-hot {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
}

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

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

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

/* ===== 图文左右排列 ===== */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

.feature-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.feature-image img {
  width: 100%;
  height: auto;
}

.feature-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.feature-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
}

.feature-list svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}

@media (max-width: 992px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .feature-content h2 {
    font-size: 1.5rem;
  }
}

/* ===== 时间线 ===== */
.timeline {
  position: relative;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: var(--card-border);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  padding-bottom: var(--space-lg);
}

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 4px solid var(--bg-primary);
}

.timeline-year {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== 表单 ===== */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

/* ===== 联系我们页面布局 ===== */
.contact-section .contact-row {
  align-items: stretch;
  justify-content: center;
}

.contact-section .contact-col {
  margin-bottom: var(--space-md);
}

.contact-section .contact-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contact-section .contact-panel-title {
  margin-bottom: var(--space-md);
  text-align: center;
}

.contact-section .contact-form-note {
  margin-top: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.contact-section .contact-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
  justify-content: center;
}

/* ===== 联系信息卡片 ===== */
.contact-card {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(14, 165, 233, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 22px;
  height: 22px;
}

.contact-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== 地图容器 ===== */
.map-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 400px;
  position: relative;
}

.map-loading {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-fallback {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-size: 0.9rem;
}

.map-fallback a {
  color: var(--color-primary);
  text-decoration: none;
}

.map-fallback a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .map-container {
    height: 320px;
  }
}

/* ===== 研发实力 R&D 区块 ===== */
.rd-section .rd-intro {
  max-width: 900px;
  margin: 0 auto var(--space-lg);
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.8;
}

.rd-section .rd-intro p {
  margin-bottom: var(--space-sm);
}

.rd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.rd-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rd-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.rd-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-secondary);
}

.rd-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.rd-content {
  padding: var(--space-md);
}

.rd-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.rd-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

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

/* ===== CTA 区块 ===== */
.cta-section {
  background:
    linear-gradient(rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.65)),
    url('../images/cta-bg.webp?v=2') center / cover no-repeat;
  color: var(--text-on-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.cta-section h2,
.cta-section p {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.cta-section p {
  color: rgba(248, 250, 252, 0.9);
  margin-bottom: var(--space-md);
}

@media (max-width: 768px) {
  .cta-section h2 {
    font-size: 1.5rem;
  }
}

/* ===== 产品详情页 ===== */
.page-header-sm {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  text-align: left;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  color: rgba(248, 250, 252, 0.75);
}

.breadcrumb a {
  color: rgba(248, 250, 252, 0.9);
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--color-primary-light);
}

.product-detail-loading,
.product-detail-error {
  text-align: center;
  padding: var(--space-2xl) 0;
  color: var(--text-secondary);
}

.product-detail-error a {
  color: var(--color-primary);
  text-decoration: underline;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

/* 图片画廊 */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  position: relative;
}

.product-gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #ffffff;
  aspect-ratio: 4 / 3;
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xs);
}

.product-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  background: #ffffff;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-thumb.active,
.product-thumb:hover {
  border-color: var(--color-primary);
}

/* 产品信息 */
.product-detail-info {
  display: flex;
  flex-direction: column;
}

.product-detail-category {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.product-detail-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.product-detail-model {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.product-detail-desc {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.product-detail-actions {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

/* 特点列表 */
.product-detail-block {
  margin-bottom: var(--space-lg);
}

.product-detail-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--card-border);
}

.product-feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-feature-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.product-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* 参数表格 */
.product-parameters-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
}

.product-parameters {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
}

.product-parameters th,
.product-parameters td {
  padding: 0.875rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.product-parameters th {
  width: 40%;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  white-space: nowrap;
}

.product-parameters td {
  color: var(--text-primary);
}

.product-parameters tr:last-child th,
.product-parameters tr:last-child td {
  border-bottom: none;
}

/* 参数分区布局 */
.product-detail-sections {
  margin-top: var(--space-xl);
}

.product-parameters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-lg);
  align-items: stretch;
}

.parameter-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.parameter-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.parameter-card-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0284c7 100%);
  color: #fff;
}

.parameter-card-header h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.parameter-card-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.parameter-card .product-parameters-wrapper {
  border: none;
  border-radius: 0;
}

.parameter-card .product-parameters th {
  background: var(--bg-secondary);
}

.parameter-card-lamp .parameter-card-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.parameter-card-price .parameter-card-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.parameter-card-package .parameter-card-header {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.parameter-card-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.parameter-card-lamp {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}

.parameter-card-price {
  grid-column: 1;
  grid-row: 2;
}

.parameter-card-package {
  grid-column: 2;
  grid-row: 2;
}

/* 技术参数两列网格 */
.parameter-grid-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.parameter-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  min-height: 0;
}

.parameter-grid-item {
  display: grid;
  grid-template-columns: 40% 60%;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
}

.parameter-grid-label {
  background: var(--bg-secondary);
  padding: 0.625rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  height: 100%;
  display: flex;
  align-items: center;
}

.parameter-grid-value {
  padding: 0.625rem 1rem;
  color: var(--text-primary);
  height: 100%;
  display: flex;
  align-items: center;
}

.parameter-grid-item:nth-last-child(1),
.parameter-grid-item:nth-last-child(2) {
  border-bottom: none;
}

.parameter-grid .param-group-subheader {
  grid-column: 1 / -1;
}

.parameter-grid .param-group-subheader .parameter-grid-label {
  grid-column: 1 / -1;
  width: 100%;
}

.param-group-subheader th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 0.625rem 1.25rem;
}

/* 详情区块布局 */
.product-detail-sections {
  display: block;
}

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

  .product-detail-title {
    font-size: 1.625rem;
  }

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

@media (max-width: 576px) {
  .product-detail-actions {
    flex-direction: column;
  }

  .product-gallery-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== 产品中心新增样式 ===== */

/* 搜索栏 */
.product-search-section {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--card-border);
}

.product-search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 720px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-search-bar:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.product-search-bar .search-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.product-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  min-width: 0;
}

.product-search-bar input::placeholder {
  color: var(--text-muted);
}

.product-search-bar .btn {
  flex-shrink: 0;
}

.search-result-info {
  text-align: center;
  margin-top: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  min-height: 1.5rem;
}

/* 产品中心布局 */
.product-center-layout {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

/* 移动端分类触发按钮 */
.category-mobile-toggle {
  display: none;
  align-items: center;
  gap: var(--space-xs);
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
  box-shadow: var(--card-shadow);
}

.category-mobile-toggle svg {
  width: 18px;
  height: 18px;
}

/* 左侧分类导航 */
.product-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: var(--space-md);
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--card-border);
}

.sidebar-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-close {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

.sidebar-close svg {
  width: 18px;
  height: 18px;
}

.category-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.category-nav-item:hover {
  background: var(--bg-secondary);
  color: var(--color-primary);
}

.category-nav-item.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.category-nav-item .category-count {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.category-nav-item.active .category-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* 左侧资料下载 */
.sidebar-download {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.sidebar-download h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.sidebar-download p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.sidebar-download .btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* 右侧主区域 */
.product-main {
  flex: 1;
  min-width: 0;
}

.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 产品卡片更新 */
.product-card {
  position: relative;
}

.product-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(14, 165, 233, 0.12);
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.product-card .product-title {
  font-size: 1.1rem;
}

.product-card .product-model {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
}

.product-card .product-spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: var(--space-sm);
}

.product-card .product-spec-tags span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.product-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.product-card-header .product-category-badge {
  margin-bottom: 0;
}

.product-variant-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
  white-space: nowrap;
}

/* 产品详情 variant 切换 */
.product-variant-selector {
  margin: var(--space-md) 0;
}

.product-variant-selector .variant-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
}

.variant-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.variant-btn {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.variant-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.variant-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) 0;
  color: var(--text-secondary);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-sm);
  color: var(--text-muted);
}

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

/* 图片放大预览 */
.product-gallery-main {
  position: relative;
  cursor: crosshair;
}

.zoom-lens {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 2px solid var(--color-primary);
  background: rgba(14, 165, 233, 0.1);
  border-radius: var(--radius-md);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  transform: translate(-50%, -50%);
}

.zoom-lens.active {
  opacity: 1;
}

.zoom-result {
  position: absolute;
  top: 0;
  left: calc(100% + var(--space-md));
  width: 70.7%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background-repeat: no-repeat;
  background-color: var(--bg-secondary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.zoom-result.active {
  opacity: 1;
}

@media (max-width: 1200px) {
  .zoom-result {
    display: none;
  }
}

/* 响应式：平板和手机 */
@media (max-width: 992px) {
  .product-center-layout {
    flex-direction: column;
  }

  .category-mobile-toggle {
    display: flex;
  }

  .product-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 1100;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    max-height: 100vh;
  }

  .product-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .product-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .product-sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

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

  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .product-parameters-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .parameter-card-lamp {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .parameter-card-price,
  .parameter-card-package {
    grid-column: 1;
    grid-row: auto;
  }

  .parameter-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .product-search-bar {
    flex-direction: row;
    padding: 0.375rem 0.375rem 0.375rem 0.75rem;
  }

  .product-search-bar input {
    font-size: 0.9rem;
  }

  .product-search-bar .btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.85rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .products-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
}

/* ===== 首页紧凑排版 ===== */
.page-home .hero {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.page-home .section {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.page-home .section-title {
  margin-bottom: var(--space-md);
}

.page-home .cta-section {
  padding: var(--space-lg);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}
