.flip-container {
  perspective: 1000px;
  width: 300px;   /* adjust to your image size */
  height: 400px;  /* adjust to your image size */
  margin: 0 auto;
  cursor: pointer;
}

.flipper {
  transition: transform 3.0s ease;
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 100%;
}

.front, .back {
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.back {
  transform: rotateY(180deg);
}

img {
  width: 100%;
  height: 100%;
/*  object-fit: cover;*/
}