/* =======================================================
   rentals.css — Rentals page styles
   ======================================================= */

main.rentals.fill-viewport {
  min-block-size: auto;
}

.rentals .rentals-showcase {
  display: grid;
  gap: 1.5rem;
  padding-block: 1.5rem 2rem;
}

.rentals .rentals-intro,
.rentals .rentals-hero,
.rentals .rentals-selector {
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 248, 0.98));
  border: 1px solid rgba(23, 49, 40, 0.08);
  box-shadow: 0 18px 40px rgba(18, 35, 28, 0.08);
}

.rentals .rentals-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  gap: 1rem 1.5rem;
  align-items: start;
  padding: 1.35rem;
}

.rentals .rentals-intro__content {
  min-width: 0;
}

.rentals .rentals-intro__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.96;
  color: #173128;
  max-width: 15ch;
}

.rentals .rentals-intro__body {
  margin: 0.85rem 0 0;
  max-width: 68ch;
  color: #29453a;
  line-height: 1.75;
}

.rentals .rentals-intro__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.rentals .rentals-intro__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #eef4ef;
  border: 1px solid rgba(23, 49, 40, 0.08);
  color: #173128;
}

.rentals .rentals-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: start;
}

.rentals .rentals-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 1.5rem;
  padding: 1.35rem;
}

.rentals .rentals-media {
  display: grid;
  gap: 1rem;
}

.rentals .rentals-stage {
  position: relative;
  min-height: 0;
}

.rentals .rentals-stage__media {
  width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 22px;
  overflow: hidden;
  background: #173128;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.rentals .rentals-stage__media img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: center;
}

.rentals .rentals-stage__overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(180deg, transparent, rgba(7, 16, 13, 0.76));
  pointer-events: none;
}

.rentals .rentals-stage__eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.rentals .rentals-stage__controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
}

.rentals .rentals-stage__nav,
.rentals .rentals-stage__open {
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(12px);
}

.rentals .rentals-stage__nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 1.35rem;
}

.rentals .rentals-stage__open {
  min-height: 44px;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 700;
}

.rentals .rentals-gallery-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 92px;
  justify-content: start;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.rentals .rentals-gallery-thumb {
  border: 0;
  padding: 0;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(23, 49, 40, 0.08);
  box-shadow: inset 0 0 0 1px rgba(23, 49, 40, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.rentals .rentals-gallery-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.rentals .rentals-gallery-thumb.is-active {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 3px var(--g-start), 0 10px 24px rgba(23, 49, 40, 0.18);
}

.rentals .rentals-summary {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 0.5rem 0.15rem 0.25rem;
}

.rentals .rentals-summary__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rentals .rentals-summary__body {
  margin: 0;
  color: #2a4438;
  font-size: 1rem;
  line-height: 1.7;
  max-block-size: calc(8 * 1.7em);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.45rem;
  scrollbar-gutter: stable;
}

.rentals .rentals-summary__body::-webkit-scrollbar {
  width: 0.5rem;
}

.rentals .rentals-summary__body::-webkit-scrollbar-track {
  background: rgba(23, 49, 40, 0.08);
  border-radius: 999px;
}

.rentals .rentals-summary__body::-webkit-scrollbar-thumb {
  background: rgba(23, 49, 40, 0.28);
  border-radius: 999px;
}

.rentals .rentals-summary__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.rentals .rentals-summary__stats div {
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #eef4ef, #f7faf7);
  border: 1px solid rgba(23, 49, 40, 0.08);
}

.rentals .rentals-summary__stats dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #547060;
}

.rentals .rentals-summary__stats dd {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #173128;
}

.rentals .rentals-summary__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.rentals .rentals-selector {
  padding: 1.25rem;
}

.rentals .rentals-selector__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rentals .rentals-selector__header .h3 {
  margin-bottom: 0;
}

.rentals .rentals-selector__hint {
  margin: 0;
  color: #547060;
  max-width: 18rem;
  text-align: right;
}

.rentals .rentals-selector__carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
}

.rentals .rentals-selector__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.rentals .rentals-selector__nav {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #1f6d4a, #155637);
  color: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(21, 86, 55, 0.18);
  font-size: 1.35rem;
  flex-shrink: 0;
}

.rentals .rentals-selector-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  width: 100%;
  border: 0;
  padding: 0;
  text-align: left;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(23, 49, 40, 0.08);
  transition: transform 200ms ease, box-shadow 200ms ease;
  min-width: 0;
}

.rentals .rentals-selector-card.is-active {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 3px var(--g-start), 0 18px 36px rgba(23, 49, 40, 0.14);
}

.rentals .rentals-selector-card.is-centered:not(.is-active) {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(23, 49, 40, 0.12), 0 12px 28px rgba(23, 49, 40, 0.1);
}

.rentals .rentals-selector-card__image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.rentals .rentals-selector-card__body {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.rentals .rentals-selector-card__body > div {
  min-width: 0;
}

.rentals .rentals-selector-card__body h3 {
  display: block;
  max-width: 100%;
  margin: 0;
  color: #173128;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.05;
}

.rentals .rentals-selector-card__body p {
  margin: 0.35rem 0 0;
  color: #466355;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rentals .rentals-selector-card__stats {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0;
}

.rentals .rentals-selector-card__stats div {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #eef4ef;
  color: #173128;
}

.rentals .rentals-selector-card__stats dt,
.rentals .rentals-selector-card__stats dd {
  margin: 0;
  font-size: 0.82rem;
}

.rentals .rentals-selector-card__stats dt {
  color: #547060;
}

.gallery {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
}

.gallery.is-open {
  display: grid;
}

.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 16, 13, 0.72);
  backdrop-filter: blur(8px);
}

.gallery-frame {
  position: relative;
  width: min(96vw, 1180px);
  margin: auto;
  border-radius: 24px;
  overflow: hidden;
  background: #0d1915;
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
}

.gallery-frame__media {
  background: #0d1915;
}

.gallery-frame__media img {
  display: block;
  width: 100%;
  max-height: 76vh;
  min-height: min(70vh, 680px);
  object-fit: contain;
  margin: 0 auto;
  touch-action: pan-y;
}

.gallery-frame__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 1.15rem;
  background: linear-gradient(180deg, rgba(13, 25, 21, 0), rgba(13, 25, 21, 0.98));
}

.gallery-caption,
.gallery-count {
  margin: 0;
}

.gallery-caption {
  font-size: 1rem;
  font-weight: 700;
}

.gallery-count {
  color: rgba(255, 255, 255, 0.74);
}

.gallery-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.gallery-nav,
.gallery-close {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.25rem;
}

.rentals .rentals-stage__nav:hover,
.rentals .rentals-stage__open:hover,
.rentals .rentals-selector__nav:hover,
.rentals .rentals-gallery-thumb:hover,
.rentals .rentals-selector-card:hover,
.gallery-nav:hover,
.gallery-close:hover {
  filter: brightness(1.04);
}

.rentals .rentals-stage__media:focus-visible,
.rentals .rentals-stage__nav:focus-visible,
.rentals .rentals-stage__open:focus-visible,
.rentals .rentals-selector__nav:focus-visible,
.rentals .rentals-gallery-thumb:focus-visible,
.rentals .rentals-selector-card:focus-visible,
.gallery-nav:focus-visible,
.gallery-close:focus-visible {
  outline: 3px solid var(--g-start);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .rentals .rentals-intro,
  .rentals .rentals-hero {
    grid-template-columns: 1fr;
  }

  .rentals .rentals-summary__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .rentals .rentals-showcase {
    gap: 1rem;
    padding-block: 1rem 1.5rem;
  }

  .rentals .rentals-intro,
  .rentals .rentals-hero,
  .rentals .rentals-selector {
    border-radius: 20px;
  }

  .rentals .rentals-intro,
  .rentals .rentals-hero {
    padding: 1rem;
    gap: 1rem;
  }

  .rentals .rentals-intro__title {
    font-size: clamp(1.9rem, 7vw, 2.7rem);
    max-width: none;
  }

  .rentals .rentals-intro__actions {
    justify-content: stretch;
  }

  .rentals .rentals-intro__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .rentals .rentals-stage__media img {
    aspect-ratio: 4 / 5;
  }

  .rentals .rentals-stage__overlay {
    align-items: stretch;
    flex-direction: column;
  }

  .rentals .rentals-stage__controls {
    justify-content: space-between;
  }

  .rentals .rentals-gallery-strip {
    grid-auto-columns: 84px;
  }

  .rentals .rentals-summary {
    padding: 0.25rem 0.1rem 0;
  }

  .rentals .rentals-summary__title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .rentals .rentals-summary__body {
    font-size: 0.98rem;
    max-block-size: calc(8 * 1.7em);
    padding-right: 0.35rem;
  }

  .rentals .rentals-summary__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rentals .rentals-selector {
    padding: 1rem;
  }

  .rentals .rentals-selector__header {
    align-items: start;
    flex-direction: column;
    margin-bottom: 0.75rem;
  }

  .rentals .rentals-selector__hint {
    max-width: none;
    text-align: left;
  }

  .rentals .rentals-selector__carousel {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .rentals .rentals-selector__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .rentals .rentals-selector__nav {
    width: 100%;
    height: 44px;
  }

  .rentals .rentals-selector__nav--prev {
    order: 2;
  }

  .rentals .rentals-selector__list {
    order: 1;
  }

  .rentals .rentals-selector__nav--next {
    order: 3;
  }

  .gallery-frame {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .gallery-frame__media img {
    max-height: calc(100vh - 108px);
    min-height: calc(100vh - 108px);
  }

  .gallery-frame__footer {
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .rentals .rentals-gallery-thumb,
  .rentals .rentals-selector-card {
    transition: none;
  }
}
