* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* font-family: Arial, sans-serif;
  padding: 20px; */
  background: #f5f5f5;
}

.carousel-title {
  margin-bottom: 15px;
  color: #333;
  font-size: 24px;
}

.carousel {
  width: 100%;
  height: 400px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch; /* Safari必备 */
  scroll-snap-type: x mandatory;
}

.slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 48px;
  color: white;
  font-weight: bold;
  flex: 0 0 100%;
  transform: translateZ(0); /* 触发硬件加速 */
  -webkit-transform: translateZ(0);
}

.slide:hover {
  animation-play-state: paused;
}

/* 不同轮播图的不同颜色 */
/* .carousel-1 .slide:nth-child(1) {
  background-image: url("./../images/mopan1.png");
  background-size: 100% auto;
}
.carousel-1 .slide:nth-child(2) {
  background-image: url("./../images/mopan2.png");
  background-size: 100% auto;
}
.carousel-1 .slide:nth-child(3) {
  background-image: url("./../images/mopan3.png");
  background-size: 100% auto;
}
.carousel-1 .slide:nth-child(4) {
  background-image: url("./../images/mopan4.png");
  background-size: 100% auto;
}
.carousel-1 .slide:nth-child(5) {
  background-image: url("./../images/mopan5.png");
  background-size: 100% auto;
}
.carousel-1 .slide:nth-child(6) {
  background-image: url("./../images/mopan6.png");
  background-size: 100% auto;
}
.carousel-1 .slide:nth-child(7) {
  background-image: url("./../images/mopan7.png");
  background-size: 100% auto;
}
.carousel-1 .slide:nth-child(8) {
  background-image: url("./../images/mopan8.png");
  background-size: 100% auto;
} */

/* .carousel-2 .slide:nth-child(1) {
  background-image: url("./../images/zbmWheel1.png");
  background-size: 100% auto;
}
.carousel-2 .slide:nth-child(2) {
  background-image: url("./../images/zbmWheel2.png");
  background-size: 100% auto;
}
.carousel-2 .slide:nth-child(3) {
  background-image: url("./../images/zbmWheel3.png");
  background-size: 100% auto;
}
.carousel-2 .slide:nth-child(4) {
  background-image: url("./../images/zbmWheel4.png");
  background-size: 100% auto;
}

.carousel-3 .slide:nth-child(1) {
  background-image: url("./../images/gjm1.png");
  background-size: 100% auto;
}
.carousel-3 .slide:nth-child(2) {
  background-image: url("./../images/gjm2.png");
  background-size: 100% auto;
}

.carousel-4 .slide:nth-child(1) {
  background-image: url("./../images/jbWheel1.jpg");
  background-size: 100% auto;
}

.carousel-5 .slide:nth-child(1) {
  background-image: url("./../images/suction1.jpg");
  background-size: 100% auto;
}
.carousel-5 .slide:nth-child(2) {
  background-image: url("./../images/suction2.jpg");
  background-size: 100% auto;
}

.carousel-6 .slide:nth-child(1) {
  background-image: url("./../images/trimmingTools1.png");
  background-size: 100% auto;
}
.carousel-6 .slide:nth-child(2) {
  background-image: url("./../images/trimmingTools2.png");
  background-size: 100% auto;
}
.carousel-6 .slide:nth-child(2) {
  background-image: url("./../images/trimmingTools3.png");
  background-size: 100% auto;
} */

.controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.control.active {
  background: white;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
}

.nav-btn {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  background: rgba(0, 0, 0, 0.5);
}
