.tr-image-gallery {
  width: 100%;
  display: flex;
  gap: 12px;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.single-product .tr-image-gallery {
  float: left;
  margin-right: 2%;
}

.elementor .tr-image-gallery {
  float: none;
  width: 100%;
}

.single-product .product::after {
  content: "";
  display: table;
  clear: both;
}

.tr-thumb-wrapper {
  width: 18%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tr-thumb-slider {
  overflow-y: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tr-thumb-slider::-webkit-scrollbar {
  display: none;
}

.tr-thumb-item {
  width: 100%;
  aspect-ratio: 1/1;
  margin-bottom: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  box-sizing: border-box;
  border-color: #000;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.tr-thumb-item.active {
  border-color: #000;
  opacity: 1;
}

.tr-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tr-thumb-arrow {
  width: 100%;
  background: var(--tr-primary);
  color: #fff;
  border: none;
  padding: 1px 0;
  cursor: pointer;
}

.tr-main-image {
  width: 82%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.tr-main-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.tr-main-slide.active {
  transform: translateX(0);
  z-index: 2;
}

.tr-main-slide.prev {
  transform: translateX(-100%);
  z-index: 1;
}

.tr-main-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tr-main-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  font-size: 26px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tr-main-prev {
  left: 10px;
}

.tr-main-next {
  right: 10px;
}

.tr-main-image:hover .tr-main-nav,
.tr-main-image.show-arrows .tr-main-nav {
  opacity: 1;
  pointer-events: auto;
}

.tr-zoom-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tr-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.tr-zoom-overlay.active {
  display: flex;
}

.tr-zoom-overlay img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.tr-zoom-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgb(235 94 94/85%);
  border: none;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tr-zoom-close::before {
  content: "×";
  font-size: 40px;
  color: #fff;
  line-height: 1;
  font-weight: 300;
}

.tr-zoom-counter {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  z-index: 10001;
  pointer-events: none;
}

.tr-zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  font-size: 26px;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tr-zoom-prev {
  left: 12px;
}

.tr-zoom-next {
  right: 12px;
}

@media (max-width: 768px) {
  .single-product .tr-image-gallery {
    width: 100%;
    margin-right: 0;
    float: none;
  }

  .tr-thumb-item {
    margin-bottom: 2px;
  }

  .tr-zoom-counter {
    font-size: 13px;
    padding: 5px 9px;
    top: 12px;
    left: 12px;
  }

  .tr-zoom-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

.tr-single-product {
  margin: 16px 0;
}

.tr-single-product__wrapper {
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.tr-image-gallery {
  width: 48%;
  margin-right: 2%;
}

.tr-summary {
  width: 48%;
}

@media (max-width: 991px) {
  .tr-single-product__wrapper {
    flex-direction: column;
    gap: 25px;
  }

  .tr-image-gallery,
  .tr-summary {
    width: 100%;
    margin-right: 0;
  }
}