/* 产品详情页样式 */

.detail-banner {
  height: 300px;
  background: linear-gradient(135deg,#37bbed 0%, #43af51 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding-top: 130px;
}

.detail-banner h3 {
  font-size: 36px;
  font-weight: 500;
}

.product-detail {
  padding: 60px 0;
  min-height: 500px;
}

.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.detail-main {
  display: flex;
  gap: 50px;
  margin-bottom: 50px;
}

.detail-image {
  flex: 0 0 400px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.image-carousel {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: zoom-in;
}

.zoom-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track:hover .zoom-hint {
  opacity: 1;
}

.carousel-track:hover img {
  filter: brightness(0.7);
}

.detail-image img {
  max-width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

.detail-image img.fade {
  opacity: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot.active {
  background: #37bbed;
  transform: scale(1.2);
}

.carousel-dots .dot:hover {
  background: #37bbed;
}

.detail-info {
  flex: 1;
}

.detail-info h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 20px;
}

.detail-desc {
  font-size: 18px;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.6;
}

.detail-specs {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.detail-specs h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #43af51;
}

.detail-specs table {
  width: 100%;
}

.detail-specs td {
  padding: 10px 0;
  font-size: 15px;
}

.detail-specs td:first-child {
  color: #888;
  width: 100px;
}

.detail-specs td:last-child {
  color: #333;
}

.detail-actions {
  display: flex;
  gap: 15px;
}

.btn-back,
.btn-contact {
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-back {
  background: #f0f0f0;
  color: #333;
}

.btn-back:hover {
  background: #e0e0e0;
}

.btn-contact {
  background: linear-gradient(135deg, #37bbed 0%, #43af51 100%);
  color: #fff;
}

.btn-contact:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.detail-description {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.detail-description h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #43af51;
}

.detail-description p {
  font-size: 15px;
  color: #666;
  line-height: 1.8;
}

.product-not-found {
  text-align: center;
  padding: 100px 20px;
}

.product-not-found h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 15px;
}

.product-not-found p {
  color: #666;
  margin-bottom: 30px;
}

/* 图片放大查看（Lightbox）样式 */
.image-lightbox {
  display: none; /* 默认隐藏 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.image-lightbox.active {
  display: flex; /* 显示 */
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .detail-banner {
    height: 200px;
  }

  .detail-banner h3 {
    font-size: 24px;
  }

  .product-detail {
    padding: 30px 0;
  }

  .detail-main {
    flex-direction: column;
    gap: 30px;
  }

  .detail-image {
    flex: none;
    width: 100%;
  }

  .detail-info h2 {
    font-size: 22px;
  }

  .detail-desc {
    font-size: 16px;
  }

  .detail-actions {
    flex-direction: column;
  }

  .btn-back,
  .btn-contact {
    text-align: center;
  }

  /* 移动端 Lightbox 样式调整 */
  .lightbox-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}
