.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}
.gallery-header.no-title {
  justify-content: flex-end;
}
.gallery-footer {
  margin-top: 48px;
  display: flex;
  justify-content: flex-end;
}
.custom-gallery img {
  cursor: pointer;
}
.desktop-layout {
  display: block;
}

.large-image img {
  width: 100%;
}

.thumb-row {
  display: grid;
  gap: 22px;
  margin-top: 20px;
}

.thumb-row img {
  object-fit: cover;
}

.mobile-grid {
  display: none;
  grid-template-columns: repeat(2,1fr);
  gap: 10px;
}

.gallery-modal,
.thumb-gallery-modal {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  z-index: 9999;
}

.thumb-gallery-modal {
  background: #F2F2F2;
}


.modal-header {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px 20px;
}

.mainSwiper {
  flex: 1;
}
.back-btn {
  background: none;
  border: none;
}
/* .mainSwiper img {
  width: 100%;
} */

.caption {
  color: white;
  padding: 10px;
}

.thumbSwiper {
  padding: 10px;
}

.thumbSwiper .swiper-slide {
  width: 90px;
  height: 70px;
  opacity: .5;
}

.thumbSwiper .swiper-slide-thumb-active {
  opacity: 1;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: var(--color-black);
  display: flex;
  justify-content: center;
  align-items: center;
}



.swiper {
  width: 100%;
  height: 300px;
  margin-left: auto;
  margin-right: auto;
}

.swiper-slide {
  background-size: cover;
  background-position: center;
}



.thumbSwiper {
  height: 20%;
  box-sizing: border-box;
  padding: 10px 0;
}

.thumbSwiper .swiper-slide {
  width: 25%;
  height: 100%;
  opacity: 0.4;
}

.thumbSwiper .swiper-slide-thumb-active {
  opacity: 1;
}

.thumb-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-gallery-modal .modal-header {
  justify-content: end;
}
.mobile-grid img {
  width: 187px;
  height: 187px;
  object-fit: cover;
}

/* Responsive */
@media(min-width:768px){
  .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .back-icon,
  .close-btn {
    display: none;
  }
  .modal-header {
    position: absolute;
    top: -50px;
    right: -20px;
  }
  .gallery-wrapper {
    width: 800px;
    margin: auto;
    background: var(--color-white);
    padding: 20px 30px;
    position: relative;
  }
  .gallery-modal {
    background: rgb(242 242 242 / 80%);
  }
  .mainSwiper {
    height: 60vh;
    width: 100%;
  }
  .thumb-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .main-img {
    grid-column: span 3;
  }
  .sub-img {
    height: 257px;
  }
}
@media(max-width:768px){
  .desktop-layout { display:none; }
  .mobile-grid { display:grid; }
  .thumbSwiper { display:none; }
  .close-icon {
    display: none;
  } 
  .gallery-modal {
    background: var(--color-black);
  }
  .mainSwiper {
    height: 93vh;
    width: 100%;
  }
  .mainSwiper .swiper-slide img {
    border-radius: 5px;
  }
  .bottom-gallery-button {
    padding-top: 24px;
  }
}