/* ===== equipment-detail.css - 设备详情页专属样式 ===== */
/* 版本: 1.1.0 */
/* 最后更新: 2026-03-13 */

/* 产品详情头部布局 */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: start;
}

.product-gallery .main-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #f5f5f5;
}

.product-gallery .main-image img {
  width: 100%;
  height: auto;
  display: block;
}

.product-summary {
  padding: var(--spacing-lg) 0;
}

.product-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

.product-model {
  font-size: var(--text-lg);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.product-description {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
  border-left: 4px solid var(--primary);
  padding-left: var(--spacing-md);
  background: var(--background);
  padding: var(--spacing-md);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.product-key-features {
  list-style: none;
  padding: 0;
  margin-bottom: var(--spacing-xl);
}

.product-key-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

.product-key-features i {
  color: var(--primary);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.product-actions {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

/* 参数表格样式 */
.parameter-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.parameter-table th,
.parameter-table td {
  padding: var(--spacing-md) var(--spacing-lg);
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.parameter-table th {
  background: var(--background);
  font-weight: 600;
  color: var(--text-dark);
  width: 200px;
}

.parameter-table td {
  color: var(--text-secondary);
}

.parameter-table tr:hover {
  background: var(--background);
}

/* 产品说明/特点文本样式 */
.product-description-text {
  background: var(--background);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
}

.product-description-text p {
  margin-bottom: var(--spacing-md);
}

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

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--background);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
}

.feature-list i {
  color: var(--primary);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

/* ===== 新增图文交替块样式 ===== */
.detail-block {
  display: flex;
  align-items: center;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
}

.detail-block:nth-child(even) {
  flex-direction: row-reverse;
}

.detail-image {
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.detail-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s;
}

.detail-image:hover img {
  transform: scale(1.02);
}

.detail-text {
  flex: 1;
}

.detail-text h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
}

.detail-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: var(--text-base);
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .detail-block {
    flex-direction: column !important;
    gap: var(--spacing-lg);
    padding: var(--spacing-md);
  }

  .detail-image,
  .detail-text {
    width: 100%;
  }
}

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

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

/* 响应式调整（全局） */
@media (max-width: 992px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .product-gallery {
    max-width: 600px;
    margin: 0 auto;
  }

  .parameter-table th {
    width: 140px;
  }
}

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

  .product-actions .btn {
    width: 100%;
    text-align: center;
  }

  .parameter-table th,
  .parameter-table td {
    padding: var(--spacing-sm);
    font-size: var(--text-sm);
  }

  .product-description-text {
    padding: var(--spacing-md);
  }
}
/* ===== 保修与交易条款卡片样式 ===== */
.warranty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.warranty-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-xl);
  border: 1px solid var(--border);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

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

.warranty-card h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  width: 100%;
}

.warranty-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: var(--text-base);
  margin-bottom: 0;
  flex: 1;
}

.warranty-card .table-responsive {
  margin: 0 -15px; /* 抵消卡片内边距使表格可以滚动 */
  padding: 0 15px;
  overflow-x: auto;
}

.warranty-card .parameter-table {
  margin: 0;
  min-width: 100%;
}

.warranty-card .parameter-table th {
  background: var(--background);
  width: 40%;
}

.warranty-card .parameter-table th,
.warranty-card .parameter-table td {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--text-sm);
}

/* 响应式调整 */
@media (max-width: 992px) {
  .warranty-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .warranty-grid {
    grid-template-columns: 1fr;
  }
}
/* 单卡片居中优化 */
.product-grid:only-child {
  display: flex;
  justify-content: center;
}
.product-grid:only-child .product-card {
  width: 100%;
  max-width: 450px;
}
@media (min-width: 768px) {
  .product-grid:only-child .product-card {
    max-width: 500px;
  }
}
/* 单卡片居中处理 */
.product-grid:only-child {
  display: flex !important;
  justify-content: center;
  grid-template-columns: none !important; /* 覆盖原有的网格布局 */
}

.product-grid:only-child .product-card {
  max-width: 500px;
  width: 100%;
}
