/* Galeria sal / Room gallery – js/gallery.js */

.ph.is-gallery { cursor: pointer; }
.gallery-open {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.gallery-open:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -4px;
}
.gallery-badge {
  position: absolute;
  left: 50%;
  bottom: .9rem;
  transform: translateX(-50%);
  z-index: 1;
  max-width: calc(100% - 1.4rem);
  background: rgba(15, 42, 67, .88);
  color: #f4e9d6;
  border: 1px solid rgba(217, 164, 65, .9);
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.3;
  padding: .48rem .9rem;
  border-radius: 99px;
  white-space: nowrap;
  box-shadow: 0 8px 20px -8px rgba(8, 16, 26, .7);
  pointer-events: none;
}
.gallery-open:hover .gallery-badge,
.gallery-open:focus-visible .gallery-badge {
  background: rgba(15, 42, 67, .96);
  border-color: var(--gold);
  color: #fff;
}

html.zs-gallery-open,
body.zs-gallery-open {
  overflow: hidden;
}
body.zs-gallery-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

.zs-gallery[hidden] { display: none !important; }
.zs-gallery {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f4e9d6;
  background: #080f18;
}
.zs-gallery-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #080f18;
}
.zs-gallery-stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100vw - 8rem);
  height: calc(100vh - 5.5rem);
  max-width: 100%;
  max-height: 100%;
}
.zs-gallery-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .18s ease;
}
.zs-gallery-stage img.is-ready { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .zs-gallery-stage img { transition: none; }
}

.zs-gallery-close,
.zs-gallery-nav {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(217, 164, 65, .55);
  background: rgba(15, 42, 67, .72);
  color: #f4e9d6;
  border-radius: 50%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.zs-gallery-close:hover,
.zs-gallery-nav:hover,
.zs-gallery-close:focus-visible,
.zs-gallery-nav:focus-visible {
  background: rgba(15, 42, 67, .95);
  border-color: var(--gold);
  color: #fff;
  outline: none;
}
.zs-gallery-close:focus-visible,
.zs-gallery-nav:focus-visible {
  box-shadow: 0 0 0 2px rgba(217, 164, 65, .65);
}
.zs-gallery-close {
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
}
.zs-gallery-prev { left: .75rem; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
.zs-gallery-next { right: .75rem; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }

.zs-gallery-counter {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  margin: 0;
  padding: .35rem .8rem;
  border-radius: 99px;
  background: rgba(8, 16, 26, .72);
  font-family: var(--sans);
  font-size: .82rem;
  letter-spacing: .12em;
  font-weight: 600;
  color: #f4e9d6;
  pointer-events: none;
}

@media (max-width: 640px) {
  .gallery-badge {
    font-size: .62rem;
    letter-spacing: .08em;
    padding: .42rem .7rem;
    bottom: .7rem;
  }
  .zs-gallery-stage {
    width: calc(100vw - 1.1rem);
    height: calc(100vh - 6.5rem);
  }
  .zs-gallery-prev,
  .zs-gallery-next {
    width: 42px;
    height: 42px;
    top: auto;
    bottom: 1.6rem;
    transform: none;
  }
  .zs-gallery-prev { left: 1rem; }
  .zs-gallery-next { right: 1rem; }
  .zs-gallery-counter { bottom: 1.85rem; }
  .zs-gallery-close { top: .7rem; right: .7rem; }
}
