.carousel-3d {
    padding: 20px;
    -webkit-perspective: 500px;
    perspective: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position:relative;
}


.carousel-3d::before {
    content: '';
    position: absolute;
    background: #0000004d;
    inset: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 0%;
    box-shadow: 0 0 600px 200px black;
}

.carousel-3d > * {
    flex: 0 0 auto;
}
.carousel-3d figure {
    margin: 0;
    width: 70%;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transition: -webkit-transform 0.5s;
    transition: transform 0.5s;
    transition: transform 0.5s, -webkit-transform 0.5s;
}
.carousel-3d figure img,
.carousel-3d figure div {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 0;
    border-radius: var(--border-radius-extra-large);
}
.carousel-3d figure img {
    user-select: none;
}
.carousel-3d figure div:not(:first-of-type),
.carousel-3d figure img:not(:first-of-type) {
    position: absolute;
    left: 0;
    top: 0;
}
.carousel-3d nav {
    display: flex;
    justify-content: center;
    margin: 20px 0 0;
}
.carousel-3d nav button {
    flex: 0 0 auto;
    margin: 0 5px;
    cursor: pointer;
    color: #337AB7;
    background: #BFE2FF;
    border: 1px solid #337AB7;
    padding: 5px 10px;
    font-weight: bold;
    transition: all .3s ease;

    &.next {
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
    }
   &.prev{
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
   }
}
.carousel-3d nav button:hover {
    color: #FFF;
    background: #337AB7;
}