/* Lightbox galerie na detailu produktu — otevírá se kliknutím na obrázek
   v .wrapper-gallery, listuje šipkami/klávesnicí/swipem. Full varianty
   obrázků (suffix _full) odvozuje detail.js. */

.wrapper-gallery .gallery-item img {
  cursor: zoom-in;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(7, 7, 7, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.gallery-lightbox[hidden] {
  display: none !important;
}
.gallery-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gallery-lightbox__stage {
  margin: 0;
  max-width: calc(100vw - 8.5rem);
  max-height: calc(100vh - 5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__image {
  max-width: 100%;
  max-height: calc(100vh - 5rem);
  object-fit: contain;
  display: block;
  border-radius: 0.5rem;
  opacity: 1;
  transition: opacity 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.gallery-lightbox__image.is-loading {
  opacity: 0.35;
}

.gallery-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gallery-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.gallery-lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gallery-lightbox__arrow:hover {
  background: rgba(255, 255, 255, 0.24);
}
.gallery-lightbox__arrow--prev {
  left: 1rem;
}
.gallery-lightbox__arrow--next {
  right: 1rem;
}
.gallery-lightbox__arrow[hidden] {
  display: none !important;
}
.gallery-lightbox__arrow svg {
  width: 1.5rem;
  height: 1.5rem;
}

.gallery-lightbox__counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Urbanist", system-ui, sans-serif;
  font-size: 0.875rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.25rem 0.875rem;
  border-radius: 1rem;
  user-select: none;
}

@supports selector(:focus-visible) {
  .gallery-lightbox__close:focus-visible,
  .gallery-lightbox__arrow:focus-visible {
    outline: 0.125rem solid #ff5500;
    outline-offset: 0.125rem;
  }
  .gallery-lightbox__close:focus:not(:focus-visible),
  .gallery-lightbox__arrow:focus:not(:focus-visible) {
    outline: none;
  }
}
@supports not selector(:focus-visible) {
  .gallery-lightbox__close:focus,
  .gallery-lightbox__arrow:focus {
    outline: 0.125rem solid #ff5500;
    outline-offset: 0.125rem;
  }
}

@media (max-width: 47.9375rem) {
  .gallery-lightbox__stage {
    max-width: 100vw;
    max-height: calc(100vh - 4rem);
  }
  .gallery-lightbox__image {
    border-radius: 0;
  }
  .gallery-lightbox__arrow {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(7, 7, 7, 0.45);
  }
  .gallery-lightbox__arrow--prev {
    left: 0.5rem;
  }
  .gallery-lightbox__arrow--next {
    right: 0.5rem;
  }
}
