/* Carrusel de fotos — ficha de habitación (Crest). Solo se carga en single-room. */
/* Proporción de la foto en escritorio: cámbiala aquí (p. ej. 4 / 3, 1 / 1) */
.room-single { --crest-gal-ratio: 5 / 4; }

.room-single .room-single-img.has-gallery { background: var(--bg-warm, #f4efe8); }
.crest-gal { position: relative; }
.crest-gal__viewport { position: relative; }

.crest-gal__track {
  display: flex;
  aspect-ratio: var(--crest-gal-ratio);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.crest-gal__track::-webkit-scrollbar { display: none; }
.crest-gal__track:focus-visible { outline: 2px solid var(--amber, #c9a15a); outline-offset: -2px; }

.crest-gal__slide { position: relative; flex: 0 0 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.room-single .crest-gal__slide img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  aspect-ratio: auto; object-fit: cover; display: block;
}
.crest-gal .room-tag { z-index: 2; }

.crest-gal__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--green, #465651);
  box-shadow: 0 2px 10px rgba(0,0,0,.22); cursor: pointer;
  transition: opacity .2s, background .2s;
}
.crest-gal.is-ready .crest-gal__nav { display: flex; }
.crest-gal__nav:hover { background: #fff; }
.crest-gal__nav[disabled] { opacity: .35; cursor: default; }
.crest-gal__nav svg { width: 20px; height: 20px; }
.crest-gal__prev { left: .75rem; }
.crest-gal__next { right: .75rem; }
.crest-gal__nav:focus-visible,
.crest-gal__thumb:focus-visible { outline: 2px solid var(--amber, #c9a15a); outline-offset: 2px; }

.crest-gal__count {
  position: absolute; right: .75rem; bottom: .75rem; z-index: 2;
  padding: .25rem .625rem; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; font-size: .72rem; letter-spacing: .06em;
}

.crest-gal__thumbs { position: relative; display: flex; gap: .5rem; padding: .625rem; overflow-x: auto; scrollbar-width: thin; }
.crest-gal__thumb {
  flex: 0 0 auto; width: 84px; padding: 0; overflow: hidden;
  border: 2px solid transparent; border-radius: 4px; background: none;
  opacity: .65; cursor: pointer; transition: opacity .2s, border-color .2s;
}
.crest-gal__thumb:hover { opacity: 1; }
.crest-gal__thumb[aria-current="true"] { opacity: 1; border-color: var(--amber, #c9a15a); }
.room-single .crest-gal__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

/* Escritorio: la imagen manda (algo más ancha) y se queda a la vista mientras se lee el texto */
@media (min-width: 961px) {
  .room-single .room-single-grid { grid-template-columns: 1.15fr 1fr; }
  .room-single .room-single-img.has-gallery { position: sticky; top: 7rem; }
}
@media (max-width: 960px) { .room-single { --crest-gal-ratio: 4 / 3; } }
@media (max-width: 600px) {
  .crest-gal__nav { width: 38px; height: 38px; }
  .crest-gal__thumb { width: 68px; }
}
@media (prefers-reduced-motion: reduce) { .crest-gal__track { scroll-behavior: auto; } }
