.ivps-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
  box-sizing: border-box;
}

.ivps-base-background,
.ivps-background,
.ivps-background-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* General color/image background configured on the parent slider. */
.ivps-base-background {
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
}

/* Animated backgrounds configured on each individual slide. */
.ivps-background {
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.ivps-background-layer {
  opacity: 0;
  background-color: transparent;
  background-image: none;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: opacity;
}

/*
 * Padding is applied to this shell through the native Bricks dimensions
 * control. Keeping it outside .ivps-stage makes top/bottom spacing increase
 * the real slider box without changing the product animation coordinates.
 */
.ivps-stage-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
}

.ivps-stage {
  position: relative;
  width: 100%;
  height: clamp(430px, 48vw, 650px);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.ivps-stage > .ivps-slide {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

.ivps-product-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(200px, 25vw, 390px);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  opacity: 0;
  will-change: transform, opacity;
}

.ivps-product-wrap > * {
  max-width: 100%;
}

.ivps-product-wrap > .brxe-image,
.ivps-product-wrap figure.brxe-image {
  width: 100%;
  margin: 0;
}

.ivps-product-wrap img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 580px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 767px) {
  .ivps-stage {
    height: 520px;
  }

  .ivps-product-wrap {
    width: min(62vw, 300px);
  }
}

@media (max-width: 480px) {
  .ivps-stage {
    height: 470px;
  }

  .ivps-product-wrap {
    width: min(68vw, 280px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ivps-background-layer {
    transition-duration: 0.01ms !important;
  }
}
