.carousel-3d {
    padding: 20px;
    -webkit-perspective: 1000px;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
.carousel-3d > * {
    flex: 0 0 auto;
}
.carousel-3d figure {
    margin: 0;
    width: 18%;
    -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;
}
@media screen and (max-width: 780px) {
    .carousel-3d figure {
        width: 40%;
    }
}

.carousel-3d figure img{
    border-radius: 15px;
}

.carousel-3d figure img,
.carousel-3d figure div {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
}
.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: 40px 0 0;
}
.carousel-3d nav button {
    padding: 5px 10px;
}

.carousel-3d .title{
    padding-left: 5px;
    padding-right: 5px;
    width: calc(100% - 40px);
    background: black;
    text-align: center;
    position: absolute;
    bottom: 0;
    color: wheat;
}
