.gmp-gallery {
  width: 100%;
}

.gmp-gallery .gmp-track {
  display: grid;
  grid-template-columns: repeat(var(--gmp-cols-desktop), minmax(0, 1fr));
  gap: 16px;
}

.gmp-layout-carousel .gmp-track {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}

.gmp-layout-carousel .gmp-card {
  min-width: 260px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.gmp-card {
  cursor: pointer;
}

.gmp-media-box {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 16px;
  background: #f4f4f4;
}

.gmp-media-box img,
.gmp-media-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.gmp-lightbox-content img,
.gmp-lightbox-content video,
.gmp-lightbox-content iframe {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 0;
}

.gmp-caption {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.gmp-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
}

.gmp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gmp-lightbox[hidden] {
  display: none !important;
}

.gmp-lightbox-content {
  width: 100%;
  max-width: 900px;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gmp-lightbox-content > * {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  overflow: hidden;
}

.gmp-lightbox-caption {
  width: min(100%, 1100px);
  color: #fff;
  margin-top: 14px;
  text-align: center;
}

.gmp-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  background: #fff;
  color: #000;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 767px) {
  .gmp-gallery .gmp-track {
    grid-template-columns: repeat(var(--gmp-cols-mobile), minmax(0, 1fr));
    gap: 10px;
  }

  .gmp-layout-carousel .gmp-card {
    min-width: 82%;
  }
}