
.halo-swiper-container { 
  margin: 25px 0; 
  width: 100%; 
  overflow: hidden; 
}

.swiper-slide { 
  position: relative; 
  user-select: none; 
}

.swiper-slide img {
  width: 100% !important;
  aspect-ratio: 4 / 3;
  height: auto !important;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  -webkit-user-drag: none;
  background: #f0f0f0;
}

/* 盾牌层：拦截点击并触发放大 */
.image-shield {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(0,0,0,0);
  cursor: zoom-in;
}

/* Swiper 分页器适配 */
.swiper-pagination-bullet-active { 
  background: #333 !important; 
}

/* Modal 出现动画 */
#imageModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  overflow: auto;
  padding: 10vh 5vw;
  box-sizing: border-box;
  animation: fadeIn 0.3s ease;
  
  /* 确保内部元素居中 */
  display: flex; 
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 
 * 图片包裹层
 * 作用：紧密包裹图片，承载水印
 * CRITICAL: 使用 inline-flex 确保 wrapper 缩小到图片实际大小
 */
.modal-img-wrapper {
  position: relative;
  display: inline-flex !important; /* 使用 inline-flex 确保紧密包裹，!important 覆盖任何其他样式 */
  transition: transform 0.3s ease;
  z-index: 1;
  overflow: hidden !important; /* 关键：裁剪任何超出的水印内容 */
}

/* 放大状态应用在 wrapper 上，这样水印会跟着一起放大 */
.modal-img-wrapper.zoomed {
  transform: scale(1.5);
  cursor: zoom-out;
  z-index: 10000; /* 放大时层级提高 */
}

/* Modal 图片样式调整 
 * CRITICAL: 约束到 50vh，移除 90% 的限制
 */
#modalImg {
  display: block;
  width: auto;
  height: auto;
  
  /* 默认 (桌面/大屏): 50vh，确保不会太大 */
  max-width: 90vw; 
  max-height: 70vh !important; /* 强制 70vh 限制，覆盖任何内联样式 */
  
  margin: 0 !important; /* 移除任何边距，确保包裹层高度与图片严格一致 */
  
  /* 移除 object-fit: contain，确保元素盒子严格等于渲染内容大小 */
}

/* 响应式调整 */

/* 平板/手机 (屏幕宽度小于 768px) */
@media (max-width: 768px) {
  /* 调整 padding 以给图片更多空间 */
  #imageModal {
    padding: 5vh 3vw;
  }
  
  /* 移动端适当增加一点高度空间 */
  #modalImg {
    max-height: 60vh !important;
  }
}

/* 旧的 zoomed 样式，为了兼容性保留或移除均可，这里重置它 */
#modalImg.zoomed {
  transform: none;
}

/* 水印层：现在相对于 wrapper 定位 
 * CRITICAL: 绝对定位 inset: 0 确保完全覆盖 wrapper (也就是图片) 的区域
 */
.watermark-overlay {
  position: absolute;
  inset: 0;
  z-index: 2; /* 在图片之上 */
  pointer-events: none; /* 穿透点击 */
  
  /* 背景图设置 */
  background-repeat: repeat;
  background-position: center;
}
