/* 全局变量统一管理颜色，一处修改全站生效 */
:root {
  --factory-text-dark: #3b3535;
  --factory-border-dark: #222;
  --factory-nav-gray: #b5b5b5;
  --factory-dot-gray: #c1c1c1;
  --transition-normal: all 0.3s ease;
}

.rightint-factory {
  padding: 10px 0;
  overflow: hidden;
}

.rightint-factory h3 {
  font-size: 36px;
  line-height: 1.2; /* 修复超大标题行高挤压 */
  text-align: center;
  color: var(--factory-text-dark);
  font-weight: 600;
  margin: 0;
}

/* 下划线预留CSS变量开关，后台可快速启用 */
.rightint-factory h3::after {
  content: "";
  width: 40px;
  height: 4px;
  background: var(--factory-border-dark);
  display: none;
  margin: 20px auto 0;
}
.rightint-factory.show-line h3::after {
  display: block;
}

.rightint-factory .list {
  margin-top: 20px;
  text-align: center;
  position: relative;
  padding: 0 60px; /* 预留左右导航按钮空间，不超出容器 */
}

.rightint-factory .swiper-slide a {
  display: block;
  position: relative;
  text-decoration: none;
  outline: none;
}
.rightint-factory .swiper-slide a:active {
  outline: none;
}

.rightint-factory .swiper-slide img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  /* 禁止图片拖拽 */
  user-select: none;
  pointer-events: none;
}

/* 移除webkit前缀，现代浏览器完全兼容flex */
.rightint-factory .swiper-slide p {
  position: absolute;
  z-index: 20;
  inset: auto 0 0 0; /* 简写 left/right/bottom */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px 15px;
  margin: 0;
  color: #fff;
  font-size: 20px;
  background: linear-gradient(rgba(255, 255, 255, 0), color-mix(in srgb, var(--color-primary) 85%, transparent));
  transition: var(--transition-normal);
}

/* Swiper 导航按钮精简 */
.rightint-factory .swiper-button-prev,
.rightint-factory .swiper-button-next {
  width: 50px;
  height: 50px;
  border-radius: 0;
  background: transparent;
  color: var(--factory-nav-gray);
  top: 50%;
  margin-top: -25px;
  transition: var(--transition-normal);
}
/* 清除默认箭头 */
.rightint-factory .swiper-button-next::after,
.rightint-factory .swiper-button-prev::after {
  display: none;
}

.rightint-factory .swiper-button-prev i,
.rightint-factory .swiper-button-next i {
  font-size: 40px;
  line-height: 50px;
  display: inline-block;
}

.rightint-factory .swiper-button-prev {
  left: 0;
}
.rightint-factory .swiper-button-next {
  right: 0;
}

/* hover变色 */
.rightint-factory .swiper-button-prev:hover,
.rightint-factory .swiper-button-next:hover {
  color: var(--color-primary);
}

/* 分页器 */
.rightint-factory .swiper-pagination-bullets {
  margin-top: 20px;
  position: static;
  display: none;
}
.rightint-factory .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  margin: 0 3px;
  background: var(--factory-dot-gray);
  border-radius: 50%;
  opacity: 1;
  box-sizing: border-box;
}
.rightint-factory .swiper-pagination-bullet-active {
  background: var(--color-primary);
}

/* ========== 移动端 修复类名BUG ========== */
@media screen and (max-width: 768px) {
  .rightint-factory {
    padding: 30px 0;
  }
  /* 导航按钮嵌入容器内，不贴屏幕边缘 */
  .rightint-factory .list {
    padding: 0 10px;
  }
  .rightint-factory .swiper-button-prev {
    left: 10px;
  }
  .rightint-factory .swiper-button-next {
    right: 10px;
  }
}