/* 定义CSS变量 */
:root {
  --banner-height: 500px;
  --section-padding: 80px;
  --title-font-size: 28px;
  --product-name-size: 16px;
  --card-padding: 20px;
  --img-padding: 30px;
  --grid-gap: 30px;
}

/* 产品中心banner样式 */
.products-banner {
  position: relative;
  width: 100%;
  height: var(--banner-height);
  overflow: hidden;
}

.products-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.products-banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 2;
}

.products-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.products-banner-title {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.products-banner-subtitle {
  font-size: 20px;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 产品中心内容区域 */
.products-section {
  padding: var(--section-padding) 0;
  background-color: #fff;
}

.section-title {
  font-size: var(--title-font-size);
  color: #333;
  margin-bottom: 40px;
  font-weight: 500;
  position: relative;
  display: inline-block;
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: "";
  width: 40px;
  height: 3px;
  background: #ff8500;
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.products-content {
  margin-top: 30px;
}

/* 产品列表样式 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}

.product-item {
  transition: all 0.3s ease;
}

.product-card {
  padding: var(--card-padding);
  border-radius: 5px;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.product-card:hover .product-name{
  color: #ff8500;
}
.product-img-wrapper {
  background: #fff;
  padding: var(--img-padding);
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  aspect-ratio: 1 / 1;
}

.product-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  transition: transform 0.4s ease;
  object-fit: contain;
}

.product-card:hover .product-img {
  transform: scale(1.1);
}

.product-name {
  font-size: var(--product-name-size);
  color: #333;
  margin: 10px 0 0;
  font-weight: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 40px;
}

/* 响应式样式 - 大屏幕 */
@media screen and (min-width: 1400px) {
  :root {
    --banner-height: 600px;
    --section-padding: 100px;
    --title-font-size: 32px;
    --product-name-size: 18px;
    --card-padding: 25px;
    --img-padding: 35px;
    --grid-gap: 40px;
  }
  
  .products-banner-title {
    font-size: 56px;
  }
  
  .products-banner-subtitle {
    font-size: 24px;
  }
  
  .section-title::after {
    width: 50px;
    height: 4px;
  }
}

/* 响应式样式 - 中等屏幕 */
@media screen and (max-width: 1200px) {
  :root {
    --banner-height: 450px;
    --section-padding: 70px;
    --title-font-size: 26px;
    --product-name-size: 15px;
    --card-padding: 18px;
    --img-padding: 25px;
    --grid-gap: 25px;
  }
  
  .products-banner-title {
    font-size: 42px;
  }
  
  .products-banner-subtitle {
    font-size: 18px;
  }
}

/* 响应式样式 - 平板 */
@media screen and (max-width: 992px) {
  :root {
    --banner-height: 400px;
    --section-padding: 60px;
    --title-font-size: 24px;
    --product-name-size: 15px;
    --card-padding: 15px;
    --img-padding: 20px;
    --grid-gap: 20px;
  }
  
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .products-banner-title {
    font-size: 38px;
  }
  
  .products-banner-subtitle {
    font-size: 17px;
  }
  
  .section-title {
    margin-bottom: 35px;
  }
  
  .section-title::after {
    bottom: -12px;
  }
}

/* 响应式样式 - 小平板/大手机 */
@media screen and (max-width: 768px) {
  :root {
    --banner-height: 350px;
    --section-padding: 50px;
    --title-font-size: 22px;
    --product-name-size: 14px;
    --card-padding: 12px;
    --img-padding: 15px;
    --grid-gap: 15px;
  }

  .products-banner-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .products-banner-subtitle {
    font-size: 16px;
  }
  
  .products-section {
    padding: var(--section-padding) 20px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .section-title {
    margin-bottom: 30px;
  }
  
  .section-title::after {
    width: 35px;
    bottom: -10px;
  }
  
  .products-content {
    margin-top: 20px;
  }
}

/* 响应式样式 - 手机 */
@media screen and (max-width: 576px) {
  :root {
    --banner-height: 250px;
    --section-padding: 40px;
    --title-font-size: 20px;
    --product-name-size: 14px;
    --card-padding: 10px;
    --img-padding: 10px;
    --grid-gap: 12px;
  }

  .products-banner-title {
    font-size: 26px;
    margin-bottom: 10px;
  }

  .products-banner-subtitle {
    font-size: 14px;
    letter-spacing: 1px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .section-title {
    margin-bottom: 25px;
  }
  
  .section-title::after {
    width: 30px;
    height: 2px;
    bottom: -8px;
  }
  
  .product-name {
    min-height: 36px;
  }
}

/* 响应式样式 - 小手机 */
@media screen and (max-width: 375px) {
  :root {
    --banner-height: 200px;
    --section-padding: 30px;
    --title-font-size: 18px;
    --product-name-size: 13px;
    --card-padding: 8px;
    --img-padding: 8px;
    --grid-gap: 10px;
  }
  
  .products-banner-title {
    font-size: 22px;
  }
  
  .products-banner-subtitle {
    font-size: 12px;
  }
  
  .products-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .product-img-wrapper {
    margin-bottom: 10px;
  }
  
  .product-name {
    min-height: 32px;
  }
} 