.beadvGallery {
  --beadv-gallery-columns-desktop: 3;
  --beadv-gallery-columns-tablet: 2;
  --beadv-gallery-columns-mobile: 1;
  --beadv-gallery-gap: 16px;
  --beadv-gallery-radius: 6px;
  --beadv-gallery-control: #ffffff;
  --beadv-gallery-control-text: #151515;
  --beadv-gallery-border: rgba(20, 20, 20, 0.12);
  --beadv-gallery-overlay: rgba(0, 0, 0, 0.58);
  width: 100%;
}

.beadvGallery *,
.beadvGallery *::before,
.beadvGallery *::after {
  box-sizing: border-box;
}

.beadvGallery__notice {
  border: 1px dashed var(--beadv-gallery-border);
  border-radius: var(--beadv-gallery-radius);
  padding: 22px;
  color: #555;
  background: #f7f7f7;
}

.beadvGallery__mainStage {
  position: relative;
  overflow: hidden;
  border-radius: var(--beadv-gallery-radius);
  background: #111;
}

.beadvGallery__mainButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #111;
  color: inherit;
  cursor: zoom-in;
}

.beadvGallery__mainButton[disabled],
.beadvGallery__mainButton[aria-disabled="true"] {
  cursor: default;
}

.beadvGallery__mainImage,
.beadvGallery__gridImage,
.beadvGallery__thumbImage {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.beadvGallery__mainImage {
  height: auto;
  min-height: 280px;
  max-height: min(78vh, 780px);
  object-fit: contain;
  background: #111;
}

.beadvGallery--ratio-1-1 .beadvGallery__mainStage,
.beadvGallery--ratio-4-3 .beadvGallery__mainStage,
.beadvGallery--ratio-16-9 .beadvGallery__mainStage,
.beadvGallery--ratio-3-4 .beadvGallery__mainStage {
  aspect-ratio: 16 / 9;
}

.beadvGallery--ratio-1-1 .beadvGallery__mainStage { aspect-ratio: 1 / 1; }
.beadvGallery--ratio-4-3 .beadvGallery__mainStage { aspect-ratio: 4 / 3; }
.beadvGallery--ratio-16-9 .beadvGallery__mainStage { aspect-ratio: 16 / 9; }
.beadvGallery--ratio-3-4 .beadvGallery__mainStage { aspect-ratio: 3 / 4; }

.beadvGallery--ratio-1-1 .beadvGallery__mainImage,
.beadvGallery--ratio-4-3 .beadvGallery__mainImage,
.beadvGallery--ratio-16-9 .beadvGallery__mainImage,
.beadvGallery--ratio-3-4 .beadvGallery__mainImage {
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: contain;
}

.beadvGallery__nav {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  pointer-events: none;
}

.beadvGallery__arrow,
.beadvGalleryLightbox__arrow,
.beadvGalleryLightbox__close {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--beadv-gallery-control);
  color: var(--beadv-gallery-control-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.beadvGallery__arrow {
  pointer-events: auto;
}

.beadvGallery__arrow::before,
.beadvGalleryLightbox__arrow::before {
  content: "";
  display: block;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.beadvGallery__arrow--prev::before,
.beadvGalleryLightbox__arrow--prev::before {
  transform: rotate(-45deg) translate(1px, 1px);
}

.beadvGallery__arrow--next::before,
.beadvGalleryLightbox__arrow--next::before {
  transform: rotate(135deg) translate(1px, 1px);
}

.beadvGallery__caption {
  margin: 10px 0 0;
  color: #555;
  font-size: 0.92rem;
  line-height: 1.45;
}

.beadvGallery__thumbsWrap {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 0 28px 18px;
}

.beadvGallery__thumbs {
  display: flex;
  gap: 10px;
  justify-content: center;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 0;
  scrollbar-width: none;
}

.beadvGallery__thumbsWrap.has-scrollable-thumbs .beadvGallery__thumbs {
  justify-content: flex-start;
}

.beadvGallery__thumbs::-webkit-scrollbar {
  display: none;
}

.beadvGallery__thumbArrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--beadv-gallery-border);
  border-radius: 999px;
  background: #fff;
  color: #151515;
  cursor: pointer;
}

.beadvGallery__thumbArrow[disabled],
.beadvGallery__thumbArrow[aria-disabled="true"] {
  opacity: 0.36;
  cursor: default;
  box-shadow: none;
}

.beadvGallery__thumbArrow::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.beadvGallery__thumbArrow--prev::before {
  transform: rotate(-45deg) translate(1px, 1px);
}

.beadvGallery__thumbArrow--next::before {
  transform: rotate(135deg) translate(1px, 1px);
}

.beadvGallery__thumb {
  flex: 0 0 88px;
  width: 88px;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--beadv-gallery-radius);
  overflow: hidden;
  background: #ececec;
  cursor: pointer;
  scroll-snap-align: start;
  opacity: 0.72;
}

.beadvGallery__thumb.is-active {
  border-color: #151515;
  opacity: 1;
}

.beadvGallery__grid {
  display: grid;
  grid-template-columns: repeat(var(--beadv-gallery-columns-desktop), minmax(0, 1fr));
  gap: var(--beadv-gallery-gap);
}

.beadvGallery__gridItem {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--beadv-gallery-radius);
  overflow: hidden;
  background: #ececec;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}

div.beadvGallery__gridItem {
  cursor: default;
}

.beadvGallery--ratio-auto .beadvGallery__gridItem {
  aspect-ratio: 4 / 3;
}

.beadvGallery--ratio-1-1 .beadvGallery__gridItem { aspect-ratio: 1 / 1; }
.beadvGallery--ratio-4-3 .beadvGallery__gridItem { aspect-ratio: 4 / 3; }
.beadvGallery--ratio-16-9 .beadvGallery__gridItem { aspect-ratio: 16 / 9; }
.beadvGallery--ratio-3-4 .beadvGallery__gridItem { aspect-ratio: 3 / 4; }

.beadvGallery--layout-featured:not(.beadvGallery--cols-desktop-1) .beadvGallery__gridItem:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.beadvGallery--layout-masonry .beadvGallery__grid {
  display: block;
  column-count: var(--beadv-gallery-columns-desktop);
  column-gap: var(--beadv-gallery-gap);
}

.beadvGallery--layout-masonry .beadvGallery__gridItem {
  display: inline-block;
  break-inside: avoid;
  margin: 0 0 var(--beadv-gallery-gap);
  aspect-ratio: auto;
}

.beadvGallery--layout-masonry .beadvGallery__gridItem:nth-child(3n+1) .beadvGallery__gridImage {
  aspect-ratio: 4 / 5;
}

.beadvGallery--layout-masonry .beadvGallery__gridItem:nth-child(3n+2) .beadvGallery__gridImage {
  aspect-ratio: 1 / 1;
}

.beadvGallery--layout-masonry .beadvGallery__gridImage {
  height: auto;
  aspect-ratio: 4 / 3;
}

.beadvGallery__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--beadv-gallery-overlay);
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
}

.beadvGallery__gridCaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 14px 12px;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.35;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}

.beadvGalleryLightboxIsOpen {
  overflow: hidden;
}

.beadvGalleryLightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  color: #fff;
}

.beadvGalleryLightbox.is-open {
  display: block;
}

.beadvGalleryLightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.beadvGalleryLightbox__dialog {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(44px, 1fr) minmax(0, 1180px) minmax(44px, 1fr);
  grid-template-rows: 72px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 12px;
  padding: 18px;
}

.beadvGalleryLightbox__close {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  z-index: 2;
}

.beadvGalleryLightbox__close::before,
.beadvGalleryLightbox__close::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.beadvGalleryLightbox__close::before { transform: rotate(45deg); }
.beadvGalleryLightbox__close::after { transform: rotate(-45deg); }

.beadvGalleryLightbox__figure {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.beadvGalleryLightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.beadvGalleryLightbox__caption {
  max-width: 900px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.beadvGalleryLightbox__counter {
  grid-column: 2;
  grid-row: 3;
  justify-self: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.beadvGalleryLightbox__arrow--prev {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
}

.beadvGalleryLightbox__arrow--next {
  grid-column: 3;
  grid-row: 2;
  justify-self: center;
}

@media (max-width: 900px) {
  .beadvGallery__grid {
    grid-template-columns: repeat(var(--beadv-gallery-columns-tablet), minmax(0, 1fr));
  }

  .beadvGallery--layout-masonry .beadvGallery__grid {
    column-count: var(--beadv-gallery-columns-tablet);
  }

  .beadvGallery--layout-featured .beadvGallery__gridItem:first-child {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 600px) {
  .beadvGallery__mainImage {
    min-height: 220px;
    max-height: 68vh;
  }

  .beadvGallery__grid {
    grid-template-columns: repeat(var(--beadv-gallery-columns-mobile), minmax(0, 1fr));
  }

  .beadvGallery--layout-masonry .beadvGallery__grid {
    column-count: var(--beadv-gallery-columns-mobile);
  }

  .beadvGallery__nav {
    padding: 10px;
  }

  .beadvGallery__arrow,
  .beadvGalleryLightbox__arrow,
  .beadvGalleryLightbox__close {
    width: 38px;
    height: 38px;
  }

  .beadvGallery__thumb {
    flex-basis: 72px;
    width: 72px;
  }

  .beadvGallery__thumbsWrap {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
    padding: 0 14px 14px;
  }

  .beadvGallery__thumbArrow {
    width: 34px;
    height: 34px;
  }

  .beadvGalleryLightbox__dialog {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-rows: 58px minmax(0, 1fr) 44px;
    padding: 10px;
  }

  .beadvGalleryLightbox__image {
    max-height: calc(100vh - 150px);
  }
}
