/**
 * Products Block
 * ----------------------------------------------------------------------------
 */

.block--products {
  position: relative;
  padding-top: $spacing--xxxlarge;
  color: $color-white;

  .block__wrapper {
    position: relative;
    z-index: z-index(positive);
  }

  .block__inner {
    text-align: center;

    &[data-animated-visible] {
      animation-delay: $duration;
    }
  }

  .block__title {
    font-size: rem-calc(60);
  }

  &::before,
  &::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  &::before {
    background-color: rgba($black, 0.4);
  }

  &::after {
    background: $gradient-to-white;
  }
}

.products {
  display: flex;
  flex-wrap: wrap;
  margin: $spacing--xxlarge -10px 0;

  &[data-animated-visible] {
    animation-delay: $duration * 2;
  }
}

.products__item {
  position: relative;
  margin: 0 10px 20px;
  background-color: $color-gray-5;
  text-align: center;
  box-shadow: $shadow;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  width: 100%;

  @include breakpoint(medium) {
    width: calc(50% - 20px);
  }

  @include breakpoint(large) {
    width: calc(33.3333% - 20px);
  }

  .products__add-to-cart {
  }

  .vo-add-to-cart {
    align-self: flex-end;

    .products__button {
      width: 100%;
    }

    .products__price {
      margin: 0;
      color: $black;
      float: right;
      position: relative;
      top: 10px;
      font-size: rem-calc(22);
    }

    .products__actions {
      padding: 15px;
      padding-bottom: 10px;

      & > div {
        display: inline-block;
      }
    }

    .products__button-qty {
      padding: 15px;
      padding-top: 0;
    }
  }
}

.products__image {
  margin-bottom: $spacing--small;
  display: block;
  height: 0;
  padding-bottom: 90%;
  overflow: hidden;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.products__item:not(.products__item--elyx-kit) {
  .products__image {
    background-size: 70%;
  }
}

.products__title {
  font-size: rem-calc(26);
  font-weight: 400;
  margin-bottom: 7px;
  color: $color-gray-45;

  a {
    color: $color-gray-45;

    &:hover, &:focus {
      color: $color-black;
    }
  }
}

.products__short-description {
  color: $color-gray-55;
  font-size: rem-calc(13);
  line-height: rem-calc(16);
  max-width: 228px;
  margin: 0 auto;
  margin-bottom: 16px;
}

.products__link {
  display: block;
  font-size: rem-calc(16);
  font-weight: 500;
  color: $color-black;
  margin-bottom: $spacing--small;

  &::after {
    @include add-arrow();

    margin-left: $spacing--xsmall;
  }
}

.products__button-wrapper {
  padding: 0 16px 16px 16px;
}

.products__button {
  width: 100%;
  text-align: center;
  margin: 0;

  @include breakpoint(medium) {
    width: auto;
  }
}

.products__button-text {
  font-weight: bold;
}

.products__button-price {
  &::before {
    content: '€';
  }
}

.products__actions {
  text-align: left;
  //display: flex;
  //justify-content: space-between;
  //padding: $spacing--small;
  border-top: 1px solid $color-gray-25;
}

.products__label {
  display: none;
  font-weight: bold;
  font-size: rem-calc(16);
  margin-bottom: $spacing--xsmall;
}

.products__price {
  font-weight: bold;
  font-size: rem-calc(26);
  line-height: rem-calc(28);
  margin: 32px 0;
}

.products__download-buttons {
  color: $color-black;
  border-top: 1px solid $color-gray-25;

  h4 {
    margin: .5rem 0;
    font-size: 1.5rem;
  }

  ul {
    list-style-type: none;
    font-size: 1.2rem;
    margin: 0 0 1rem 0;

    a:hover {
      text-decoration: underline;
    }
  }
}


.vo-add-to-cart {
  // Hide the default input
  input[type="radio"] {
    position: absolute;
    left: -9999px;
  }

  // Style the input label
  input[type="radio"] + label {
    margin: 0 0 0 0;
    padding: $spacing--xsmall $spacing--small;
    border: 1px solid transparent;
    font-size: rem-calc(16);
    font-weight: 500;

    &:hover, &:focus {
      border-color: $color-black;
    }
  }

  // Different styling for input label when input is checked
  input[type="radio"]:checked + label {
    border-color: $color-black;
    margin-bottom: rem-calc(5);
  }

  .quantity {
    margin: 0;
  }

  .quantity__input {
    padding: 10px 30px;
  }
}

.vo-add-to-cart.vo-add-to-cart--white {
  .products__actions {
    border-top: none;
  }

  label {
    color: $white;
  }

  // Style the input label
  input[type="radio"] + label {
    border: 1px solid transparent;
    font-size: rem-calc(16);
    font-weight: 500;

    &:hover, &:focus {
      border-color: $color-white;
    }
  }

  // Different styling for input label when input is checked
  input[type="radio"]:checked + label {
    border-color: $color-white;
    margin-bottom: rem-calc(5);
  }

  .quantity__change {
    color: $white;
  }

  .quantity__input {
    color: $white;
    border-color: transparent;
    background: rgba($white, .16);
  }

  .vo-add-to-cart__button {
    background: $white;
    color: $black;
    border-color: $white;

    &:hover, &:focus {
      color: $black;
      background: darken($white, 8%);
    }

    &:hover:focus,
    &:active {
      opacity: .7;
    }
  }
}
