.atha-gallery-slider {
  position: relative;
}

.atha-gallery-slider__viewport {
  overflow: hidden;
  width: 100%;
  /* utile per touch */
  touch-action: pan-y;
}

.atha-gallery-slider__track {
  display: flex;
  gap: 16px;
  will-change: transform;
  transform: translateX(0px);
  transition: transform 250ms ease;
}

.atha-gallery-slider__slide {
  flex: 0 0 calc((100% - (16px * 2)) / 3);
  max-width: calc((100% - (16px * 2)) / 3);
}

.atha-gallery-slider__img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.atha-gallery-slider__controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

.atha-gallery-slider__btn {
  cursor: pointer;
  padding: 6px 10px;
  line-height: 1;
}

.atha-gallery-slider__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.atha-gallery-slider__dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.atha-gallery-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  opacity: 0.6;
  padding: 0;
}

.atha-gallery-slider__dot.is-active {
  opacity: 1;
  background: currentColor;
}

/* Responsive: 2 visibili */
@media (max-width: 900px) {
  .atha-gallery-slider__slide {
    flex-basis: calc((100% - 16px) / 2);
    max-width: calc((100% - 16px) / 2);
  }
}

/* Responsive: 1 visibile */
@media (max-width: 600px) {
  .atha-gallery-slider__slide {
    flex-basis: 100%;
    max-width: 100%;
  }
}


/* Bottone che avvolge l'immagine */
.atha-gallery-slider__open {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 100%;
  text-align: inherit;
}

/* LIGHTBOX */
.atha-gallery-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
}

.atha-gallery-lightbox.is-open {
  display: block;
}

.atha-gallery-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
}

.atha-gallery-lightbox__dialog {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.atha-gallery-lightbox__content {
  position: relative;
  max-width: min(1200px, 96vw);
  max-height: 90vh;
}

.atha-gallery-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
}

.atha-gallery-lightbox__close,
.atha-gallery-lightbox__nav {
  position: absolute;
  cursor: pointer;
  border: 0;
  padding: 8px 12px;
  line-height: 1;
}

.atha-gallery-lightbox__close {
  top: 8px;
  right: 8px;
}

.atha-gallery-lightbox__nav--prev {
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
}

.atha-gallery-lightbox__nav--next {
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 600px) {
  .atha-gallery-lightbox__nav--prev { left: 0; }
  .atha-gallery-lightbox__nav--next { right: 0; }
}


.atha-gallery--no-scroll { overflow: hidden; }
