/*------------------------------------------------------------
PRODUCTS
====================================*/

/* Variables Custom */
$product-box-margin-bottom: 2rem;
$product-box-border-width: 0.1rem;
$product-box-border-color: $gray-200;
$product-box-border-color-hover: $black;
$product-box-review-nb-color: $black;

$product-title-font-family: $font-family-sans-serif;
$product-title-font-weight: $font-weight-sbold;

$product-brand-font-family: $font-family-serif;
$product-brand-font-weight: $font-weight-light;

$product-title-font-size-mobile: 1.2rem;
$product-brand-font-size-mobile: 1.2rem;

$product-title-font-size-desktop: 1.4rem;
$product-brand-font-size-desktop: 1.3rem;
/***************************************/

.product-box-container {
  display: flex;
  position: relative;
  flex-direction: column;
  margin-bottom: $product-box-margin-bottom;
  border-bottom: $product-box-border-width solid $product-box-border-color;
  transition: 0.3s;
  &:hover {
    border-bottom-color: $product-box-border-color-hover;
    .product-box-image-wrapper img {
      transform: scale(1.1);
    }
  }
}

.product-box-tag {
  position: absolute;
  top: 1.5rem;
  z-index: 1;
  .badge {
    float: left;
    clear: left;
    margin-bottom: 0.2rem;
  }
}

.product-box-image-wrapper {
  display: block;
  position: relative;
  overflow: hidden;
  img {
    transition: 0.3s;
  }
}

.product-box-text-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem;
}
.product-box-name {
  display: flex;
  flex-direction: column-reverse;
  margin-bottom: 0.5rem;
  text-decoration: none;
}
.product-box-complementary-name {
  font-family: $product-brand-font-family;
  font-weight: $product-brand-font-weight;
  font-size: $product-brand-font-size-mobile;
  text-transform: uppercase;
  color: $body-color;
  line-height: $headings-line-height;
  margin-bottom: $headings-margin-bottom;
}
.product-box-title {
  font-family: $product-title-font-family;
  font-weight: $product-title-font-weight;
  font-size: $product-title-font-size-mobile;
}

.product-box-review {
  display: none;
}

.product-box-price-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* RESPONSIVE */
/***************************************/
@include media-breakpoint-up(lg) {
  .product-box-tag {
    top: 2rem;
  }

  .product-box-text-wrapper {
    padding: 2rem 1rem;
  }
  .product-box-name {
    margin-bottom: 2.5rem;
  }
  .product-box-complementary-name {
    font-size: $product-brand-font-size-desktop;
  }
  .product-box-title {
    font-size: $product-title-font-size-desktop;
  }

  .product-box-review {
    display: flex;
    margin-top: auto;
    text-decoration: none;
  }
  .product-box-review-nb {
    margin-left: 0.9rem;
    color: $product-box-review-nb-color;
  }


  .product-box-review + .product-box-price-wrapper {
    margin-top: 0;
  }
  .product-box-price-wrapper {
    display: block;
    .product-price-old {
      margin-left: 1.5rem;
    }
  }

  .product-box-container.horizontal {
    flex-direction: row;
    padding-bottom: 2rem;
    width: 100%;
    .product-box-tag {
      top: 1rem;
    }
    .product-box-image-wrapper {
      width: 10rem;
      margin-right: 1rem;
    }
    .product-box-text-wrapper {
      padding: 0;
    }
  }
}
