.rc-product-gallery {
  --rc-gallery-gap: 16px;
  --rc-thumbnail-gap: 0px;
  --rc-visible: 4;
}
.rc-product-gallery__main {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.rc-product-gallery__main img {
  display: block;
  width: 100%;
  height: auto;
}
.rc-product-gallery__thumbs-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-top: var(--rc-gallery-gap);
}
.rc-product-gallery__thumbs {
  display: flex;
  flex: 1;
  gap: var(--rc-thumbnail-gap);
  overflow: hidden;
  scroll-behavior: smooth;
}
.rc-product-gallery__thumbnail {
  flex: 0 0 calc((100% - (var(--rc-visible) - 1) * var(--rc-thumbnail-gap)) / var(--rc-visible));
  width: auto;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
}
.rc-product-gallery__thumbnail[aria-selected="true"] {
  border-color: currentColor;
}
.rc-product-gallery__thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.rc-product-gallery__arrow {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: 3rem;
  border: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.53), transparent);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}
.rc-product-gallery__arrow--previous {
  left: 0;
}
.rc-product-gallery__arrow--next {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.53), transparent);
}
.rc-product-gallery__modal {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
}
.rc-product-gallery__modal[hidden] {
  display: none;
}
.rc-product-gallery__modal img {
  max-width: calc(100vw - 8rem);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  user-select: none;
  pointer-events: none;
}
.rc-product-gallery__modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
.rc-product-gallery__modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}
.rc-product-gallery__modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 3.25rem;
  height: 3.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.rc-product-gallery__modal-arrow:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.08);
}
.rc-product-gallery__modal-arrow:active {
  transform: translateY(-50%) scale(0.95);
}
.rc-product-gallery__modal-arrow--previous {
  left: 1.5rem;
}
.rc-product-gallery__modal-arrow--next {
  right: 1.5rem;
}
.rc-product-gallery__modal-arrow--previous:empty::before {
  content: '‹';
}
.rc-product-gallery__modal-arrow--next:empty::before {
  content: '›';
}
@media (max-width: 768px) {
  .rc-product-gallery__modal {
    padding: 1rem;
  }
  .rc-product-gallery__modal img {
    max-width: calc(100vw - 4rem);
    max-height: 85vh;
  }
  .rc-product-gallery__modal-arrow {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }
  .rc-product-gallery__modal-arrow--previous {
    left: 0.5rem;
  }
  .rc-product-gallery__modal-arrow--next {
    right: 0.5rem;
  }
  .rc-product-gallery__modal-close {
    top: 1rem;
    right: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.5rem;
  }
}
