.product-gallery-wrapper {
  width: 100%;
  margin-top: 1rem;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  height: 60vh;
}

.product-gallery-top {
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  border-radius: 0.7rem;
}

.product-gallery-top.inactive::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(128, 128, 128, 0.5); 
  z-index: 101;
  pointer-events: none; 
}


.product-gallery-top.inactive::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  background: url("../img/scroll-transparent.gif") no-repeat center center;
  background-size: contain;
  transform: translate(-50%, -50%);
  z-index: 101;
  pointer-events: none;
}

.product-gallery-top-image {
  display: inline-block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-size: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-color: white;
}

.product-gallery-top-image img {
  object-fit: contain;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.product-gallery-top-carousel-track {
  transition: transform 0.3s;
  position: relative;
  cursor: pointer;
  width: 100%;
  font-size: 0;
  position: relative;
  z-index: 100;
  height: 100%;
}

.product-gallery-bottom-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-right: 20px;
}

.product-gallery-back {
  height: fit-content;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  cursor: pointer;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
}

.product-gallery-forward {
  height: fit-content;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  cursor: pointer;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
}

.product-gallery-back img {
  transform: rotate(90deg);
}

.product-gallery-forward img {
  transform: rotate(90deg);
}

.product-gallery-bottom {
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
  width: 100%;
}

.product-gallery-bottom-carousel-track {
  transition: transform 0.3s;
  position: relative;
  cursor: pointer;
  width: 100%;
  height: 100%;
  font-size: 0;
  box-sizing: border-box;
}

.product-gallery-bottom-image {
  box-sizing: border-box;
  display: flex;
  height: 20%; /* 100% / 5 visible items */
  font-size: 0px;
  padding:0.5% 0%;
  flex-shrink: 0;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
  box-sizing: border-box;
  width: 100%;
  border-radius: 0.5rem;
  transition: 300ms;
}

.product-gallery-bottom-image .thumbnail {
  background-color: white;
  border-radius: 0.5rem;
}

.thumbnail_image {
  border-radius: 0.5rem;
}

.product-gallery-bottom-image:hover {
  filter: brightness(0.9);
}

#product-lightbox-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  padding: 5rem 2rem 2rem;
  background: rgba(16, 24, 30, 0.82);
  backdrop-filter: blur(14px);
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  font-size: 0;
  box-sizing: border-box;
}

#product-lightbox-buttons {
  position: absolute;
  right: 2rem;
  top: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(65, 115, 139, 0.18);
  border-radius: 0.5rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

#product-lightbox-zoom-wrapper {
  display: flex;
  align-items: center;
  font-size: 1.25rem !important;
  gap: 0.35rem;
}

#product-lightbox-zoom {
  width: 9rem;
  accent-color: #41738b;
  cursor: pointer;
}

#product-lightbox-close {
  cursor: pointer;
  width: 1.1rem;
  height: auto;
  opacity: 0.72;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#product-lightbox-close:hover {
  opacity: 1;
  transform: scale(1.08);
}

#product-lightbox-zoom-wrapper label {
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  color: #26343b;
  line-height: 1;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
}

#product-lightbox-zoom-wrapper label:hover {
  background-color: rgba(65, 115, 139, 0.12);
}

#product-lightbox-carousel-main-wrapper {
  width: min(76vw, 1100px);
  height: 76vh;
  display: flex;
  align-items: center;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

#product-lightbox-carousel-main-left-button {
  height: 100%;
  width: 4.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
  transition: 0.3s ease-in-out;
  background-color: rgba(65, 115, 139, 0);
}

#product-lightbox-carousel-main-left-button:hover {
  background-color: rgba(65, 115, 139, 0.12);
}

#product-lightbox-carousel-main-left-button img {
  width: 1rem;
  opacity: 0.75;
}

#product-lightbox-carousel-main-right-button {
  height: 100%;
  width: 4.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
  transition: 0.3s ease-in-out;
  background-color: rgba(65, 115, 139, 0);
}

#product-lightbox-carousel-main-right-button:hover {
  background-color: rgba(65, 115, 139, 0.12);
}

#product-lightbox-carousel-main-right-button img {
  width: 1rem;
  opacity: 0.75;
}

#product-lightbox-main-carousel {
  width: calc(100% - 9rem);
  height: 100%;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

#product-lightbox-main-track {
  height: 100%;
  width: 100%;
  transition: transform 0.3s;
  touch-action: none;
}

#product-lightbox-main-image {
  display: inline-block;
  width: 100%;
  height: 100%;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
  cursor: grab;
}

#product-lightbox-main-image:active {
  cursor: grabbing;
}

#product-lightbox-main-image img {
  width: calc(100% - 2rem);
  height: calc(100% - 2rem);
  margin: 1rem;
  object-fit: contain;
  position: relative;
  z-index: -1;
  will-change: transform;
}

#product-lightbox-vertical-carousel-wrapper {
  width: min(16vw, 180px);
  height: 76vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

#product-lightbox-carousel-vertical-left-button {
  width: 100%;
  height: 5%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
  transition: 0.3s ease-in-out;
  background-color: rgba(65, 115, 139, 0);
}

#product-lightbox-carousel-vertical-left-button:hover {
  background-color: rgba(65, 115, 139, 0.12);
}

#product-lightbox-carousel-vertical-left-button img {
  height: 0.9rem;
  transform: rotate(90deg);
  opacity: 0.75;
}

#product-lightbox-carousel-vertical-right-button {
  width: 100%;
  height: 5%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
  transition: 0.3s ease-in-out;
  background-color: rgba(65, 115, 139, 0);
}

#product-lightbox-carousel-vertical-right-button:hover {
  background-color: rgba(65, 115, 139, 0.12);
}

#product-lightbox-carousel-vertical-right-button img {
  height: 0.9rem;
  transform: rotate(90deg);
  opacity: 0.75;
}

#product-lightbox-vertical-carousel {
  width: 100%;
  height: 90%;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  font-size: 0;
}

#product-lightbox-vertical-track {
  height: 100%;
  width: 100%;
  transition: transform 0.3s;
}

#product-lightbox-vertical-image {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
  width: 100%;
  height: 20%;
  padding: 0.4rem;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
  cursor: pointer;
}

#product-lightbox-vertical-image:hover {
  background-color: rgba(65, 115, 139, 0.08);
}

#product-lightbox-vertical-image img {
  height: calc(100% - 0.5rem);
  width: calc(100% - 0.5rem);
  padding: 0.25rem;
  object-fit: contain;
  border-radius: 0.35rem;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none;
  position: relative;
  z-index: -1;
}

@media screen and (max-width:1700px) {
  .product-gallery-bottom-image {
    height: 25%;
  }
}

@media screen and (max-width: 1023px) {
  .product-gallery-wrapper {
    gap:1rem;
    display: flex;
    flex-direction: column-reverse;
    height: auto;
  }

  .product-gallery-top {
    height: 30vh;
  }

  .product-gallery-bottom-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .product-gallery-bottom-carousel-track {
    height: auto;
  }

  .product-gallery-bottom-image {
    display: inline-flex;
    width: 31.33%;
    margin-left:1%;
    margin-right:1%;
    height: auto;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none;
    box-sizing: border-box;
  }

  #product-lightbox-vertical-carousel-wrapper {
    display: none;
  }

  #product-lightbox-carousel-main-wrapper {
    width: 100%;
    height: 70vh;
  }

  #product-lightbox-carousel-main-right-button {
    width: 3.25rem;
  }

  #product-lightbox-carousel-main-left-button {
    width: 3.25rem;
  }

  #product-lightbox-wrapper {
    padding: 4.75rem 0.75rem 1rem;
    background: rgba(16, 24, 30, 0.9);
    gap: 0;
  }

  #product-lightbox-buttons {
    right: 0.75rem;
    top: 0.75rem;
    max-width: calc(100% - 1.5rem);
    gap: 0.75rem;
  }

  #product-lightbox-zoom {
    width: 7rem;
  }

  #product-lightbox-main-carousel {
    width: calc(100% - 6.5rem);
  }

  #product-lightbox-main-image img {
    width: calc(100% - 1rem);
    height: calc(100% - 1rem);
    margin: 0.5rem;
  }
}

@media screen and (max-width: 767px) {
  #product-lightbox-carousel-main-left-button,
  #product-lightbox-carousel-main-right-button {
    width: 2.5rem;
  }

  #product-lightbox-main-carousel {
    width: calc(100% - 5rem);
  }

  #product-lightbox-zoom-wrapper {
    gap: 0.1rem;
  }

  #product-lightbox-zoom-wrapper label {
    width: 1.75rem;
    height: 1.75rem;
  }

  #product-lightbox-zoom {
    width: 5.75rem;
  }
}
