.amenities {
  display: none;
}

.intro {
  padding-bottom: 56px;
}

.gallery {
  padding-top: 56px;
  padding-bottom: 88px;
  scroll-margin-top: 100px;
}

.gallery-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: end;
  gap: 24px;
  margin-bottom: 30px;
}

.gallery-heading .eyebrow {
  margin-bottom: 12px;
}

.gallery-heading h2 {
  margin: 0;
  font-size: clamp(32px, 3.5vw, 46px);
  line-height: 1.3;
  letter-spacing: -.035em;
}

.gallery-controls {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 18px;
}

.gallery-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
}

.gallery-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 100%;
}

.gallery-filter {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgb(49 84 66 / 14%);
  border-radius: 999px;
  background: rgb(255 255 255 / 65%);
  box-shadow: 0 3px 10px rgb(49 84 66 / 3%);
  color: #46584b;
  font: 500 12px/1.4 "DM Sans", "Noto Sans Thai", sans-serif;
  white-space: nowrap;
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.gallery-filter:hover {
  background: #e8ede4;
}

.gallery-filter.is-active {
  border-color: var(--moss);
  background: var(--moss);
  box-shadow: 0 5px 14px rgb(49 84 66 / 15%);
  color: #fff;
}

.gallery-filter svg,
.gallery-zoom svg,
.lightbox-close svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.supplied-gallery {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 16px;
  height: clamp(420px, 44vw, 560px);
}

.supplied-gallery figure,
.supplied-gallery .photo-large {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #e4e4d9;
  box-shadow: 0 8px 24px rgb(31 45 36 / 9%);
}

.supplied-gallery .photo-large {
  grid-row: 1 / span 3;
}

.gallery-photo {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: zoom-in;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.gallery-photo::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgb(15 30 22 / 57%));
  pointer-events: none;
}

.supplied-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-touch-callout: none;
}

.gallery-caption {
  position: absolute;
  left: 18px;
  right: 65px;
  bottom: 17px;
  z-index: 1;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-shadow: 0 1px 5px rgb(0 0 0 / 20%);
}

.gallery-zoom {
  position: absolute;
  right: 14px;
  bottom: 13px;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 48%);
  border-radius: 50%;
  background: rgb(255 255 255 / 20%);
  box-shadow: 0 3px 12px rgb(0 0 0 / 8%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .2s ease;
}

.gallery-photo:hover .gallery-zoom,
.gallery-photo:focus-visible .gallery-zoom {
  background: rgb(255 255 255 / 40%);
}

.gallery-filter:focus-visible,
.gallery-photo:focus-visible,
.lightbox-close:focus-visible {
  outline: 3px solid #b5975b;
  outline-offset: 3px;
}

.gallery-photo:focus-visible {
  outline-offset: -4px;
}

.supplied-gallery:not([data-view="all"]) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: none;
  height: auto;
}

.supplied-gallery:not([data-view="all"]) figure {
  grid-row: auto;
  aspect-ratio: 3 / 2;
}

.supplied-gallery:not([data-view="all"])[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.supplied-gallery:not([data-view="all"])[data-count="1"] figure {
  aspect-ratio: 16 / 9;
}

.supplied-gallery figure[hidden] {
  display: none;
}

.gallery-hint {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body.lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: transparent;
  color: #fff;
}

.gallery-lightbox[open] {
  display: grid;
  place-items: center;
}

.gallery-lightbox::backdrop {
  background: rgb(10 20 15 / 85%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox-stage {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 100%;
}

.lightbox-image {
  display: block;
  width: 70vw;
  height: 70vh;
  height: 70dvh;
  object-fit: contain;
  filter: drop-shadow(0 18px 35px rgb(0 0 0 / 30%));
}

.lightbox-caption {
  max-width: 70vw;
  margin: 0;
  color: #edf1e7;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 50%;
  background: rgb(255 255 255 / 15%);
  color: #fff;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgb(255 255 255 / 28%);
}

.lightbox-close svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 1100px) {
  .gallery-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .gallery-controls {
    justify-items: start;
    gap: 14px;
  }

  .gallery-description {
    text-align: left;
  }

  .gallery-tools {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .intro {
    padding-bottom: 40px;
  }

  .gallery {
    padding-top: 40px;
    padding-bottom: 56px;
    scroll-margin-top: 88px;
  }

  .gallery-heading {
    margin-bottom: 24px;
  }

  .gallery-tools {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 3px 10px;
    scrollbar-width: thin;
    scrollbar-color: #c9d1c4 transparent;
  }

  .supplied-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 12px;
    height: auto;
  }

  .supplied-gallery figure,
  .supplied-gallery .photo-large {
    grid-row: auto;
    aspect-ratio: 3 / 2;
    border-radius: 14px;
  }

  .supplied-gallery[data-view="all"] figure:nth-child(-n+2) {
    grid-column: 1 / -1;
  }

  .gallery-caption {
    left: 12px;
    right: 53px;
    bottom: 12px;
    font-size: 12px;
  }

  .gallery-zoom {
    right: 10px;
    bottom: 10px;
    width: 32px;
    height: 32px;
  }

  .lightbox-caption {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .supplied-gallery,
  .supplied-gallery:not([data-view="all"]) {
    grid-template-columns: minmax(0, 1fr);
  }

  .supplied-gallery:not([data-view="all"])[data-count="1"] figure {
    aspect-ratio: 3 / 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-filter,
  .gallery-zoom,
  .supplied-gallery img {
    transition: none;
  }

  .supplied-gallery figure:hover img {
    transform: none;
  }
}
