.bathroom-gallery {
  --gallery-inset: clamp(1rem, 4vw, 4rem);
  --gallery-height: clamp(30rem, 63vh, 41rem);
  --card-width-limit: min(72vw, 47rem);
  padding-block: clamp(3rem, 7vw, 6rem);
  background: #f0ede6;
  color: #24211d;
}

#ambientes {
  background: #000;
  color: #f0ede6;
}

#ambientes .bathroom-gallery__controls button:not(:disabled):hover {
  background: #f0ede6;
  color: #24211d;
}

.bathroom-gallery__photos {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: clamp(.7rem, 1.35vw, 1.1rem);
  overflow-x: auto;
  margin: 0;
  padding: 0 var(--gallery-inset);
  list-style: none;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gallery-inset);
  scrollbar-width: none;
}

.bathroom-gallery__photos::-webkit-scrollbar {
  display: none;
}

.bathroom-gallery__photos li {
  width: min(var(--card-width-limit), calc(var(--gallery-height) * var(--photo-ratio)));
  height: var(--gallery-height);
  overflow: hidden;
  position: relative;
  border-radius: clamp(.85rem, 2.4vw, 1.75rem);
  scroll-snap-align: start;
  background: #dad4c8;
}

.bathroom-gallery__photos img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bathroom-gallery__photos .bathroom-gallery__photo--screenshot img {
  position: absolute;
  height: var(--photo-height, 105.79%);
  top: var(--photo-top, -5.79%);
}

.bathroom-gallery__controls:not([hidden]) {
  display: flex;
  justify-content: center;
  gap: .8rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.bathroom-gallery__controls button {
  display: grid;
  place-items: center;
  width: 3.3rem;
  height: 3.3rem;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.bathroom-gallery__controls button:disabled {
  opacity: .32;
  cursor: default;
}

.bathroom-gallery__controls button:not(:disabled):hover {
  background: #24211d;
  color: #fff;
}

.bathroom-gallery__controls svg {
  width: 1.25rem;
  height: 1.25rem;
}

.bathroom-gallery__controls button:first-child svg {
  transform: rotate(180deg);
}

.bathroom-gallery :focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.bathroom-gallery__photos:focus-visible {
  outline-offset: -2px;
}

@media (max-width: 560px) {
  .bathroom-gallery {
    --gallery-height: clamp(22rem, 110vw, 32rem);
    --card-width-limit: 82vw;
  }
}

@media (any-pointer: fine) {
  .bathroom-gallery__photos { cursor: grab; user-select: none; }
}
.bathroom-gallery__photos.mouse-pan { scroll-snap-type: none; }
.bathroom-gallery__photos.is-dragging { cursor: grabbing; }
