/**
 * Gallery page — consolidated.
 *
 * This file previously carried six generations of "FINAL" passes, each
 * re-declaring the same selectors on top of the last. Every declaration that
 * a later one at the same selector already overwrote has been removed; the
 * survivors keep their original order, so the rendered result is unchanged.
 * Verified declaration-by-declaration with css_prune.py --prove.
 *
 * When you change this page, EDIT the existing rule. Appending another pass
 * is how the mixed tile sizes and left-hugging grids got here in the first
 * place: the bug lived in a layer nobody was reading any more.
 *
 * @package Flamingo_Liqueur
 */

/**
 * Gallery page — luxury lifestyle magazine (presentation only).
 * Scoped to body.page-gallery so HOME / STORY / PRODUCT / HTE are untouched.
 * No new blocks / CMS fields. Native CSS only.
 *
 * @package Flamingo_Liqueur
 */

/* ------------------------------------------------------------------ */

/* Global rhythm                                                      */

/* ------------------------------------------------------------------ */

.page-gallery .c-entry__content--blocks > .fl-story + .fl-gallery,
.page-gallery .c-entry__content--blocks > .fl-gallery + .fl-gallery,
.page-gallery .c-entry__content--blocks > .fl-gallery + .fl-story,
.page-gallery .c-entry__content--blocks > .fl-story + .fl-story {
  border-top: 0;
}

.page-gallery .fl-hero__subheading {
  font-weight: 300;
}

.page-gallery .fl-hero__scroll {
  letter-spacing: 0.28em;
}

/* No cards / borders / shadows on this page */

.page-gallery .fl-gallery__figure,
.page-gallery .fl-story__media,
.page-gallery .fl-gallery__img,
.page-gallery .fl-story__img {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.page-gallery .fl-gallery__figure:hover .fl-gallery__img,
.page-gallery .fl-story__media:hover .fl-story__img {
  transform: none;
  filter: none;
  box-shadow: none;
}

.page-gallery .fl-gallery__intro p {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
}

/* ------------------------------------------------------------------ */

/* Editorial Intro — quiet magazine opener                            */

/* ------------------------------------------------------------------ */

.page-gallery #intro {
  padding-block: clamp(7rem, 18vh, 13rem);
  background: radial-gradient(ellipse 70% 55% at 82% 40%, rgba(255, 79, 163, 0.156), transparent 58%), linear-gradient(180deg, #0d0d12 0%, #060608 100%);
}

/* "FLAMINGO" is an 8-character Latin word that cannot break, so at the old
   size it ran straight out of its column and the image painted over it.
   Size it to the column, and keep a break of last resort so no viewport
   can reproduce the overlap. */

.page-gallery #intro .fl-story__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.page-gallery #intro .fl-story__title {
  overflow-wrap: break-word;
  font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  max-width: 12ch;
}

.page-gallery #intro .fl-story__description p {
  max-width: 26ch;
}

.page-gallery #intro .fl-story__description p:first-child {
  color: #f2f2f2;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
}

.page-gallery #intro .fl-story__img {
  aspect-ratio: 4 / 5;
  object-position: center 35%;
}

@media (min-width: 900px) {

  .page-gallery #intro .fl-story__grid {
    grid-template-columns: minmax(var(--fl-text-min), 1fr) minmax(var(--fl-image-min), 1fr);
    gap: clamp(3.5rem, 9vw, 7.5rem);
  }
}

/* ------------------------------------------------------------------ */

/* Night Life — dark, asymmetric film strip                           */

/* ------------------------------------------------------------------ */

.page-gallery #night-life {
  background: radial-gradient(ellipse 60% 50% at 20% 40%, rgba(255, 79, 163, 0.182), transparent 60%), linear-gradient(180deg, #0a0a0f 0%, #040405 100%);
}

.page-gallery #night-life .fl-gallery__label {
  color: rgba(255, 79, 163, 0.88);
}

@media (min-width: 1100px) {

  .page-gallery #night-life .fl-gallery__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .page-gallery #night-life .fl-gallery__grid > :nth-child(1) {
    grid-column: span 8;
  }

  .page-gallery #night-life .fl-gallery__grid > :nth-child(2) {
    grid-column: span 4;
  }

  .page-gallery #night-life .fl-gallery__grid > :nth-child(3) {
    grid-column: span 5;
  }

  .page-gallery #night-life .fl-gallery__grid > :nth-child(4) {
    grid-column: span 7;
  }

  .page-gallery #night-life .fl-gallery__grid > :nth-child(1) .fl-gallery__img {
    aspect-ratio: 16 / 9;
  }

  .page-gallery #night-life .fl-gallery__grid > :nth-child(2) .fl-gallery__img {
    aspect-ratio: 3 / 4;
  }

  .page-gallery #night-life .fl-gallery__grid > :nth-child(3) .fl-gallery__img {
    aspect-ratio: 4 / 5;
  }

  .page-gallery #night-life .fl-gallery__grid > :nth-child(4) .fl-gallery__img {
    aspect-ratio: 3 / 2;
  }
}

/* ------------------------------------------------------------------ */

/* Beach Lifestyle — airy widescreen chapters                         */

/* ------------------------------------------------------------------ */

.page-gallery #beach-lifestyle {
  background: linear-gradient(180deg, #080808 0%, #0c0b0a 40%, #0b0b0b 100%);
}

.page-gallery #beach-lifestyle .fl-gallery__header {
  margin-inline: auto;
  max-width: 36rem;
  text-align: center;
}

.page-gallery #beach-lifestyle .fl-gallery__intro p {
  margin-inline: auto;
}

@media (min-width: 1100px) {

  .page-gallery #beach-lifestyle .fl-gallery__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .page-gallery #beach-lifestyle .fl-gallery__grid > :nth-child(1) {
    grid-column: span 12;
  }

  .page-gallery #beach-lifestyle .fl-gallery__grid > :nth-child(2) {
    grid-column: span 6;
  }

  .page-gallery #beach-lifestyle .fl-gallery__grid > :nth-child(3) {
    grid-column: span 6;
  }

  .page-gallery #beach-lifestyle .fl-gallery__grid > :nth-child(4) {
    grid-column: span 12;
  }

  .page-gallery #beach-lifestyle.fl-gallery--count-3 .fl-gallery__grid > :nth-child(1) .fl-gallery__img {
    aspect-ratio: 21 / 9;
  }

  .page-gallery #beach-lifestyle .fl-gallery__grid > :nth-child(1) .fl-gallery__img,
  .page-gallery #beach-lifestyle .fl-gallery__grid > :nth-child(4) .fl-gallery__img {
    aspect-ratio: 21 / 9;
  }

  .page-gallery #beach-lifestyle .fl-gallery__grid > :nth-child(2) .fl-gallery__img,
  .page-gallery #beach-lifestyle .fl-gallery__grid > :nth-child(3) .fl-gallery__img {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 1099px) {

  .page-gallery #beach-lifestyle .fl-gallery__grid > :nth-child(1) .fl-gallery__img,
  .page-gallery #beach-lifestyle .fl-gallery__grid > :nth-child(4) .fl-gallery__img {
    aspect-ratio: 16 / 10;
  }
}

/* ------------------------------------------------------------------ */

/* Celebration — people-first, irregular magazine mosaic              */

/* ------------------------------------------------------------------ */

.page-gallery #celebration {
  background: radial-gradient(ellipse 55% 45% at 70% 30%, rgba(201, 161, 74, 0.156), transparent 60%), linear-gradient(180deg, #0d0d12 0%, #060608 100%);
}

.page-gallery #celebration .fl-gallery__header {
  margin-bottom: clamp(4rem, 10vw, 7rem);
}

@media (min-width: 1100px) {

  .page-gallery #celebration .fl-gallery__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .page-gallery #celebration .fl-gallery__grid > :nth-child(1) {
    grid-column: span 5;
  }

  .page-gallery #celebration .fl-gallery__grid > :nth-child(2) {
    grid-column: span 7;
  }

  .page-gallery #celebration .fl-gallery__grid > :nth-child(3) {
    grid-column: span 7;
  }

  .page-gallery #celebration .fl-gallery__grid > :nth-child(4) {
    grid-column: span 5;
  }

  .page-gallery #celebration .fl-gallery__grid > :nth-child(1) .fl-gallery__img,
  .page-gallery #celebration .fl-gallery__grid > :nth-child(4) .fl-gallery__img {
    aspect-ratio: 4 / 5;
  }

  .page-gallery #celebration .fl-gallery__grid > :nth-child(2) .fl-gallery__img,
  .page-gallery #celebration .fl-gallery__grid > :nth-child(3) .fl-gallery__img {
    aspect-ratio: 16 / 10;
  }
}

/* ------------------------------------------------------------------ */

/* Premium Details — closer crops, quieter denser rhythm              */

/* ------------------------------------------------------------------ */

.page-gallery #premium-details {
  background: linear-gradient(180deg, #0a0a0f 0%, #040405 100%);
}

.page-gallery #premium-details .fl-gallery__label {
  letter-spacing: 0.3em;
}

.page-gallery #premium-details .l-container {
  max-width: min(72rem, 100%);
}

@media (min-width: 900px) {

  .page-gallery #premium-details .fl-gallery__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.65rem, 1.2vw, 1rem);
  }

  .page-gallery #premium-details .fl-gallery__grid > :nth-child(n) {
    grid-column: auto;
  }

  .page-gallery #premium-details .fl-gallery__img {
    aspect-ratio: 1 / 1;
    object-position: center 35%;
  }
}

/* ------------------------------------------------------------------ */

/* Behind The Brand — reverse editorial split                         */

/* ------------------------------------------------------------------ */

.page-gallery #behind-the-brand {
  padding-block: clamp(7rem, 17vh, 12rem);
  background: radial-gradient(ellipse 65% 50% at 18% 48%, rgba(201, 161, 74, 0.208), transparent 58%), linear-gradient(180deg, #0e0c13 0%, #060506 100%);
}

.page-gallery #behind-the-brand .fl-story__title {
  font-size: clamp(2.25rem, 4.4vw, 3.6rem);
  max-width: 14ch;
  overflow-wrap: break-word;
}

.page-gallery #behind-the-brand .fl-story__description p:first-child {
  color: rgba(201, 161, 74, 0.92);
  font-family: var(--fl-font-display, "Cormorant Garamond", serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-style: italic;
  font-weight: 400;
  max-width: 18ch;
}

.page-gallery #behind-the-brand .fl-story__img {
  aspect-ratio: 3 / 4;
  object-position: center 30%;
}

@media (min-width: 900px) {

  /* Media was 1.2fr against 0.8fr of text, so the copy column collapsed to
       roughly 14 characters and every line broke after a word or two. And
       align-items:end dropped the photo to the bottom of a much taller text
       column, which read as the image having slid down the page. */

  .page-gallery #behind-the-brand .fl-story__grid {
    grid-template-columns: minmax(var(--fl-image-min), 0.95fr) minmax(var(--fl-text-min), 1.05fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: center;
  }
}

/* ------------------------------------------------------------------ */

/* Gallery Grid — final journal spread                                */

/* ------------------------------------------------------------------ */

.page-gallery #gallery-grid {
  padding-block: clamp(7.5rem, 19vh, 14rem);
  background: linear-gradient(180deg, #0c0a0b 0%, #0b0b0b 35%, #0b0b0b 100%);
}

.page-gallery #gallery-grid .fl-gallery__header {
  margin-inline: auto;
  margin-bottom: clamp(4rem, 10vw, 7rem);
  max-width: 36rem;
  text-align: center;
}

.page-gallery #gallery-grid .fl-gallery__intro p {
  margin-inline: auto;
}

@media (min-width: 1100px) {

  .page-gallery #gallery-grid .fl-gallery__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(1) {
    grid-column: span 7;
  }

  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(2) {
    grid-column: span 5;
  }

  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(3) {
    grid-column: span 4;
  }

  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(4) {
    grid-column: span 8;
  }

  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(5) {
    grid-column: span 8;
  }

  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(6) {
    grid-column: span 4;
  }

  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(1) .fl-gallery__img {
    aspect-ratio: 16 / 10;
  }

  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(2) .fl-gallery__img,
  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(3) .fl-gallery__img,
  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(6) .fl-gallery__img {
    aspect-ratio: 4 / 5;
  }

  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(4) .fl-gallery__img {
    aspect-ratio: 3 / 2;
  }

  .page-gallery #gallery-grid .fl-gallery__grid > :nth-child(5) .fl-gallery__img {
    aspect-ratio: 16 / 9;
  }
}

/* ------------------------------------------------------------------ */

/* CTA                                                                */

/* ------------------------------------------------------------------ */

.page-gallery #invite {
  padding-block: clamp(8rem, 20vh, 14rem) clamp(9rem, 22vh, 15rem);
  text-align: center;
  background: radial-gradient(ellipse 48% 38% at 50% 100%, rgba(255, 79, 163, 0.240), transparent 65%), linear-gradient(180deg, #0d0d12 0%, #060608 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.page-gallery #invite .l-container {
  display: flex;
  justify-content: center;
}

.page-gallery #invite .fl-story__grid {
  margin-inline: auto;
  max-width: 34rem;
  justify-items: center;
}

.page-gallery #invite .fl-story__label {
  color: var(--fl-gold, #c9a14a);
  letter-spacing: 0.3em;
}

.page-gallery #invite .fl-story__title {
  font-size: clamp(2.85rem, 5.6vw, 4.35rem);
  max-width: 12ch;
}

.page-gallery #invite .fl-story__description p {
  margin-inline: auto;
  max-width: 28ch;
}

.page-gallery #invite .fl-story__actions {
  margin-top: 3rem;
}

.page-gallery #invite .fl-story__actions .fl-btn {
  min-width: 14rem;
  background: transparent;
  border-color: rgba(255, 79, 163, 0.85);
  color: #fff;
}

.page-gallery #invite .fl-story__actions .fl-btn:hover,
.page-gallery #invite .fl-story__actions .fl-btn:focus-visible {
  background: var(--fl-pink, #d12b74);
  border-color: var(--fl-pink, #d12b74);
}

@media (max-width: 899px) {

  /* ------------------------------------------------------------------ */

  /* Tablet / Mobile rhythm                                             */

  /* ------------------------------------------------------------------ */

  .page-gallery .fl-gallery,
  .page-gallery #intro,
  .page-gallery #behind-the-brand {
    padding-block: clamp(4.5rem, 12vh, 7.5rem);
  }

  .page-gallery #invite {
    padding-block: clamp(5.5rem, 14vh, 8rem) clamp(6.5rem, 16vh, 10rem);
  }

  .page-gallery #beach-lifestyle .fl-gallery__header,
  .page-gallery #gallery-grid .fl-gallery__header {
    text-align: left;
  }

  .page-gallery #beach-lifestyle .fl-gallery__intro p,
  .page-gallery #gallery-grid .fl-gallery__intro p {
    margin-inline: 0;
  }
}

@media (min-width: 600px) and (max-width: 1099px) {

  .page-gallery #night-life .fl-gallery__grid > :nth-child(1) .fl-gallery__img,
  .page-gallery #celebration .fl-gallery__grid > :nth-child(2) .fl-gallery__img {
    aspect-ratio: 16 / 10;
  }
}

/* ================================================================== */

/* FINAL DIRECTOR PASS — Photography exhibition / asymmetrical        */

/* ================================================================== */

.page-gallery {
  --fl-dir-reveal-y: 1.5rem;
  --fl-dir-reveal-ms: 0.85s;
}

.page-gallery .fl-hero__content {
  text-align: left;
}

.page-gallery .fl-hero__heading {
  font-weight: 500;
}

.page-gallery .fl-hero__actions {
  justify-content: flex-start;
}

/* Unexpected crop language */

.page-gallery .fl-gallery__item:nth-child(3n) .fl-gallery__img {
  aspect-ratio: 4 / 5;
}

.page-gallery .fl-gallery__item:nth-child(3n + 1) .fl-gallery__img {
  aspect-ratio: 16 / 11;
}

.page-gallery .fl-gallery__item:nth-child(3n + 2) .fl-gallery__img {
  aspect-ratio: 1 / 1;
}

@media (min-width: 1100px) {

  .page-gallery .fl-gallery__grid {
    gap: clamp(0.45rem, 1vw, 0.9rem);
  }

  .page-gallery .fl-gallery__item:nth-child(odd) .fl-gallery__img {
    min-height: 18rem;
  }

  .page-gallery .fl-gallery__item:nth-child(even) .fl-gallery__img {
    min-height: 14rem;
  }
}

@media (prefers-reduced-motion: no-preference) {

  .page-gallery .fl-reveal.is-pending {
    transform: translateY(var(--fl-dir-reveal-y));
    transition-duration: var(--fl-dir-reveal-ms);
  }
}

.page-gallery .fl-gallery__intro {
  opacity: 0.65;
  font-size: 0.92rem;
}

.page-gallery .fl-gallery__intro p {
  max-width: 28ch;
}

.page-gallery .fl-gallery__item:nth-child(5n + 1) .fl-gallery__img {
  aspect-ratio: 16 / 10;
  object-position: center 35%;
}

.page-gallery .fl-gallery__item:nth-child(5n + 2) .fl-gallery__img {
  aspect-ratio: 3 / 4;
  object-position: center 20%;
}

.page-gallery .fl-gallery__item:nth-child(5n + 3) .fl-gallery__img {
  aspect-ratio: 1 / 1;
}

.page-gallery .fl-gallery__item:nth-child(5n + 4) .fl-gallery__img {
  aspect-ratio: 4 / 5;
  object-position: center 40%;
}

.page-gallery .fl-gallery__item:nth-child(5n + 5) .fl-gallery__img {
  aspect-ratio: 21 / 10;
  object-position: center 45%;
  max-height: 62vh;
}

.page-gallery .fl-story__img {
  aspect-ratio: 4 / 5;
  object-position: center 25%;
}

/* ================================================================== */

/* FINAL ART DIRECTION — Exhibition: images as architecture           */

/* ================================================================== */

.page-gallery .fl-gallery .l-container {
  max-width: 100%;
  padding-inline: clamp(0.4rem, 1.5vw, 1.25rem);
}

.page-gallery .fl-story .l-container {
  max-width: 52rem;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.page-gallery .fl-hero {
  min-height: 100svh;
  align-items: end;
}

.page-gallery .fl-hero__image,
.page-gallery .fl-hero__video {
  object-position: center 36%;
  /* No brightness/contrast correction here. Measured on the live images:
     this filter clipped 13-68% of every hero to flat white or flat black,
     which is what read as "hazy". The hero block already exposes
     --fl-hero-filter for genuine per-image correction from the editor.
     See FIX-15 — and FIX-06, which removed the same filter from the block
     stylesheet but left these nine page-level copies behind. */
}

.page-gallery .fl-hero__overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.9) 100%);
}

.page-gallery .fl-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 52rem;
  padding-bottom: clamp(2.5rem, 8vh, 5rem);
}

.page-gallery .fl-hero__heading {
  font-size: clamp(5.25rem, 14vw, 10rem);
  letter-spacing: -0.045em;
  line-height: 0.84;
  max-width: 8ch;
  margin-bottom: 1rem;
  font-style: normal;
  text-transform: none;
}

.page-gallery .fl-hero__subheading {
  max-width: 18ch;
  font-size: 0.9rem;
  opacity: 0.72;
  margin-bottom: 1.5rem;
}

.page-gallery .fl-hero__actions .fl-btn {
  min-height: 2.5rem;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
}

.page-gallery .fl-btn--primary {
  background: transparent;
  color: #fff;
}

.page-gallery .fl-btn--primary:hover,
.page-gallery .fl-btn--primary:focus-visible {
  background: rgba(255, 255, 255, 0.156);
  transform: none;
  box-shadow: none;
}

/* Visual walls — almost no text */

.page-gallery .fl-gallery {
  padding-block: clamp(2.5rem, 7vh, 5.5rem);
}

.page-gallery .fl-gallery__header {
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
  max-width: 18rem;
}

.page-gallery .fl-gallery__title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  letter-spacing: -0.03em;
  max-width: 9ch;
  line-height: 0.98;
}

.page-gallery .fl-gallery__label {
  letter-spacing: 0.3em;
  font-size: 0.62rem;
  opacity: 0.75;
}

.page-gallery .fl-gallery__intro {
  display: none;
}

.page-gallery .fl-gallery__item:nth-child(6n + 1) .fl-gallery__img {
  aspect-ratio: 16 / 9;
  max-height: 72vh;
  object-position: center 40%;
}

.page-gallery .fl-gallery__item:nth-child(6n + 2) .fl-gallery__img {
  aspect-ratio: 3 / 4;
  object-position: center 18%;
}

.page-gallery .fl-gallery__item:nth-child(6n + 3) .fl-gallery__img {
  aspect-ratio: 1 / 1;
}

.page-gallery .fl-gallery__item:nth-child(6n + 4) .fl-gallery__img {
  aspect-ratio: 4 / 5;
  object-position: center 35%;
}

.page-gallery .fl-gallery__item:nth-child(6n + 5) .fl-gallery__img {
  aspect-ratio: 5 / 4;
  object-position: center 45%;
}

.page-gallery .fl-gallery__item:nth-child(6n + 6) .fl-gallery__img {
  aspect-ratio: 21 / 9;
  max-height: 58vh;
  object-position: center 50%;
}

.page-gallery .fl-story {
  padding-block: clamp(5rem, 12vh, 9rem);
}

.page-gallery .fl-story__title {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
  max-width: 9ch;
}

.page-gallery .fl-story__description p {
  max-width: 26ch;
  opacity: 0.78;
}

/* ================================================================== */

/* FINAL EDITORIAL RHYTHM — predictable 8-item CSS Grid cycle         */

/* Supersedes earlier fixed nth-child(1..n) / 6n aspect experiments.  */

/* No masonry, translateY, or negative margins.                       */

/* ================================================================== */

.page-gallery .fl-gallery__grid {
  align-items: stretch;
}

@media (min-width: 600px) and (max-width: 1099px) {

  .page-gallery .fl-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-gallery .fl-gallery__grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1100px) {

  .page-gallery .fl-gallery__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .page-gallery .fl-gallery__grid > :nth-child(n) {
    grid-column: auto;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 1) {
    grid-column: span 8;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 2) {
    grid-column: span 4;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 3) {
    grid-column: span 4;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 4) {
    grid-column: span 8;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 5),
  .page-gallery .fl-gallery__grid > :nth-child(8n + 6),
  .page-gallery .fl-gallery__grid > :nth-child(8n + 7) {
    grid-column: span 4;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 8) {
    grid-column: 1 / -1;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 1):last-child,
  .page-gallery .fl-gallery__grid > :nth-child(8n + 3):last-child,
  .page-gallery .fl-gallery__grid > :nth-child(8n + 5):last-child {
    grid-column: 1 / -1;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 5):nth-last-child(2) {
    grid-column: span 6;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 6):last-child {
    grid-column: span 6;
  }
}

.page-gallery .fl-gallery__img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center center;
  max-height: none;
}

@media (min-width: 1100px) {

  .page-gallery .fl-gallery__grid > :nth-child(8n + 1) .fl-gallery__img,
  .page-gallery .fl-gallery__grid > :nth-child(8n + 4) .fl-gallery__img {
    aspect-ratio: 16 / 10;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 2) .fl-gallery__img,
  .page-gallery .fl-gallery__grid > :nth-child(8n + 3) .fl-gallery__img,
  .page-gallery .fl-gallery__grid > :nth-child(8n + 5) .fl-gallery__img,
  .page-gallery .fl-gallery__grid > :nth-child(8n + 6) .fl-gallery__img,
  .page-gallery .fl-gallery__grid > :nth-child(8n + 7) .fl-gallery__img {
    aspect-ratio: 4 / 5;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 8) .fl-gallery__img {
    aspect-ratio: 21 / 9;
    max-height: 56vh;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 1):last-child .fl-gallery__img,
  .page-gallery .fl-gallery__grid > :nth-child(8n + 3):last-child .fl-gallery__img,
  .page-gallery .fl-gallery__grid > :nth-child(8n + 5):last-child .fl-gallery__img {
    aspect-ratio: 21 / 9;
    max-height: 56vh;
  }

  .page-gallery .fl-gallery__grid > :nth-child(8n + 5):nth-last-child(2) .fl-gallery__img,
  .page-gallery .fl-gallery__grid > :nth-child(8n + 6):last-child .fl-gallery__img {
    aspect-ratio: 16 / 10;
  }

  /* Premium details: equal columns within the same CMS-safe grid system */

  .page-gallery #premium-details .fl-gallery__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .page-gallery #premium-details .fl-gallery__grid > :nth-child(n) {
    grid-column: span 3;
  }

  .page-gallery #premium-details .fl-gallery__img {
    aspect-ratio: 1 / 1;
    max-height: none;
  }
}

/* ================================================================== */

/* CRITICAL FIX — slot-auto gallery figures collapsed to 0 height.     */

/* The image-frame positions the viewport + img absolutely, so the     */

/* aspect-ratio set on .fl-gallery__img never gave the FIGURE height   */

/* and every cell rendered as a thin line. Return the gallery img and  */

/* viewport to normal flow on this page so each cell's aspect-ratio    */

/* sizes it and the photos become visible (crop/zoom preserved).       */

/* ================================================================== */

.page-gallery .fl-gallery__figure {
  min-height: 0;
}

.page-gallery .fl-gallery__figure.fl-image-frame--slot-auto {
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
}

.page-gallery .fl-gallery__figure .fl-image-frame__viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  margin: 0;
}

/* The FIXED-ROW MASONRY layer below gives every figure a real height from
   the grid row, so the image must fill that box again. Left in normal flow
   it rendered at its own intrinsic ratio and left dead space under every
   photo — which is why tiles looked like different sizes. */

.page-gallery .fl-gallery__figure .fl-gallery__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================================================================== */

/* ROBUST GALLERY SYSTEM (supersedes the position-dependent grids     */

/* above). Auto-fill + fixed-aspect cover cells: any image set stays  */

/* intact. !important re-asserts this over the older #section grids.   */

/* ================================================================== */

.page-gallery .fl-gallery__grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)) !important;
  grid-auto-flow: row dense !important;
  gap: clamp(0.6rem, 1vw, 1.1rem) !important;
}

.page-gallery .fl-gallery__grid > .fl-gallery__item {
  grid-column: auto !important;
  margin: 0;
  min-width: 0;
}

.page-gallery .fl-gallery__figure {
  overflow: hidden;
  background: #17151a;
}

@media (min-width: 600px) {

  .page-gallery .fl-gallery__grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)) !important;
  }

  .page-gallery .fl-gallery__grid > .fl-gallery__item:nth-child(6n + 1) {
    grid-column: span 2 !important;
  }

  .page-gallery .fl-gallery__grid > .fl-gallery__item:nth-child(6n + 1) .fl-gallery__figure {
    aspect-ratio: 16 / 11;
  }
}

@media (min-width: 1024px) {

  .page-gallery .fl-gallery__grid {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)) !important;
  }

  .page-gallery .fl-gallery__grid > .fl-gallery__item:nth-child(6n + 1) .fl-gallery__figure {
    aspect-ratio: 16 / 10;
  }

  .page-gallery .fl-gallery__grid > .fl-gallery__item:nth-child(6n + 4) {
    grid-column: span 2 !important;
  }

  .page-gallery .fl-gallery__grid > .fl-gallery__item:nth-child(6n + 4) .fl-gallery__figure {
    aspect-ratio: 3 / 2;
  }
}

@media (max-width: 599px) {

  .page-gallery .fl-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .page-gallery .fl-gallery__figure {
    aspect-ratio: 4 / 5;
  }
}

/* ================================================================== */

/* FIXED-ROW MASONRY (supersedes the aspect-ratio override above).     */

/* Every cell spans the same rows → identical height → zero gaps.      */

/* Feature cells only get wider (column span). Figure fills the cell.  */

/* ================================================================== */

.page-gallery .fl-gallery__grid {
  grid-auto-rows: 8.5rem !important;
}

.page-gallery .fl-gallery__grid > .fl-gallery__item {
  grid-row: span 2 !important;
}

.page-gallery .fl-gallery__figure,
.page-gallery .fl-gallery__grid > .fl-gallery__item:nth-child(6n + 1) .fl-gallery__figure,
.page-gallery .fl-gallery__grid > .fl-gallery__item:nth-child(6n + 4) .fl-gallery__figure {
  aspect-ratio: auto !important;
  height: 100% !important;
}

@media (min-width: 1024px) {

  .page-gallery .fl-gallery__grid {
    grid-auto-rows: 9.5rem !important;
  }
}

@media (max-width: 599px) {

  .page-gallery .fl-gallery__grid {
    grid-auto-rows: 6.75rem !important;
  }

  .page-gallery .fl-gallery__grid > .fl-gallery__item {
    grid-column: auto !important;
  }
}
