* {
  box-sizing: border-box;
}

.product-modal__overlay {
  width: 100%;
  height: 100vh;
  padding: 30px;
  position: fixed;
  top: 0;
  left: 0;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 1002;
}

.product-modal__overlay--closed {
  display: none;
}
.product-modal__overlay--opened {
  display: flex;
}

.product-modal__wrapper {
  width: 60%;
  min-width: 800px;
  max-height: 900px;
  height: 100%;
  padding: 40px 40px 20px;
  position: relative;
  background-color: white;
}
.product-modal__viewport {
  height: 100%;
  scrollbar-width: none;
  overflow-x: scroll;
}

.product-modal__container {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1);
  gap: 20px;
}

.product-modal__image-wrapper {
  flex: 0 0 calc((100% - 20px) / 1.3);
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-modal__image {
  /* margin: 0 auto; */
  width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-modal__close {
  position: absolute;
  top: 20px;
  right: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.product-modal__close:focus,
.product-modal__close:focus-visible {
  outline: none;
}
.product-modal__close::after {
  content: "close";
  font-family: "Material Icons", sans-serif;
  font-weight: 900;
}

.nextArrow,
.prevArrow {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  font-size: 30px;
  border: none;
  background: transparent;
  z-index: 100;
  cursor: pointer;
}
.nextArrow {
  right: 0px;
}
.nextArrow::before {
  content: "keyboard_arrow_right";
  font-family: "Material Icons", sans-serif;
}

.prevArrow {
  left: 0px;
}
.prevArrow::before {
  content: "keyboard_arrow_left";
  font-family: "Material Icons", sans-serif;
}

.prevArrow:focus,
.prevArrow:focus-visible,
.nextArrow:focus,
.nextArrow:focus-visible {
  outline: none;
  box-shadow: none;
}

@media (max-width: 900px) {
  .product-modal__wrapper {
    width: 100%;
    min-width: auto;
    height: max-content;
    /* padding: 50px 20px; */
  }
}
@media (max-width: 500px) {
  .product-modal__wrapper {
    width: 100%;
    min-width: auto;
    height: max-content;
    /* padding: 20px; */
  }
  .product-modal__overlay {
    padding: 15px;
  }
  /* .product-modal__close {
    top: 0px;
    right: 0;
  } */
}
