.product-hero {
  background: url('../img/product1.png') center/cover no-repeat;
  height: 65vh;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-content h1 {
  font-size: 4em;
  font-weight: 900;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.4em;
  max-width: 700px;
  margin: 0 auto;
  font-weight: 500;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

.product-categories {
  padding: 80px 20px;
  background: #d9f0fc;
  text-align: center;
}

.product-categories h2 {
  color: #004a99;
  font-size: 2em;
  margin: 50px 0 20px;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.product-grid {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 10px 0;
  scroll-snap-type: x mandatory;
}

.product-card {
  flex: 0 0 auto;
  width: calc(100% / 2.2); /* 默认 2 个 */
  scroll-snap-align: start;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
  transition: transform 0.3s ease;
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.product-card h4 {
  font-size: 1em;
  color: #004a99;
}

.product-card:hover {
  transform: translateY(-5px);
}

@media (min-width: 768px) {
  .product-card {
    width: calc(100% / 3.2); 
  }
}

@media (min-width: 1024px) {
  .product-card {
    width: calc(100% / 5.2); 
  }
}

/* 箭头按钮 */
.carousel-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}
