/*============================================================================*/
/*========================= INICIO - BOX DE PRODUTOS =========================*/
/*============================================================================*/

/* Estrutura */
.grid-on-slider,
.products-view {
  display: flex;
  flex-wrap: wrap;
  margin: -8px;
}

.item-column {
  -ms-flex-preferred-size: calc(100% / 6);
  flex-basis: calc(100% / 6);
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  min-width: 182px;
  padding: 8px;
}

.item-column.item-column--large {
  -ms-flex-preferred-size: calc(100% / 4);
  flex-basis: calc(100% / 4);
  min-width: 238px;
}

.item-column.item-column--large .itembox {
  padding: 16px;
}

@media screen and (max-width: 1161px) {
  .item-column {
    min-width: 170px;
  }
  .item-column.item-column--large {
    min-width: 238px;
  }
}
@media screen and (max-width: 540px) {
  .item-column.item-column--large {
    min-width: 200px;
  }
  .itembox-compare-control {
    display: none;
  }
}
@media screen and (max-width: 480px) {
  .grid-on-slider,
  .products-view {
    margin: -4px;
  }
  .item-column {
    min-width: 160px;
    padding: 4px;
  }
  .item-column.item-column--large {
    min-width: 170px;
  }
  .item-column.item-column--large .itembox {
    padding: 8px;
  }
  .itembox .quantity {
    max-width: calc(100% - 54px);
  }
}
@media screen and (max-width: 360px) {
  .item-column,
  .item-column.item-column--large {
    min-width: 144px;
  }
}

/* box */
.border-list-color-error .itembox {
  border: 2px solid #d9534f!important;
}

.border-list-color-success .itembox {
  border: 2px solid #5cb85c!important;
}

.border-list-color-error {
  order: -2;
}

.border-list-color-success {
  order: -1;
}

.itembox {
  padding: 8px;
  height: 100%;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}
/* Image */
.itembox-tags  {
  position: absolute;
  z-index: 1;
}
.itembox-sale-label-title,
.itembox-sale-label,
.itembox-new-product {
  font-size: 12px;
  padding: 2px 3px;
  display: table;
  font-weight: bold;
}
.itembox-sale-label-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.itembox-new-product {
  background: #079A5E;
  color: #FFF;
}
.itembox-btn-detail {
  display: none;
  -webkit-transition: opacity .3s ease;
     -moz-transition: opacity .3s ease;
          transition: opacity .3s ease;
}

/* imagens */
.itembox-image-link {
  position: relative;
}
.itembox-image-link img {
  width: 100%;
}
img[src=""] {
  display: none;
}
.itembox-image-link {
  position: relative;
  display: block;
  overflow: hidden;
}
.image-loading-in-background {
  background-image: url('../../../../../assets/img/loading-skeleton.svg');
  background-size: 100%;
  background-repeat: no-repeat;
}
.itembox-aspect-ratio {
  height: 0;
  padding-bottom: 100%;
}
.itembox-primary-image,
.itembox-secondary-image {
  width: 100%;
  display: block;
  transition: transform .2s linear;
}
.itembox-secondary-image {
  position: absolute;
}
.itembox-compact-rating {
  font-size: 12px;
  font-weight: bold;
  color: #C99927;
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 4px 4px 0 0;
  background: #FFF;
}
.itembox .btn-wishlist {
  position: absolute;
  right: -2px;
  top: -4px;
  background: transparent;
  font-size: 18px;
  z-index: 1;
  cursor: pointer;
  padding: 4px;
}
.btn-wishlist i {
  position: relative;
}
.btn-wishlist {
  color: #F22248;
}

.itembox .itembox-title {
  font-size: 14px;
  font-weight: normal;
  word-wrap: break-word;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.itembox .itembox-description {
  font-size: 0.875rem;
  line-height: 1.125rem;
  display: block;
  margin-bottom: 16px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.itembox-quantity-control {
  display: flex;
  width: calc(100% - 62px);
  max-width: 100px;
  align-items: stretch;
}

.itembox-model {
  font-size: 12px;
  font-weight: bold;
  display: block;
}

/* quantidade atacado */
.itembox-quantity-control .quantity,
.itembox-quantity-control .itembox-btn {
  background: transparent;
  border: none;
}

.itembox-btn.btn-down,
.itembox-btn.btn-up {
  padding: 0 8px;
  cursor: pointer;
}

.itembox-quantity-control .quantity {
  flex-grow: 1;
  text-align: center;
}

.itembox-quantity-control {
  border-radius: 4px;
  border: 1px solid #D9D9D9;
  flex-grow: 1;
}
/* botão adicionar no carrinho */
.grid .itembox-quantity-control + .btn-cart span {
  display: none;
}
.itembox-compare-control {
  margin-bottom: -8px;
}

.itembox-actions {
  display: flex;
  flex-wrap: wrap;
  margin-left: -4px;
  margin-right: -4px;
}
.itembox-actions .itembox-view-more-colors,
.itembox-actions .itembox-price,
.itembox-actions .itembox-quantity-control,
.itembox-actions .btn-cart,
.itembox-actions .itembox-compare-control,
.itembox-actions .btn-aviseme {
  margin-left: 4px;
  margin-right: 4px;
}

.itembox-add-to-links {
  flex-basis: 100%;
  min-width: 100%;
  margin-top: 12px;
}

.itembox-view-more-colors {
  font-size: 12px;
  color: #737373;
}
.itembox-image-link,
.itembox-price,
.itembox-title,
.itembox-description,
.itembox-view-more-colors {
 margin-bottom: 8px;
}


.itembox-regular-price,
.itembox-old-price,
.product-old-price {
  display: block;
}
.itembox-old-price {
  text-decoration: line-through;
}
.itembox-single-price {
  font-size: 16px;
  font-weight: 300;
}
.itembox-regular-price {
  font-size: 16px;
  color: #0D0D0D;
}
.itembox-regular-price,
.itembox-single-price {
  font-weight: bold;
}
.itembox-old-price,
.product-old-price {
  font-size: 14px;
}

/*=============================== product grid ===============================*/
.grid .itembox-description {
  display: none;
}

/* Alinhamento horizontal dos elementos dentro do box */
.grid .itembox-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grid .itembox-inner {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

/*=============================== product list ===============================*/
.products-view.list {
  flex-direction: column;
}
.products-view.list .item-column {
  /* ie */
  flex: 1 1 auto;
}
.products-view.list .itembox-image-link {
  flex-basis: 180px;
  min-width: 180px;
  /* os importants são para sobrescrever as regras inline,
  que são inline porque os valores são calculados no back-end */
  padding-bottom: initial!important;
  height: 180px!important;
}
.products-view.list .itembox {
  flex-direction: row;
}
.list .itembox-image-link {
  margin-right: 16px
}

@media screen and (max-width: 480px) {
  .products-view.list .itembox-image-link {
    flex-basis: 96px;
    min-width: 96px;
    padding-bottom: initial!important;
    height: 96px!important;
  }
  .list .btn-cart span {
    display: none;
  }

}

/* desktop */
@media (pointer: fine) {
  .itembox-btn-detail {
    display: block;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: .2s linear;
    z-index: 1;
  }
  .itembox-image-link:hover .itembox-btn-detail {
    opacity: 1;
  }
  .itembox-image-link:hover .itembox-primary-image,
  .itembox-image-link:hover .itembox-secondary-image {
    transform: translateY(-100%)
  }
}

/* Skeleton loading */
:root {
  --card-padding: 12px;
  --image-height: 174px;
  --title-height: 28px;
  --desc-line-height: 16px;
  --footer-height: 44px;
  --margin-small: 14px
}

.itembox:empty {
  background-image:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.8) 50%,
      rgba(255, 255, 255, 0) 100%
    ),                                                                 /* blur */
    linear-gradient(#EEE var(--image-height), transparent 100%),     /* image */
    linear-gradient(#EEE var(--title-height), transparent 0),        /* title */
    linear-gradient(#EEE var(--desc-line-height), transparent 100%), /* desc */
    linear-gradient(#EEE var(--desc-line-height), transparent 100%), /* desc */
    linear-gradient(#EEE var(--footer-height), transparent 100%);    /* footer */

  background-size:
    80% 100%,                                                    /* blur */
    calc(100% - var(--card-padding) * 2) var(--image-height),    /* image */
    calc(100% - var(--card-padding) * 2) var(--image-height),    /* title */
    calc(90% - var(--card-padding) * 2) var(--desc-line-height), /* desc */
    calc(75% - var(--card-padding) * 2) var(--desc-line-height), /* desc */
    calc(100% - var(--card-padding) * 2) var(--footer-height);   /* footer */

  background-position-x:
    -400%,               /* blur */
    var(--card-padding), /* image */
    var(--card-padding), /* title */
    var(--card-padding), /* desc */
    var(--card-padding), /* desc */
    var(--card-padding); /* footer */

  background-position-y:
    0,                                                                                                           /* blur */
    var(--card-padding),                                                                                         /* image */
    calc(var(--card-padding) + var(--image-height) + var(--margin-small)),                                       /* title */
    calc(100% - var(--margin-small) * 2 - var(--card-padding) - var(--footer-height) - var(--desc-line-height)), /* desc */
    calc(100% - var(--margin-small) - var(--card-padding) - var(--footer-height)),                               /* desc */
    calc(100% - var(--card-padding));                                                                            /* footer */

  background-repeat: no-repeat;
  animation: loading 1s infinite;
}

@keyframes loading {
  to {
    background-position-x:
      900%,                /* blur */
      var(--card-padding), /* image */
      var(--card-padding), /* title */
      var(--card-padding), /* desc */
      var(--card-padding), /* desc */
      var(--card-padding); /* footer */
  }
}

/*========================= FINAL  - BOX DE PRODUTOS =========================*/
