.modal-carousel,
.gt-carousel {
  position: relative;
  width: 100%;
}

.gt-carousel {
  margin: 8px 0 12px;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8f0;
}

.modal-carousel {
  margin: 0;
  background: transparent;
}

.modal-carousel--stacked-gallery {
  --trip-blue: #287dfa;
  --trip-text: #455873;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
}

.modal-carousel--stacked-gallery .modal-carousel__hero {
  flex: 0 0 auto;
}

.modal-carousel--stacked-gallery .modal-carousel__stage {
  height: 400px;
  min-height: 400px;
  border-radius: 0;
  background: #f0f2f5;
}

.modal-carousel--stacked-gallery .modal-carousel__track {
  height: 100%;
  min-height: 400px;
}

.modal-carousel--stacked-gallery .modal-carousel__nav {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.18);
  color: #0f294d;
}

.modal-carousel--stacked-gallery .modal-carousel__nav--prev {
  left: 10px;
}

.modal-carousel--stacked-gallery .modal-carousel__nav--next {
  right: 10px;
  color: var(--trip-blue);
}

.modal-carousel--stacked-gallery .modal-carousel__counter {
  right: 14px;
  bottom: 14px;
  padding: 5px 11px;
  border-radius: 4px;
  background: rgba(15, 41, 77, 0.72);
  font-size: 13px;
  font-weight: 600;
}

.modal-carousel--stacked-gallery .modal-carousel__tabs {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 0 10px;
  border-bottom: 1px solid #dadfe6;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  gap: 0 18px;
}

.modal-carousel--stacked-gallery .modal-carousel__tabs::-webkit-scrollbar {
  display: none;
}

.modal-carousel--stacked-gallery .modal-carousel__tab {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--trip-text);
  white-space: nowrap;
  padding-bottom: 2px;
}

.modal-carousel--stacked-gallery .modal-carousel__tab.is-active {
  color: var(--trip-blue);
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--trip-blue);
}

.modal-carousel--stacked-gallery .modal-carousel__thumbs-bar {
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 0;
  border-top: 0;
  display: block;
}

.modal-carousel--stacked-gallery .modal-carousel__thumbs {
  gap: 6px;
  padding: 0 0 2px;
}

.modal-carousel--stacked-gallery .modal-carousel__thumb {
  width: 92px;
  height: 68px;
  border-radius: 4px;
  border-width: 2px;
  opacity: 1;
}

.modal-carousel--stacked-gallery .modal-carousel__thumb:not(.is-active) {
  opacity: 0.88;
}

.modal-carousel--stacked-gallery .modal-carousel__thumb.is-active {
  border-color: var(--trip-blue);
  border-width: 2px;
  transform: none;
  box-shadow: 0 0 0 1px var(--trip-blue);
}

.modal-carousel--stacked-gallery .modal-carousel__thumbs-progress {
  position: relative;
  height: 4px;
  margin-top: 8px;
  border-radius: 999px;
  background: #dadfe6;
  overflow: hidden;
}

.modal-carousel--stacked-gallery .modal-carousel__thumbs-progress[hidden] {
  display: none !important;
}

.modal-carousel--stacked-gallery .modal-carousel__thumbs-progress-fill {
  display: block;
  height: 100%;
  width: 30%;
  border-radius: inherit;
  background: #8592a6;
  transition: width 0.15s ease, transform 0.15s ease;
  transform: translateX(0);
}

.modal-carousel__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 0;
  padding: 0 2px;
}

.modal-carousel__tabs[hidden] {
  display: none !important;
}

.modal-carousel__tab {
  border: 0;
  background: none;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
}

.modal-carousel__tab.is-active {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.modal-carousel__stage {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #e2e8f0;
}

.gt-carousel--hero {
  margin: 0;
  border-radius: 0;
  height: 100%;
  min-height: inherit;
}

.modal-carousel__track {
  position: relative;
  width: 100%;
  height: 300px;
}

.modal-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.modal-carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.modal-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gt-carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 240px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gt-carousel--hero .gt-carousel__track {
  min-height: 100%;
}

.gt-carousel__track::-webkit-scrollbar {
  display: none;
}

.gt-carousel__track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  scroll-snap-align: start;
  user-select: none;
  pointer-events: none;
}

.gt-carousel__nav,
.modal-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.22);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.gt-carousel__nav:hover,
.modal-carousel__nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.04);
}

.gt-carousel__nav svg,
.modal-carousel__nav svg {
  width: 18px;
  height: 18px;
  display: block;
}

.gt-carousel__nav--prev,
.modal-carousel__nav--prev {
  left: 12px;
}

.gt-carousel__nav--next,
.modal-carousel__nav--next {
  right: 12px;
}

.modal-carousel__nav[hidden],
.modal-carousel__counter[hidden] {
  display: none !important;
}

.modal-carousel__counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.modal-carousel__thumbs-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.modal-carousel__thumbs-bar[hidden] {
  display: none !important;
}

.modal-carousel__thumbs-nav {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #334155;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.modal-carousel__thumbs-nav[hidden] {
  visibility: hidden;
  pointer-events: none;
}

.modal-carousel__thumbs-nav svg {
  width: 14px;
  height: 14px;
}

.modal-carousel__thumbs {
  display: flex;
  gap: 8px;
  padding: 2px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  min-width: 0;
}

.modal-carousel__thumbs[hidden] {
  display: none !important;
}

.modal-carousel__thumbs::-webkit-scrollbar {
  display: none;
}

.modal-carousel__thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.modal-carousel__thumb:hover {
  opacity: 1;
}

.modal-carousel__thumb.is-active {
  border-color: #0f766e;
  opacity: 1;
  transform: translateY(-1px);
}

.modal-carousel__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.modal-carousel__dots,
.gt-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}

.modal-carousel__dots[hidden] {
  display: none !important;
}

.modal-carousel__dot,
.gt-carousel__dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.modal-carousel__dot.is-active,
.gt-carousel__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

.ht-room-panel .modal-carousel__track {
  height: 220px;
}

@media (max-width: 768px) {
  .modal-carousel--stacked-gallery .modal-carousel__stage,
  .modal-carousel--stacked-gallery .modal-carousel__track {
    height: clamp(180px, 36vh, 240px);
    min-height: 0;
  }

  .modal-carousel--stacked-gallery .modal-carousel__thumb {
    width: 72px;
    height: 54px;
  }

  .modal-carousel--stacked-gallery .modal-carousel__tabs {
    padding: 8px 0 6px;
  }

  .modal-carousel--stacked-gallery .modal-carousel__tab {
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .modal-carousel__track {
    height: 240px;
  }

  .gt-carousel__nav,
  .modal-carousel__nav {
    width: 36px;
    height: 36px;
  }

  .gt-carousel__nav svg,
  .modal-carousel__nav svg {
    width: 16px;
    height: 16px;
  }

  .modal-carousel__thumb {
    width: 64px;
    height: 48px;
  }
}
