/* slideshow.css – fallback layout bảo đảm ảnh hiện */
.lazy-slideshow {
  position: relative;
  width: 100%;
  padding-top: 100%; /* tỷ lệ 1:1 đảm bảo chiều cao */
  overflow: hidden;
  border-radius: 0px;
  touch-action: pan-y;
}

.lazy-slideshow .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
  z-index: 1;
}

.lazy-slideshow .slide.show {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.slide-counter {
  position: absolute;
  bottom: 10px;
  right: 14px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 20px;
  font-weight: bold;
  z-index: 3;
  font-family: Arial, sans-serif;
}
.lazy-slideshow .slide {
  transition: opacity 1s ease, transform 0.3s ease;
}

/* Zoom overlay toàn màn hình */
#fullscreenZoom {
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  display: none;
  overflow: auto; /* ✅ Cho phép cuộn khi ảnh lớn */
  touch-action: pan-x pan-y; /* ✅ Cho phép kéo bằng tay */
}

#zoomWrapper {
  position: relative;
  width: fit-content;
  height: fit-content;
  margin: 60px auto 24px auto;
  padding: 24px;
}

#zoomedImg {
  max-width: none; /* ✅ Không giới hạn để ảnh vượt khung */
  width: 150vw;     /* ✅ Lớn hơn khung để tạo điều kiện kéo */
  height: auto;
  display: block;
  cursor: grab;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

#zoomCloseBtn {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(230,230,230,0.5);
  font-size: 20px;
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: #000;
  z-index: 10000;
}
#zoomCloseBtn:hover {
  background: rgba(180, 180, 180, 0.95);
}
