/* =============================================
   Cabin Detail Pages
   ============================================= */

.cabin-page {
  background: var(--color-white);
}

.cabin-hero {
  position: relative;
  min-height: clamp(420px, 58vh, 640px);
  display: flex;
  align-items: flex-end;
  padding: 0;
  background: center / cover no-repeat;
  margin-top: 0;
}

.cabin-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(5, 10, 24, 0.35) 0%,
      rgba(5, 10, 24, 0.08) 28%,
      transparent 48%
    ),
    linear-gradient(
      to top,
      rgba(5, 10, 24, 0.82) 0%,
      rgba(5, 10, 24, 0.45) 38%,
      rgba(5, 10, 24, 0.12) 68%,
      transparent 100%
    );
  pointer-events: none;
}

.cabin-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  /* Match .container.container--wide so title lines up with page content */
  padding: clamp(6.5rem, 12vw, 8rem) var(--container-padding) clamp(1rem, 2vw, 1.5rem);
}

.cabin-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 500;
  color: var(--color-white);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.cabin-hero__subtitle {
  font-size: clamp(0.9375rem, 1.8vw, 1.125rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  max-width: 560px;
  line-height: 1.45;
  margin: 0;
}

.cabin-hero__subtitle--wide {
  max-width: min(720px, 92vw);
}

.cabin-body {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 var(--section-padding);
}

.cabin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.cabin-main {
  min-width: 0;
}

.cabin-specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  padding: clamp(1.25rem, 3vw, 1.75rem) 0;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--color-gray-200);
  border-bottom: 1px solid var(--color-gray-200);
}

.cabin-spec {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  position: relative;
}

.cabin-spec:not(:last-child)::after {
  display: none;
}

.cabin-spec__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #3B82F6;
  margin-bottom: 0;
}

.cabin-spec__icon img,
.cabin-spec__icon svg {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.cabin-spec__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.cabin-spec__value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1F2937;
  line-height: 1.2;
  white-space: nowrap;
}

.cabin-spec__label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-400);
  line-height: 1.2;
}

.cabin-section {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.cabin-section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 500;
  color: var(--color-navy);
  margin-bottom: 1.25rem;
}

.cabin-about__text {
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  color: var(--color-gray-500);
  line-height: 1.85;
  margin-bottom: 1rem;
}

.cabin-about__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.25rem 0 1.25rem;
  padding-left: 0.25rem;
}

.cabin-about__list li {
  display: block;
  font-size: 0.9375rem;
  color: var(--color-gray-600);
  line-height: 1.7;
  padding-left: 1rem;
  position: relative;
}

.cabin-about__list li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-gray-500);
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 0;
  background: none;
  flex-shrink: unset;
}

.cabin-about__list li strong {
  color: #111827;
  font-weight: 700;
}

.cabin-gallery {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.875rem;
  aspect-ratio: 16 / 10;
  max-height: 520px;
}

.cabin-gallery__main {
  grid-row: span 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 0;
  height: 100%;
  cursor: pointer;
}

.cabin-gallery__main img,
.cabin-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cabin-gallery__thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 0;
  height: 100%;
  cursor: pointer;
}

.cabin-gallery__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 24, 0.45);
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--transition);
}

.cabin-gallery__thumb:hover .cabin-gallery__overlay {
  background: rgba(5, 10, 24, 0.55);
}

.cabin-amenities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.cabin-amenity {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #0B1629;
  border-radius: 16px;
  padding: clamp(1.15rem, 2.5vw, 1.35rem) clamp(1.15rem, 2.5vw, 1.5rem);
}

.cabin-amenity__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: auto;
  height: auto;
  background: none;
  color: #3B82F6;
  border-radius: 0;
  margin-bottom: 0;
}

.cabin-amenity__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.cabin-amenity__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-white);
  margin: 0;
  line-height: 1.3;
}

.cabin-amenity__text {
  font-size: 0.8125rem;
  color: rgba(191, 210, 235, 0.72);
  line-height: 1.45;
  margin: 0;
}

.cabin-booking {
  position: sticky;
  /* nav top offset + nav height + breathing room */
  top: calc(clamp(0.875rem, 2vw, 1.25rem) + 4.75rem + 1.5rem);
}

.cabin-booking__card {
  background: var(--color-white);
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 1.75rem);
  box-shadow: none;
}

.cabin-booking__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: 0.35rem;
}

.cabin-booking__price-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #E5E7EB;
}

.cabin-booking__price-block .cabin-booking__price {
  margin-bottom: 0.35rem;
  padding-bottom: 0;
  border-bottom: none;
}

.cabin-booking__taxes {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-gray-500);
  margin: 0;
  line-height: 1.4;
}

.cabin-booking__price {
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--color-navy);
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #E5E7EB;
  line-height: 1.15;
}

.cabin-booking__price span {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-gray-500);
}

.cabin-booking__platform-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-navy);
  margin: 0 0 1rem;
  line-height: 1.5;
  text-align: center;
}

.cabin-booking__platforms {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn--airbnb,
.btn--booking-com {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  min-height: 52px;
  padding: 0.875rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-white);
  transition: transform var(--transition), filter var(--transition);
}

.btn--airbnb:hover,
.btn--booking-com:hover {
  color: var(--color-white);
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.btn--airbnb svg,
.btn--booking-com svg {
  flex-shrink: 0;
}

.btn--airbnb {
  background: #FF5A5F;
}

.btn--booking-com {
  background: #006CE4;
}

.cabin-booking__or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-400);
}

.cabin-booking__or::before,
.cabin-booking__or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E7EB;
}

.cabin-booking__contacts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 1.25rem;
}

.cabin-booking__contact {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: var(--color-white);
  box-sizing: border-box;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.cabin-booking__contact:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: #D1D5DB;
}

.cabin-booking__contact img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.cabin-booking__note {
  font-size: 0.8125rem;
  color: var(--color-navy);
  line-height: 1.55;
  text-align: center;
  margin: 0;
}


@media (max-width: 1024px) {
  .cabin-layout {
    grid-template-columns: 1fr;
  }

  .cabin-booking {
    position: static;
    order: -1;
  }

  .cabin-amenities-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cabin-hero {
    min-height: clamp(340px, 52vh, 480px);
  }

  .cabin-hero__content {
    padding-top: 5.5rem;
    padding-bottom: 1rem;
  }

  .cabin-hero__subtitle {
    max-width: 100%;
  }

  .cabin-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    aspect-ratio: auto;
    max-height: none;
  }

  .cabin-gallery__main {
    grid-row: auto;
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .cabin-gallery__thumb {
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .cabin-specs {
    justify-content: flex-start;
    gap: 1.25rem 1.5rem;
  }

  .cabin-spec {
    flex: 0 1 calc(50% - 0.75rem);
    min-width: 9rem;
  }

  .cabin-spec:not(:last-child)::after {
    display: none;
  }
}

/* --- Gallery Modal (cabin pages) --- */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 24, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1.5rem;
}

.gallery-modal--open {
  opacity: 1;
  visibility: visible;
}

.gallery-modal__content {
  position: relative;
  width: min(960px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.gallery-modal__image-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-modal__header {
  display: flex;
  justify-content: flex-end;
}

.gallery-modal__stage {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  width: 100%;
}

.gallery-modal__image {
  flex: 1;
  min-width: 0;
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.gallery-modal__nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.gallery-modal__nav:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.05);
}

.gallery-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
}

.gallery-modal__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.gallery-modal__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.5rem;
  width: 100%;
}

.gallery-modal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background var(--transition), width var(--transition), height var(--transition);
}

.gallery-modal__dot--active {
  background: var(--color-white);
  width: 12px;
  height: 12px;
}
