/* =========================
   YACHT CABINS TABS (FULL)
   ========================= */
   
   /* Cabin title (H3) */
.cabin-title {
  font-size: 2em!important;
  line-height: 1.15;
  margin: 0 0 16px 0;
}

/* ===== Tabs Navigation ===== */
.yacht-cabins-tabs__nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.yacht-cabins-tabs__tab {
  appearance: none;
  border: none;
  background: #f1f2f3!important;     /* inactive background */
  color: #222!important;            /* inactive text */
  padding: .5rem 1rem;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 50px;
  transition: background-color 0.25s ease, color 0.25s ease;
	min-width:220px;
}

/* Active tab */
.yacht-cabins-tabs__tab.is-active {
  background: #B0915F!important;
  color: #fff!important;
}

/* Hover ONLY for inactive tabs */
.yacht-cabins-tabs__tab:not(.is-active):hover {
  background: #B0915F!important;
  color: #fff!important;
}

/* ===== Panels ===== */
.yacht-cabins-tabs__panel {
  display: none;
}

.yacht-cabins-tabs__panel.is-active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;

  /* Definite height so image can't blow out to 1500px */
  height: clamp(480px, 60vh, 720px);

  /* Stretch both columns to full height */
  align-items: stretch;
  align-content: stretch;
}

/* Allow grid children to shrink/stretch inside fixed-height grid */
.yacht-cabins-tabs__panel.is-active > * {
  min-height: 0;
}

/* ===== Left column: image covers full height/width ===== */
.yacht-cabins-tabs__panel.is-active .cabin-gallery {
  width: 100%;
  height: 100%;
  overflow: hidden;
  align-self: stretch;
}

/* Override Smush/Elementor sizing quirks */
.yacht-cabins-tabs__panel.is-active .cabin-gallery img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;

  /* Prevent aspect/auto sizing from plugins */
  aspect-ratio: unset !important;
  max-width: none !important;
  max-height: none !important;

  display: block !important;
}

/* ===== Right column: vertically centered text ===== */
.yacht-cabins-tabs__panel.is-active .cabin-description {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical center */
  line-height: 1.6;
  align-self: stretch;
}

/* Remove Elementor’s default top margin on first element */
.cabin-description > *:first-child {
  margin-top: 0 !important;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .yacht-cabins-tabs__nav {
    gap: 12px;
  }

  .yacht-cabins-tabs__tab {
    width: 100%;
    padding: 18px;
    font-size: 16px;
  }

  .yacht-cabins-tabs__panel.is-active {
    grid-template-columns: 1fr;
    height: auto; /* let it flow on mobile */
    gap: 20px;
  }

  .yacht-cabins-tabs__panel.is-active .cabin-description {
    justify-content: flex-start; /* feels better on mobile */
  }

  .yacht-cabins-tabs__panel.is-active .cabin-gallery {
    height: auto;
  }

  .yacht-cabins-tabs__panel.is-active .cabin-gallery img {
    height: auto !important;
  }
}
	/* ===== Cabin Slider ===== */
.cabin-slider{
  position: relative;
  width: 100%;
  height: 100%;
}

.cabin-slider__track{
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}

.cabin-slider__slide{
  flex: 0 0 100%;
  height: 100%;
}

/* Keep your cover behaviour */
.cabin-slider__slide img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Arrows */
.cabin-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none!important;        /* no background */
  border: none!important;
  padding: 0;
  color: #fff!important;             /* white arrows */
  font-size: 42px!important;         /* adjust size if needed */
  line-height: 1;

  cursor: pointer;
  z-index: 10;

  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cabin-slider__arrow--prev { left: 16px; }
.cabin-slider__arrow--next { right: 16px; }

/* Hover / focus */
.cabin-slider__arrow:hover,
.cabin-slider__arrow:focus {
  opacity: 1;
}

/* Optional: subtle nudge on hover (feels premium) */
.cabin-slider__arrow--prev:hover {
  transform: translate(-2px, -50%);
}
.cabin-slider__arrow--next:hover {
  transform: translate(2px, -50%);
}
/* Make sure arrows are clickable and above everything */
.cabin-slider__arrow{
  z-index: 9999 !important;
  pointer-events: auto !important;
}

/* Make sure nothing inside the gallery blocks clicks */
.cabin-slider,
.cabin-slider *{
  pointer-events: auto;
}
