.image-slider {
  position: relative;
  max-width: 800px;
  margin: auto;
  overflow: hidden;
  border-radius: 12px;
}

/* --- SLIDE MODE --- */
.image-slider .slides {
  display: flex;
  transition: transform 0.6s ease;
  width: 100%;
}

.image-slider img {
  width: auto;
  max-height: 400px; /* keep slider from being too tall */
  margin: auto;
  cursor: pointer;
  flex-shrink: 0;
  object-fit: contain;
  opacity: 1;
}

/* --- FADE MODE --- */
.image-slider[data-transition="fade"] .slides {
  position: relative;
  display: block;
  height: 400px;  /* FIX: preserve height */
}

.image-slider[data-transition="fade"] img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-height: 400px;
  max-width: 100%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.8s ease;
}

.image-slider[data-transition="fade"] img.active {
  opacity: 1;
}

/* --- NAVIGATION BUTTONS --- */
.image-slider .prev,
.image-slider .next {
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;

  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 2;
}

.image-slider .prev { left: 10px; }
.image-slider .next { right: 10px; }

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed !important; /* override Bootstrap */
  top: 0; left: 0;
  width: 100vw;  /* full viewport width */
  height: 100vh; /* full viewport height */
  background: rgba(0,0,0,0.9);
  z-index: 99999; /* above everything */
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 95vw;  /* scale relative to viewport */
  max-height: 90vh;
  width: auto !important;
  height: auto !important;
  display: block;
  margin: auto;
  object-fit: contain;
}

.lightbox .close {
  position: absolute;
  top: 20px; right: 30px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  user-select: none;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  user-select: none;
  z-index: 10000; /* make sure above image */
}

.lightbox-prev { left: 5%; }
.lightbox-next { right: 5%; }
