/**
 * AnimateBox.dev — 3D Flip Slider
 * https://animatebox.dev
 */

.ab-3d-flip-slider {
  --ab-flip-bg: #0b0b0c;
  --ab-flip-frame: #141414;
  --ab-flip-radius: 18px;
  --ab-flip-font: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
  --ab-flip-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.65),
    0 12px 28px -12px rgba(0, 0, 0, 0.5);

  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  background: var(--ab-flip-bg);
  font-family: var(--ab-flip-font);
}

.ab-3d-flip-slider:active {
  cursor: grabbing;
}

.ab-3d-flip-slider__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 500;
  width: 14%;
  min-width: 4rem;
  pointer-events: none;
}

.ab-3d-flip-slider__fade--left {
  left: 0;
}

.ab-3d-flip-slider__fade--right {
  right: 0;
}

.ab-3d-flip-slider__stage {
  position: absolute;
  inset: 0;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
}

/* Transform shell only — do not put overflow/radius here (3D bleed). */
.ab-3d-flip-slider__card {
  position: absolute;
  top: 50%;
  left: 50%;
  background: transparent;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: flat;
}

.ab-3d-flip-slider__frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ab-flip-frame);
  border-radius: var(--ab-flip-radius);
  box-shadow: var(--ab-flip-shadow);
  /* Clip + radius on the flat child (not the 3D shell) avoids edge bleed */
  clip-path: inset(0 round var(--ab-flip-radius));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.ab-3d-flip-slider__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0) 45%
  );
}

.ab-3d-flip-slider__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ab-3d-flip-slider__source {
  display: none;
}
