/*------------------------------------------------------------
ORDER
====================================*/

// cart items
.cart-items {
  th {
    @extend .title-label;
  }
  td {
    vertical-align: middle;
  }
  .product-price {
    color: $dark;
  }
  .input-number, .custom-input-number {
    max-width: 95px;
  }
}
.cart-item-img-wrapper {
  width: 80px;
  margin-right: 15px;
}
.cart-item-product-name {
  font-size: 1.4rem;
  font-weight: $font-weight-sbold;
  line-height: 1.8rem;
}
.cart-item-delete {
  padding: 0;
  background: none;
  border: 0;
  svg {
    transition: 0.3s;
  }
  &:focus {
    outline: 0;
  }
  &:hover {
    svg {
      fill: $primary;
      transform: rotate(180deg);
    }
  }
}

// order
.order-container {
  .cart-items {
    margin-bottom: 20px;
  }
  .card {
    width: 100%;
    margin-bottom: 20px;
    tr:last-child {
      td {
        border-bottom: 0;
      }
    }
    td:first-child {
      padding-left: 0;
    }
    td:last-child {
      padding-right: 0;
    }
  }
}


/* RESPONSIVE */
/***************************************/
@include media-breakpoint-down(sm) {
  // cart items
  .cart-items {
    table {
      border: none;
      margin-bottom: 20px;
    }
    thead {
      display: none;
    }
    tr {
      display: grid;
      position: relative;
      border: $table-border-width solid $table-border-color;
    }
    td {
      border: none;
    }
    tbody {
      tr {
        border-bottom: none;
      }
      td {
        &:nth-child(1) { // info produit + image
          grid-column: 1/3;
          grid-row: 1;
          padding-right: 30px;
        }
        &:nth-child(3) { // Quantité
          grid-column: 1;
          grid-row: 2/4;
          padding-right: 0;
        }
        &:nth-child(2) { // Prix unitaire
          grid-column: 2/3;
          grid-row: 2;
          padding-bottom: 0;
          padding-left: 0;
        }
        &:nth-child(4), &:nth-child(5) { // Prix total
          grid-column: 2/3;
          grid-row: 3;
          padding-top: 0;
          padding-left: 0;
        }
      }
    }
    .cart-tfoot-totals {
      tr:not(:first-child) {
        border-top: 0;
      }
      tr:not(:last-child) {
        border-bottom: 0;
        td {
          padding-bottom: 0;
        }
      }
    }
    .title-mobile {
      display: inline-block;
      margin-right: 10px;
    }
    .input-number {
      max-width: 80px;
    }
  }
  .cart-item-delete {
    position: absolute;
    top: $table-cell-padding-y;
    right: $table-cell-padding-x;
  }
}

@include media-breakpoint-up(md) {
  // cart items
  .cart-items {
    .input-number, .custom-input-number {
      margin: auto;
    }
  }
}
