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

/* Variables Custom */
$product-box-margin-bottom: 20px;
$product-box-border-width: 1px;
$product-box-border-color: $gray-200;
$product-box-border-color-hover: $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-price-font-weight: $font-weight-sbold;
$product-price-color: $black;
$product-price-promo-color: $secondary;
$product-price-old-font-weight: $font-weight-normal;
$product-price-old-color: $black;

$product-title-font-size-mobile: 12px;
$product-brand-font-size-mobile: 12px;
$product-price-font-size-mobile: 15px;
$product-price-unit-font-size-mobile: 11px;
$product-price-old-font-size-mobile: 11px;

$product-title-font-size-desktop: 14px;
$product-brand-font-size-desktop: 13px;
$product-price-font-size-desktop: 18px;
$product-price-unit-font-size-desktop: 14px;
$product-price-old-font-size-desktop: 14px;
/***************************************/

.product-box-container {
  display: flex;
  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: 15px;
  z-index: 1;
  .badge {
    float: left;
    clear: left;
    margin-bottom: 2px;
  }
}

.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: 10px;
}
.product-box-name {
  display: flex;
  flex-direction: column-reverse;
  margin-bottom: 5px;
  text-decoration: none;
}
.product-box-brand {
  font-family: $product-brand-font-family;
  font-weight: $product-brand-font-weight;
  font-size: $product-brand-font-size-mobile;
  text-transform: uppercase;
}
.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;
}
.product-box-price {
  font-size: $product-price-font-size-mobile;
  font-weight: $product-price-font-weight;
  color: $product-price-color;
  span {
    font-size: $product-price-unit-font-size-mobile;
  }
}
.product-box-price-promo {
  color: $product-price-promo-color;
}
.product-box-price-old {
  font-size: $product-price-old-font-size-mobile;
  font-weight: $product-price-old-font-weight;
  text-decoration: line-through;
  color: $product-price-old-color;
}

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

  .product-box-text-wrapper {
    padding: 20px 10px;
  }
  .product-box-name {
    margin-bottom: 25px;
  }
  .product-box-brand {
    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: 9px;
  }


  .product-box-review + .product-box-price-wrapper {
    margin-top: 0;
  }
  .product-box-price-wrapper {
    display: block;
  }
  .product-box-price {
    font-size: $product-price-font-size-desktop;
    span {
      font-size: $product-price-unit-font-size-desktop;
    }
  }
  .product-box-price-old {
    margin-left: 15px;
    font-size: $product-price-old-font-size-desktop;
  }
}
