/* home.css - 优化后的响应式样式 */

/* 基础样式 */
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* 防止横向滚动 */
}

/* 轮播图区域 */
.banner {
  width: 100%;
  /* height: 890px; */
  position: relative;
  overflow: hidden;
  transition: height 0.3s ease; /* 平滑调整高度 */
}

.banner > img {
  width: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  object-fit: cover;
}

.banner > img.active {
  opacity: 1;
}

/* 轮播指示器 */
.div_2_321424 {
  display: flex;
  position: absolute;
  right: clamp(20px, 5vw, 130px); /* 响应式定位 */
  bottom: clamp(15px, 3vw, 30px); /* 响应式定位 */
  z-index: 50;
}

.dot {
  height: clamp(12px, 2vw, 12px); /* 响应式大小 */
  width: clamp(12px, 2vw, 12px); /* 响应式大小 */
  border: 1px solid rgb(145, 145, 145);
  border-radius: 50%;
  margin-left: clamp(15px, 3vw, 35px); /* 响应式间距 */
  cursor: pointer;
  transition: all 0.3s ease;
}

/* 选中状态样式 */
.dot.active {
  background-color: rgb(145, 145, 145);
}

/* 轮播控制按钮 */
.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.carousel-control {
  background: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: none; /* 默认隐藏，在移动设备显示 */
  transition: background 0.3s ease;
}

.carousel-control:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* 产品展示区域 */
.images-center {
  width: 100%;
  display: flex;
  flex-direction: column; /* 在移动设备上垂直排列 */
}

.images-center-right {
  display: flex;
  flex-direction: column;
}

.images-center-right > div {
  display: flex;
}

.products {
  box-sizing: border-box;
  cursor: pointer;
  overflow: hidden; /* 防止图片溢出 */
}

.products img {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease; /* 添加图片缩放过渡 */
}

.products:hover img {
  transform: scale(1.02); /* 悬停时图片放大 */
}

.products:hover {
  border-bottom: 3px solid #5cc9ca; /* 悬停效果 */
}

/* 底部区域 */
.bottom {
  margin-top: 30px;
  padding-bottom: clamp(30px, 5vw, 80px); /* 响应式内边距 */
  text-align: center;
}

.bottom img {
  width: 70%;
}

.bottom a {
  width: clamp(180px, 30vw, 240px); /* 响应式宽度 */
  height: clamp(36px, 5vw, 40px); /* 响应式高度 */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #919191;
  color: #919191;
  margin: clamp(15px, 3vw, 20px) auto 0 auto; /* 响应式外边距 */
  cursor: pointer;
  text-decoration: none;
  font-size: clamp(16px, 3vw, 22px); /* 响应式字体 */
  transition: all 0.3s ease;
}

.bottom a:hover {
  background-color: #919191;
  color: white;
}

/* 响应式断点 */
@media (min-width: 768px) {
  /* 平板及以上设备 */
  .images-center {
    flex-direction: row;
    /* height: 890px; */
  }
  
  .main-product {
    width: 50%;
  }
  
  .images-center-right {
    width: 50%;
  }
  
  .top-products, .bottom-products {
    height: 50%;
  }
  
  .carousel-control {
    display: block;
  }
}

@media (max-width: 767px) {
 .div_2_321424 {
    right: 50%; /* 恢复居中定位 */
    transform: translateX(50%); /* 恢复居中变换 */
    bottom: 15px;
  }
  
  .dot {
    margin-left: 15px; /* 恢复原来的左边距 */
    height: 5px; /* 移动端缩小圆点 */
    width: 5px; /* 移动端缩小圆点 */
  }
  
  .products {
    height: auto !important;
  }
  
  .products:hover {
    border-bottom: 2px solid #5cc9ca;
  }

  .bottom img {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .bottom img {
    width: 100%;
  }
}