body {
  overflow: auto;
}

.carousel {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  align-items: end;
  padding-bottom: 25px;
  z-index: 400;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  overflow: auto;
}

.gallery-wrap {
  width: max-content;
  height: max-content;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
}

.gallery-carousel {
  width: 900px;
  object-fit: cover;
  display: flex;
  overflow-x: scroll;
  scroll-behavior: smooth;
}

.gallery-carousel::-webkit-scrollbar {
  display: none;
}

.foward-button {
  width: 50px;
  cursor: pointer;
  margin: 40px;
  background: transparent;
}

.backward-button {
  width: 50px;
  cursor: pointer;
  margin: 40px;
  background: transparent;
}

.exit-button {
  width: 50px;
  cursor: pointer;
  background: transparent;
  margin-top: 25px;
  margin-right: 35px;
  margin-bottom: 10px;
  display: inline-block;
}

.images-gallery-main-carousel {
  width: 900px;
  height: auto;
  object-fit: cover;
  height: auto;
  display: grid;
  grid-template-columns: auto auto auto;
  grid-gap: 20px;
  align-items: center;
  justify-content: center;
  flex: none;
}

.gallery-carousel-image1 {
  width: 100%;
}

.gallery-carousel-image2 {
  width: 100%;
}

.gallery-carousel-image3 {
  width: 100%;
}

.gallery-carousel-image4 {
  width: 100%;
}

.gallery-carousel-image5 {
  width: 100%;
}

.gallery-carousel-image6 {
  width: 100%;
}

@media (min-width: 750px) and (max-width: 1000px) {
  body {
    overflow: auto;
  }

  .carousel {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    align-items: end;
    padding-bottom: 25px;
    z-index: 400;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: auto;
  }

  .gallery-wrap {
    width: 100%;
    height: max-content;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: auto;
  }

  .gallery-carousel {
    width: 700px;
    object-fit: cover;
    display: flex;
    overflow-x: scroll;
    scroll-behavior: smooth;
    align-items: center;

  }

  .gallery-carousel::-webkit-scrollbar {
    display: none;
  }

  .foward-button {
    width: 50px;
    cursor: pointer;
    margin: 40px;
    background: transparent;
  }

  .backward-button {
    width: 50px;
    cursor: pointer;
    margin: 40px;
    background: transparent;
  }

  .exit-button {
    width: 50px;
    cursor: pointer;
    background: transparent;
    margin-top: 25px;
    margin-right: 35px;
    margin-bottom: 10px;
    display: inline-block;
  }

  .images-gallery-main-carousel {
    width: 700px;
    height: 700px;
    object-fit: cover;
    height: auto;
    display: block;

  }

  .gallery-carousel-image1 {
    width: 100%;
    height: auto;
  }

  .gallery-carousel-image2 {
    width: 100%;
    height: auto;
  }

  .gallery-carousel-image3 {
    width: 100%;
    height: auto;
  }

  .gallery-carousel-image4 {
    width: 100%;
    height: auto;
  }

  .gallery-carousel-image5 {
    width: 100%;
    height: auto;
  }

  .gallery-carousel-image6 {
    width: 100%;
    height: auto;
  }
}

@media (min-width: 500px) and (max-width: 749px) {
  body {
    overflow: auto;
  }

  .carousel {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    align-items: end;
    padding-bottom: 25px;
    z-index: 400;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: auto;
  }

  .gallery-wrap {
    width: 500px;
    height: auto;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: auto;
  }


  .foward-button {
    display: none;
  }

  .backward-button {
    display: none;
  }

  .exit-button {
    width: 50px;
    cursor: pointer;
    background: transparent;
    margin-top: 25px;
    margin-right: 35px;
    margin-bottom: 10px;
    display: inline-block;
  }

  .images-gallery-main-carousel {
    width: 500px;
    height: auto;
    object-fit: cover;
    display: block;
  }
}

@media (min-width: 300px) and (max-width: 500px) {
  body {
    overflow: auto;
  }

  .carousel {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    align-items: end;
    padding-bottom: 25px;
    z-index: 400;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: auto;
    box-sizing: border-box;
  }

  .gallery-wrap {
    width: 300px;
    height: auto;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: auto;
  }


  .foward-button {
    display: none;
  }

  .backward-button {
    display: none;
  }

  .exit-button {
    width: 50px;
    cursor: pointer;
    background: transparent;
    margin-top: 25px;
    margin-right: 35px;
    margin-bottom: 10px;
    display: inline-block;
  }

  .images-gallery-main-carousel {
    width: 300px;
    height: auto;
    object-fit: cover;
    display: block;
  }

  .gallery-carousel-image1 {
    width: 300px;
    height: auto;
  }

  .gallery-carousel-image2 {
    width: 300px;
    height: auto;
  }

  .gallery-carousel-image3 {
    width: 300px;
    height: auto;
  }

  .gallery-carousel-image4 {
    width: 300px;
    height: auto;
  }

  .gallery-carousel-image5 {
    width: 300px;
    height: auto;
  }

  .gallery-carousel-image6 {
    width: 300px;
    height: auto;
  }
}