/* Overlay phủ toàn màn hình */
.bds-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  overflow: hidden;
}

/* Khung ảnh */
.bds-zoom-stage {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: none; /* hỗ trợ pan/zoom tốt hơn */
  cursor: zoom-out;
}

/* Ảnh lớn */
.bds-zoom-img {
  position: absolute;
  max-width: 90vw;
  max-height: 90vh;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1) translateZ(0);
  transition: transform .2s ease;
  will-change: transform;
  user-select: none;
  pointer-events: none; /* chỉ nhận drag trên stage */
}

/* Khi zoom */
.bds-zoom-stage.zoomed {
  cursor: grab;
}
.bds-zoom-stage.zoomed:active {
  cursor: grabbing;
}

/* Thanh điều khiển */
.bds-zoom-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 1;
}

.bds-zoom-btn {
  border: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.bds-zoom-btn:hover { background: rgba(255,255,255,.2); }

/* Nút đóng / chuyển ảnh */
.bds-zoom-close, .bds-zoom-prev, .bds-zoom-next {
  position: absolute;
  top: 16px;
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 0;
  cursor: pointer;
  z-index: 1;
}
.bds-zoom-close { right: 16px; }
.bds-zoom-prev  { left: 16px; top: 50%; transform: translateY(-50%); }
.bds-zoom-next  { right: 16px; top: 50%; transform: translateY(-50%); }

.bds-zoom-counter {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  opacity: .85;
}

/* Ẩn scrollbar body khi mở overlay */
body.bds-zoom-lock {
  overflow: hidden;
}
