.product-gallery {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: #f3eee4;
}

.product-slides {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.product-slides::-webkit-scrollbar {
  display: none;
}

.product-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #f3eee4;
}

.product-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.product-gallery-dots {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 11px;
  left: 12px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: auto;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(11, 48, 72, 0.58);
  box-shadow: 0 6px 18px rgba(11, 48, 72, 0.18);
  backdrop-filter: blur(8px);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.product-gallery-dots::-webkit-scrollbar {
  display: none;
}

.product-gallery-dot {
  position: relative;
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  transition: width 0.22s ease;
}

.product-gallery-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  transform: translate(-50%, -50%);
  transition: width 0.22s ease, background-color 0.22s ease,
    transform 0.22s ease;
}

.product-gallery-dot:hover {
  background: transparent;
}

.product-gallery-dot:hover::before {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.12);
}

.product-gallery-dot[aria-current="true"] {
  width: 28px;
  background: transparent;
}

.product-gallery-dot[aria-current="true"]::before {
  width: 19px;
  background: #fff;
}

.product-gallery:focus-visible {
  z-index: 2;
  outline: 3px solid rgba(158, 47, 43, 0.28);
  outline-offset: 3px;
}

@media (max-width: 500px) {
  .product-gallery {
    height: 170px;
  }

  .product-gallery-dots {
    bottom: 8px;
    gap: 5px;
    padding: 6px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-slides {
    scroll-behavior: auto;
  }

  .product-gallery-dot {
    transition: none;
  }
}
