/* 产品展示页面样式 */

/* 全局变量 */
:root {
  --product-card-radius: 8px;
  --product-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  --product-hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
}



/* 产品分类展示 */
.section-desc {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  color: #666;
  line-height: 1.6;
}

.category-cards {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 2rem;
}

.category-card {
  background: #fff;
  border-radius: var(--product-card-radius);
  overflow: hidden;
  box-shadow: var(--product-shadow);
  transition: all var(--transition-speed);
}

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

.category-image {
  position: relative;
  overflow: hidden;
  height: 350px;
}

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

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

.category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.category-image:hover .category-overlay {
  opacity: 1;
}

.category-btn {
  background: var(--primary-color);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-weight: 500;
  transition: all var(--transition-speed);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.category-btn:hover {
  background: #fff;
  color: var(--primary-color);
  transform: translateY(-3px);
}

.category-content {
  padding: 2rem;
}

.category-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  position: relative;
}

.category-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
}

.category-description {
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.category-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.product-preview {
  border: 1px solid #eee;
  border-radius: var(--product-card-radius);
  overflow: hidden;
  transition: all var(--transition-speed);
}

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

.product-preview-image {
  height: 150px;
  overflow: hidden;
}

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

.product-preview:hover .product-preview-image img {
  transform: scale(1.1);
}

.product-preview-content {
  padding: 1rem;
  text-align: center;
}

.product-preview-content h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-preview-price {
  color: var(--primary-color);
  font-weight: bold;
  margin-bottom: 0.8rem;
}

.preview-btn {
  display: inline-block;
  background: #f5f5f5;
  color: #333;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  transition: all var(--transition-speed);
}

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

.category-footer {
  text-align: right;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.view-more-btn {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  font-weight: 500;
  gap: 0.5rem;
  transition: all var(--transition-speed);
}

.view-more-btn i {
  transition: transform var(--transition-speed);
}

.view-more-btn:hover {
  color: var(--dark-color);
}

.view-more-btn:hover i {
  transform: translateX(5px);
}

/* 产品优势 */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.advantage-item {
  background: #fff;
  border-radius: var(--product-card-radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--product-shadow);
  transition: all var(--transition-speed);
}

.advantage-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--product-hover-shadow);
}

.advantage-icon {
  width: 70px;
  height: 70px;
  background: rgba(0, 116, 217, 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  transition: all var(--transition-speed);
}

.advantage-item:hover .advantage-icon {
  background: var(--primary-color);
  color: #fff;
  transform: rotateY(180deg);
}

.advantage-item h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.advantage-item p {
  color: #666;
  line-height: 1.5;
}

/* 定制服务 */
.custom-solution-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: #fff;
  border-radius: var(--product-card-radius);
  overflow: hidden;
  box-shadow: var(--product-shadow);
}

.custom-solution-content {
  padding: 3rem;
}

.custom-solution-content h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}

.custom-solution-content p {
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.custom-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.custom-feature {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #f9f9f9;
  padding: 0.7rem 1.2rem;
  border-radius: 30px;
  font-size: 0.9rem;
  color: #555;
}

.custom-feature i {
  color: var(--primary-color);
}

.custom-solution-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 产品列表页 */
.product-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9f9f9;
  padding: 1rem 1.5rem;
  border-radius: var(--product-card-radius);
  margin-bottom: 2rem;
}

.filter-items {
  display: flex;
  gap: 1.5rem;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.filter-label {
  font-size: 0.9rem;
  color: #555;
}

.filter-select {
  border: 1px solid #ddd;
  padding: 0.5rem;
  border-radius: 5px;
  font-size: 0.9rem;
  color: #333;
  background: #fff;
}

.view-switch {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  color: #888;
  cursor: pointer;
  transition: all var(--transition-speed);
}

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

/* 产品列表 */
.product-list-container {
  margin-bottom: 3rem;
}

.product-list-container.grid-view {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.product-list-container.list-view {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.product-item {
  background: #fff;
  border-radius: var(--product-card-radius);
  overflow: hidden;
  box-shadow: var(--product-shadow);
  transition: all var(--transition-speed);
  position: relative;
}

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

.grid-view .product-item {
  display: flex;
  flex-direction: column;
}

.list-view .product-item {
  display: grid;
  grid-template-columns: 300px 1fr;
}

.product-image {
  position: relative;
  overflow: hidden;
}

.grid-view .product-image {
  height: 250px;
}

.list-view .product-image {
  height: 250px;
}

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

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

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  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;
}

.product-actions {
  position: absolute;
  top: 10px;
  right: -40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: right var(--transition-speed);
}

.product-item:hover .product-actions {
  right: 10px;
}

.action-btn {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: none;
  border-radius: 50%;
  color: #555;
  cursor: pointer;
  transition: all var(--transition-speed);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
  font-weight: 500;
  color: var(--dark-color);
}

.grid-view .product-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.product-rating {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 20px;
}

.stars {
  color: #ffc107;
}

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

.product-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin: 0 0 1rem 0;
}

.product-price > div {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

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

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

.price-pre-tax {
  font-size: 0.8rem;
  color: #999;
}

.grid-view .product-description {
  display: none;
}

.list-view .product-description {
  margin-bottom: 1.5rem;
  color: #666;
  line-height: 1.5;
  flex-grow: 1;
}

.product-buttons {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
}

.grid-view .product-buttons {
  flex-direction: column;
}

.product-buttons form,
.product-actions form {
  display: contents;
}

.list-view .product-buttons {
  flex-direction: row;
}

.btn-details, .btn-add-cart {
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition-speed);
  border: none;
}

.btn-details {
  background: #f5f5f5;
  color: #333;
  flex-grow: 1;
}

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

.btn-add-cart {
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-grow: 2;
  cursor: pointer;
}

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



/* 相关推荐 */
.related-products-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.related-product {
  background: #fff;
  border-radius: var(--product-card-radius);
  overflow: hidden;
  box-shadow: var(--product-shadow);
  transition: all var(--transition-speed);
}

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

.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.5rem;
}

.related-product-title {
  font-size: 1rem;
  margin-bottom: 0.7rem;
  font-weight: 500;
  color: var(--dark-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-product-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.related-product-price > div {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.related-product-actions {
  display: flex;
  gap: 0.5rem;
}

.related-product-actions .btn-details {
  flex-grow: 3;
}

.related-product-actions .btn-add-cart {
  width: 40px;
  padding: 0;
  flex-grow: 0;
}

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

  .product-list-container.grid-view {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 992px) {
  .custom-solution-container {
    grid-template-columns: 1fr;
  }

  .custom-solution-image {
    height: 300px;
  }

  .list-view .product-item {
    grid-template-columns: 200px 1fr;
  }
}

@media (max-width: 768px) {
  .full-width-banner {
    height: 25vh;
  }

  .full-width-banner h1 {
    font-size: 2rem;
  }

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

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

  .product-filter {
    flex-direction: column;
    gap: 1rem;
  }

  .filter-items {
    width: 100%;
    justify-content: space-between;
  }

  .filter-right {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .product-list-container.grid-view {
    grid-template-columns: 1fr;
  }

  .list-view .product-item {
    grid-template-columns: 1fr;
  }

  .list-view .product-image {
    height: 200px;
  }

  .list-view .product-buttons {
    flex-direction: column;
  }

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

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

  .filter-items {
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-item {
    width: 100%;
  }

  .page-numbers a,
  .page-nav {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
}

.product-card-bottom {
  margin-top: auto;
  padding-top: 1rem;
}

.list-view .product-description {
  display: block;
  margin-bottom: 1rem;
}
.price-old{
	text-decoration: line-through;
	color: #999;
}
