/* 产品详情页样式 */

/* 产品详情容器 */
.product-detail-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
  width: 100%;
  overflow: hidden;
}

/* 产品图片区域 */
.product-gallery {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-badge {
  padding: 0.4rem 0.8rem;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 3px;
  color: #fff;
}

.product-badge.new {
  background: #2ecc71;
}

.product-badge.hot {
  background: #e74c3c;
}

.product-badge.discount {
  background: #f39c12;
}

.main-image-container {
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
  width: 100%;
  border: 1px solid #ddd;
  padding: 0.25rem;
}

.main-image-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s;
  max-width: 100%;
}

.main-image-container:hover img {
  transform: scale(1.05);
}

.thumbnail-container {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  max-width: 100%;
}

.thumbnail {
  width: 70px;
  height: 50px;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #ddd;
  padding: 0.25rem;
  transition: all 0.3s;
  margin-bottom: 0.5rem;
}

.thumbnail.active {
  border-color: var(--primary-color);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 产品信息区域 */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-right: 1rem;
}

.product-name {
  font-size: 1.8rem;
  color: var(--dark-color);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.stars {
  display: flex;
  color: #f39c12;
}

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

.product-brief {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
}

.product-price-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 8px;
}

.price {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.current-price {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
}

.original-price {
  font-size: 1.1rem;
  text-decoration: line-through;
  color: #999;
}

.discount-label {
  padding: 0.3rem 0.6rem;
  background: #e74c3c;
  color: #fff;
  font-size: 0.8rem;
  font-weight: bold;
  border-radius: 3px;
}

.stock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #777;
  font-weight: 500;
}

.stock-status, .stock-status-delay {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.stock.in-stock {
    color: #2ecc71;
}

.stock-status.out-of-stock {
    color: #e74c3c;
}

.stock-status.pre-order {
    color: #3498db;
}

.stock-status-delay {
    color: #f39c12;
}

.product-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
}

.meta-label {
  font-weight: 500;
  color: #555;
  min-width: 70px;
}

.meta-value {
  color: #777;
  margin-left: 0.5rem;
}

.product-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.option-title {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  color: var(--dark-color);
}

.option-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.option-item {
  padding: 0.6rem 1.2rem;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.option-item:hover {
  border-color: var(--primary-color);
}

.option-item.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.quantity-label {
  font-weight: 500;
  color: #555;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.quantity-btn:hover {
  background: #e0e0e0;
}

.quantity-input {
  width: 60px;
  height: 40px;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  text-align: center;
  font-size: 1rem;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-actions {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.cart-buttons {
  display: flex;
  align-items: center;
  width: 100%;
}

.btn-add-cart, .btn-buy-now {
  width: 100%;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-add-cart {
  background: var(--primary-color);
  color: #fff;
}

.btn-add-cart:hover {
  background: #005bb5;
}

.btn-buy-now {
  background: var(--secondary-color);
  color: #fff;
}

.btn-buy-now:hover {
  background: #25a233;
}

.btn-wishlist, .btn-compare {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #777;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.1rem;
}

.btn-wishlist:hover, .btn-compare:hover {
  background: #e0e0e0;
  color: var(--primary-color);
}

.product-guarantee {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
}

.guarantee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f9f9f9;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #555;
}

.guarantee-item i {
  color: var(--secondary-color);
}

/* 产品标签页 */
.product-tabs {
  margin-top: 3rem;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 1rem 2rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

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

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

.tab-content {
  min-height: 400px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* 商品详情样式 */
.description-content {
  color: #555;
  line-height: 1.7;
}

.description-content h2 {
  font-size: 1.8rem;
  color: var(--dark-color);
  margin-bottom: 2rem;
}

.description-section {
  margin-bottom: 3rem;
}

.description-section h3 {
  font-size: 1.3rem;
  color: var(--dark-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #eee;
}

.feature-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.feature {
  display: flex;
  gap: 1.5rem;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: rgba(0, 116, 217, 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-text h4 {
  font-size: 1.1rem;
  color: var(--dark-color);
  margin: 0 0 0.7rem 0;
}

.feature-text p {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
}

.product-gallery-large {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.product-gallery-large img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.compatibility-list {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1.5rem;
}

.compatibility-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.compatibility-column li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed #eee;
  color: #555;
}

.usage-instructions {
  margin-top: 1.5rem;
}

.instruction-step {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: bold;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1.1rem;
  color: var(--dark-color);
  margin: 0 0 0.7rem 0;
}

.step-content p {
  margin: 0;
  color: #666;
  line-height: 1.6;
}

/* 规格参数样式 */
.specification-content h2 {
  font-size: 1.8rem;
  color: var(--dark-color);
  margin-bottom: 2rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.spec-table th {
  width: 200px;
  color: #555;
  font-weight: 500;
  background: #f9f9f9;
}

.spec-table td {
  color: #666;
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: none;
}

/* 评价样式 */
.reviews-content h2 {
  font-size: 1.8rem;
  color: var(--dark-color);
  margin-bottom: 2rem;
}

.reviews-summary {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.rating-summary {
  display: flex;
  gap: 3rem;
}

.average-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-right: 3rem;
  border-right: 1px solid #eee;
}

.rating-number {
  font-size: 3.5rem;
  font-weight: bold;
  color: var(--dark-color);
  line-height: 1;
}

.rating-stars {
  color: #f39c12;
  font-size: 1.3rem;
  margin: 0.5rem 0;
}

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

.rating-breakdown {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.rating-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rating-label {
  min-width: 40px;
  font-size: 0.9rem;
  color: #666;
}

.progress-bar {
  flex-grow: 1;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: var(--primary-color);
  border-radius: 4px;
}

.rating-percent {
  min-width: 40px;
  font-size: 0.9rem;
  color: #666;
  text-align: right;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.review-item {
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.review-item:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.reviewer-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.reviewer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reviewer-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--dark-color);
}

.review-date {
  font-size: 0.9rem;
  color: #888;
}

.review-rating {
  color: #f39c12;
}

.review-content {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #555;
}

.review-images {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.review-image {
  width: 150px;
  height: 150px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

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

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

.review-form-container {
  margin-top: 3rem;
  padding: 2rem;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.review-form-container .form-title {
  font-size: 1.5rem;
  color: var(--dark-color);
  margin-bottom: 1.5rem;
}

.rate-stars {
  display: inline-block;
  font-size: 1.5rem;
  color: #f39c12;
  cursor: pointer;
}
.rate-stars .fa-star {
    margin-right: 5px;
    transition: color 0.2s;
}

.rate-stars .fa-star.hover,
.rate-stars .fa-star:hover {
  color: #f39c12;
}
.rate-stars .fa-star.fas {
    color: #f39c12;
}
.rate-stars .fa-star.far {
    color: #ccc;
}
.form-text {
  font-size: 0.875em;
  color: #6c757d;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .feature-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .product-detail-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }

  .rating-summary {
    flex-direction: column;
    gap: 1.5rem;
  }

  .average-rating {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
  }

  .product-info {
    padding-right: 0;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .main-image-container {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .tabs-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tab-btn {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }

  .quantity-selector,
  .detail-actions {
    flex-wrap: wrap;
  }

  .action-buttons {
    justify-content: flex-start;
  }

  .cart-buttons {
    width: 100%;
  }

  .compatibility-list {
    flex-direction: column;
    gap: 1rem;
  }

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

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
    overflow: hidden;
  }

  .product-detail-section {
    overflow: hidden;
    width: 100%;
  }

  .product-price-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .detail-actions {
    margin-bottom: 1rem;
  }

  .action-buttons {
    gap: 0.8rem;
  }

  .cart-buttons {
    width: 100%;
  }

  .feature {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .feature-icon {
    margin: 0 auto;
  }

  .review-header {
    flex-direction: column;
    gap: 1rem;
  }

  .review-images {
    flex-wrap: wrap;
  }

  .instruction-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .product-info {
    padding-left: 0;
    padding-right: 0;
  }

  .main-image-container {
    width: 100%;
  }

  .related-product-actions .btn-add-cart {
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .thumbnail {
    width: 60px;
    height: 45px;
  }

  .thumbnail-container {
    gap: 0.5rem;
    justify-content: flex-start;
  }
}

/* 相关推荐产品 */
.related-products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.related-product {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.related-product:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related-product-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

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

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

.related-product-info {
  padding: 1.2rem;
}

.related-product-title {
  font-size: 1.1rem;
  color: var(--dark-color);
  font-weight: 500;
  margin: 0 0 0.8rem 0;
  line-height: 1.4;
  height: 3em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-product-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.related-product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.btn-details {
  flex: 1;
  padding: 0.6rem 1rem;
  background: var(--light-color);
  color: var(--dark-color);
  font-size: 0.9rem;
  text-align: center;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-details:hover {
  background: #e0e0e0;
  color: var(--primary-color);
}

.related-product-actions .btn-add-cart {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s;
  padding: 0 15px;
}

.related-product-actions .btn-add-cart:hover {
  background: #005bb5;
}
.product-quantity-discounts {
color: #555;

}
.product-quantity-discounts ul li{
  font-size: 0.9rem;
}
#description img{
	display: block;
	margin:0 auto;
	padding: 0;
	/*max-width: 100%;  !*图片最大宽度为实际宽度 *!*/
	/*width: auto;*/
}
