.salon-room-gallery {
  min-width: 0;
  width: 100%;
}

.room-gallery-viewport {
  position: relative;
  overflow-x: auto;
  aspect-ratio: 3 / 2;
  background: #e8e2db;
  box-shadow: 0 24px 50px rgba(26, 26, 26, 0.18);
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.room-gallery-viewport::-webkit-scrollbar { display: none; }
.room-gallery-ready .room-gallery-viewport { overflow: hidden; }

.room-gallery-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
}

.room-gallery-slide,
.room-gallery-full-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
}

.room-gallery-slide { display: block; cursor: zoom-in; }

.room-gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.room-gallery-ready [data-room-viewport] {
  touch-action: pan-y pinch-zoom;
}

.room-gallery-enlarge {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(26, 26, 26, 0.6);
  color: #fff;
  font-size: 1.5rem;
}

.room-gallery-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-top: 0.9rem;
  color: #403a36;
}

.room-gallery-controls p { margin: 0; font-size: 0.85rem; }
.room-gallery-caption { flex: 1; min-width: 0; }
.room-gallery-counter { white-space: nowrap; font-variant-numeric: tabular-nums; }

.room-gallery-controls button {
  flex: 0 0 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(26, 26, 26, 0.2);
  background: rgba(255, 255, 255, 0.75);
  color: #1a1a1a;
  font: inherit;
  font-size: 1.7rem;
  cursor: pointer;
}

.room-gallery-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #151412;
  color: #fff;
}

.room-gallery-dialog::backdrop { background: #151412; }

.room-gallery-full-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: contain;
}

.room-gallery-full-slide {
  display: grid;
  place-items: center;
  padding: 4.75rem 1rem 1rem;
}

.room-gallery-full-slide img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.room-gallery-toolbar {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.75rem max(1rem, env(safe-area-inset-left));
  background: rgba(21, 20, 18, 0.85);
}

.room-gallery-toolbar p { margin: 0; font-size: 0.9rem; }
.room-gallery-toolbar p:first-child { flex: 1; min-width: 0; }

.room-gallery-toolbar button,
.room-gallery-full-prev,
.room-gallery-full-next {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(21, 20, 18, 0.65);
  color: #fff;
  font: inherit;
  font-size: 1.8rem;
  cursor: pointer;
}

.room-gallery-full-prev,
.room-gallery-full-next { position: absolute; z-index: 2; top: calc(50% - 1.375rem); }
.room-gallery-full-prev { left: max(0.75rem, env(safe-area-inset-left)); }
.room-gallery-full-next { right: max(0.75rem, env(safe-area-inset-right)); }
.room-gallery-open { overflow: hidden; }

.salon-room-gallery :focus-visible { outline: 3px solid #a8875d; outline-offset: -3px; }
.room-gallery-dialog :focus-visible { outline-color: #e8cfae; }
