.product-thumbs {
  isolation: isolate;
  overflow: visible;
}

.product-thumbs img {
  position: relative;
  z-index: 1;
  cursor: zoom-in;
  transform-origin: bottom center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .product-thumbs img:hover,
  .product-thumbs img:focus-visible {
    z-index: 20;
    transform: scale(2.15);
    box-shadow: 0 18px 44px rgba(10, 18, 28, 0.28);
    filter: saturate(1.03) contrast(1.02);
  }

  .product-thumbs img:first-child,
  .product-thumbs img:nth-child(4n + 1) {
    transform-origin: bottom left;
  }

  .product-thumbs img:last-child,
  .product-thumbs img:nth-child(4n) {
    transform-origin: bottom right;
  }
}

@media (max-width: 980px) and (hover: hover) and (pointer: fine) {
  .product-thumbs img:hover,
  .product-thumbs img:focus-visible {
    transform: scale(1.65);
  }

  .product-thumbs img:nth-child(odd) {
    transform-origin: bottom left;
  }

  .product-thumbs img:nth-child(even) {
    transform-origin: bottom right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-thumbs img {
    transition: none;
  }
}
