/* GALERÍA DE 3 IMÁGENES (CASO NORMAL) */
.rooms-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  position: relative;
  height: clamp(260px, 40vw, 560px);
}

.slot {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.slot--main { 
  grid-row: 1 / 3; 
}

.slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .6s ease-in-out;
}

.slot img:hover {
  transform: scale(1.05);
}

.slot img.current { 
  opacity: 1; 
  z-index: 1; 
}

.slot img.next { 
  opacity: 0; 
  z-index: 2; 
}

.slot img.next.fade-in { 
  opacity: 1; 
}

.slot img.current.fade-out { 
  opacity: 0; 
}

/* GALERÍA DE IMAGEN ÚNICA (CASO INDEX 0) */
.single-image-gallery {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.single-gallery-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .6s ease-in-out, transform 0.3s ease;
}

.single-gallery-image.current { 
  opacity: 1; 
  z-index: 1; 
}

.single-gallery-image.next { 
  opacity: 0; 
  z-index: 2; 
}

.single-gallery-image.next.fade-in { 
  opacity: 1; 
}

.single-gallery-image.current.fade-out { 
  opacity: 0; 
}

.single-image-gallery:hover .single-gallery-image {
  transform: scale(1.05);
}

/* ICONOS DE ZOOM GENÉRICOS (PARA AMBOS CASOS) */
.zoom-icon {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;

}

.zoom-icon svg {
  width: 20px;
  height: 20px;
  stroke: white;
}

/* LIGHTBOX COMPLETO */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

.lightbox-container {
  width: 100%;
  max-width: 1200px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.lightbox-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.lightbox-close {
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  padding: 10px;
  line-height: 1;
}

.lightbox-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 20px;
}

.lightbox-image-container {
  max-width: 80%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-main-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 40px;
  padding: 20px 35px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
  line-height: 1;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-thumbnails-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  max-height: 100px;
  padding: 10px 0;
}

.lightbox-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  padding: 10px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.lightbox-thumbnails::-webkit-scrollbar {
  display: none;
}

.thumb-scroll-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 20px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.7;
}

.thumb-scroll-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.thumb-scroll-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.lightbox-thumb:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.lightbox-thumb.active {
  opacity: 1;
  border-color: #007bff;
  transform: scale(1.1);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .rooms-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }
  
  .slot--main { 
    grid-row: auto; 
  }
  
  .slot { 
    aspect-ratio: 4 / 3; 
  }

  .single-image-gallery {
    height: 200px;
  }
  
  .zoom-icon {
    width: 35px;
    height: 35px;
  }
  
  .zoom-icon svg {
    width: 18px;
    height: 18px;
  }

  .lightbox {
    padding: 10px;
  }
  
  .lightbox-main-image {
    max-height: 60vh;
  }
  
  .lightbox-nav {
    font-size: 30px;
    padding: 15px 25px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-thumb {
    width: 60px;
    height: 45px;
  }
  
  .thumb-scroll-btn {
    font-size: 16px;
    padding: 8px 12px;
  }
}