.image-viewer-grid {
  max-width: var(--maxWidthBig);
  width: var(--baseWidth);
  margin-inline: auto;
}
.image-viewer-grid .viewer-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media only screen and (max-width: 1024px) {
  .image-viewer-grid .viewer-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media only screen and (max-width: 640px) {
  .image-viewer-grid .viewer-grid-container {
    grid-template-columns: repeat(1, 1fr);
  }
}
.image-viewer-grid .grid-placeholder-notice {
  text-align: center;
  padding: 40px;
  border: 2px dashed #444;
  color: #888;
}

.viewer-grid-item {
  display: block;
  position: relative;
  width: 100%;
  text-decoration: none;
  cursor: pointer;
}
.viewer-grid-item:hover .image-wrapper-square img {
  scale: 1.04;
}
.viewer-grid-item .image-wrapper-square {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background-color: #1a1a1a;
  overflow: hidden;
}
.viewer-grid-item .image-wrapper-square img {
  width: 100%;
  height: 100%;
  background-color: var(--lightGray);
  object-fit: cover;
  display: block;
  transition: scale 0.4s ease;
}

.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.gallery-lightbox.is-active {
  opacity: 1;
  visibility: visible;
}
.gallery-lightbox .lightbox-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(5px);
}
.gallery-lightbox .lightbox-slides-container {
  position: relative;
  width: 85%;
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
@media (max-width: 767px) {
  .gallery-lightbox .lightbox-slides-container {
    width: 90%;
  }
}
.gallery-lightbox .lightbox-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}
.gallery-lightbox .lightbox-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.gallery-lightbox .lightbox-image-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1/1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  background: #000;
}
.gallery-lightbox .lightbox-image-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.gallery-lightbox .lightbox-image-wrapper .tile-white-frame {
  top: 4%;
  bottom: 4%;
  left: 4%;
  right: 4%;
}
.gallery-lightbox .lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  z-index: 20;
  padding: 10px;
  transition: scale 0.2s ease;
}
.gallery-lightbox .lightbox-close:hover {
  scale: 1.1;
}
@media (max-width: 767px) {
  .gallery-lightbox .lightbox-close {
    top: 15px;
    right: 15px;
  }
}
.gallery-lightbox .lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  cursor: pointer;
  z-index: 20;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.gallery-lightbox .lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}
.gallery-lightbox .lightbox-arrow.prev {
  left: 30px;
}
@media only screen and (max-width: 768px) {
  .gallery-lightbox .lightbox-arrow.prev {
    left: 10px;
  }
}
.gallery-lightbox .lightbox-arrow.next {
  right: 30px;
}
@media only screen and (max-width: 768px) {
  .gallery-lightbox .lightbox-arrow.next {
    right: 10px;
  }
}
@media only screen and (max-width: 768px) {
  .gallery-lightbox .lightbox-arrow {
    padding: 10px;
  }
}