.c-swatches {
  margin-bottom: $spacing-unit * 4;
}

.c-swatch {
  perspective: 1300px;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  position: relative;
  display: block;
  margin-bottom: $spacing-unit;
}

.c-swatch__inner {
  border: 1px solid palette(gray);
  cursor: pointer;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  position: relative;
  transform: translateY(0) scale(1,1);
  transition: all .3s cubic-bezier(0.165, 0.84, 0.44, 1);
  height: 0;
  padding-bottom: 100%;
  
  .is-clicked & {
    transform: scale(.99,.99);
  }
  
  &:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 5px 5px rgba(0,0,0,0.1);
    opacity: 1;
    transition: all .3s cubic-bezier(0.165, 0.84, 0.44, 1);
    
    .is-clicked & {
      opacity: 0;
    }
  }

}

.c-swatch__color {
  min-height: 3rem;
  border-radius: 3px;
  display: block;
  width: 100%;
}

.c-swatch__front,
.c-swatch__back {
  @include font-size(medium);
  @include font-weight(bold);
  
  backface-visibility: hidden;

  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}




.c-swatch__front {
  z-index: 2;
}
.c-swatch__back {
  transform: rotateY(180deg);
}