.gms-gallery {
  max-height: min(760px, 82vh);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #d3a43a #161616;
  width: 100%;
}

.gms-gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  max-width: none;
  padding: 0;
  width: 100%;
}

.gms-gallery__item {
  margin: 0;
  min-width: 0;
}

.gms-gallery__button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #181818;
  cursor: zoom-in;
}

.gms-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gms-gallery__button:hover .gms-gallery__image,
.gms-gallery__button:focus-visible .gms-gallery__image {
  transform: scale(1.04);
}

.gms-gallery__button:focus-visible {
  outline: 3px solid #d3a43a;
  outline-offset: 3px;
}

.gms-gallery__caption {
  display: none;
}

.gms-gallery__actions {
  margin-top: 28px;
  text-align: center;
}

.gms-gallery__more {
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid #d3a43a;
  border-radius: 4px;
  color: #161616;
  background: #d3a43a;
  font-weight: 700;
  cursor: pointer;
}

.gms-gallery__more[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.gms-gallery__empty {
  text-align: center;
}

.gms-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.9);
}

.gms-gallery-lightbox.is-open {
  display: flex;
}

.gms-gallery-lightbox__dialog {
  position: relative;
  width: min(1100px, 100%);
  max-height: calc(100vh - 56px);
}

.gms-gallery-lightbox__image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  background: #111;
}

.gms-gallery-lightbox__caption {
  min-height: 48px;
  padding: 14px 52px 0;
  color: #fff;
  text-align: center;
}

.gms-gallery-lightbox__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.gms-gallery-lightbox__description {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.5;
}

.gms-gallery-lightbox__close,
.gms-gallery-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.gms-gallery-lightbox__close {
  top: -18px;
  right: -18px;
}

.gms-gallery-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.gms-gallery-lightbox__nav--prev {
  left: -18px;
}

.gms-gallery-lightbox__nav--next {
  right: -18px;
}

.gms-gallery-lightbox__close:focus-visible,
.gms-gallery-lightbox__nav:focus-visible {
  outline: 3px solid #d3a43a;
  outline-offset: 3px;
}

body.gms-gallery-lightbox-open {
  overflow: hidden;
}

@media (max-width: 991px) {
  .gms-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .gms-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0;
  }

  .gms-gallery-lightbox {
    padding: 14px;
  }

  .gms-gallery-lightbox__image {
    max-height: calc(100vh - 132px);
  }

  .gms-gallery-lightbox__close {
    top: 8px;
    right: 8px;
  }

  .gms-gallery-lightbox__nav--prev {
    left: 8px;
  }

  .gms-gallery-lightbox__nav--next {
    right: 8px;
  }

  .gms-gallery-lightbox__caption {
    padding-right: 0;
    padding-left: 0;
  }
}
