/* Swipebox — cierre visible y controles fiables */

#swipebox-overlay {
  background: rgba(13, 13, 13, 0.96) !important;
}

/* Barra de acciones siempre visible arriba */
#swipebox-action {
  top: 0 !important;
  bottom: auto !important;
  height: 56px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  z-index: 10001 !important;
}

#swipebox-action.visible-bars,
#swipebox-action.force-visible-bars {
  top: 0 !important;
  bottom: auto !important;
}

#swipebox-caption {
  top: auto !important;
  bottom: 0 !important;
  height: 48px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  box-shadow: none !important;
}

#swipebox-caption.visible-bars,
#swipebox-caption.force-visible-bars {
  top: auto !important;
  bottom: 0 !important;
}

#swipebox-action #swipebox-close,
#swipebox-action #swipebox-prev,
#swipebox-action #swipebox-next {
  background-image: none !important;
  background-color: transparent !important;
  width: 48px !important;
  height: 48px !important;
  top: 4px !important;
  border: 0 !important;
  opacity: 1 !important;
  filter: none !important;
}

/* X de cierre — esquina superior derecha (donde se espera) */
#swipebox-action #swipebox-close {
  left: auto !important;
  right: 12px !important;
  position: absolute !important;
}

#swipebox-action #swipebox-close::before,
#swipebox-action #swipebox-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

#swipebox-action #swipebox-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#swipebox-action #swipebox-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#swipebox-action #swipebox-close:hover::before,
#swipebox-action #swipebox-close:hover::after {
  background: #EFE0D2;
}

/* Flechas prev/next con CSS */
#swipebox-action #swipebox-prev {
  right: 120px !important;
  left: auto !important;
}

#swipebox-action #swipebox-next {
  right: 64px !important;
  left: auto !important;
}

#swipebox-action #swipebox-prev::before,
#swipebox-action #swipebox-next::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

#swipebox-action #swipebox-prev::before {
  transform: translate(-40%, -50%) rotate(-135deg);
}

#swipebox-action #swipebox-next::before {
  transform: translate(-60%, -50%) rotate(45deg);
}

#swipebox-slider {
  padding-top: 56px;
  padding-bottom: 48px;
  box-sizing: border-box;
}

#swipebox-slider .slide img {
  max-height: calc(100vh - 120px) !important;
  max-width: 94vw !important;
}
