.side-cart {
  position: fixed;
  z-index: 100;
  right: 0;
  height: 100vh;
  width: 400px;
  top: 0;
  background-color: #fff;
  // padding: 25px 15px;
  display: flex;
  flex-direction: column;
  box-shadow: 1px 1px 10px #585757;

  transition: all 0.5s;

  &__header {
    padding: 25px 15px;
  }

  &__list {
    padding: 2px 15px 25px 15px;
    flex-grow: 1;
    overflow-y: auto;
  }
  &__item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 20px;
    &__img {
      width: 40px;
      height: 40px;
      object-fit: contain;
      border-radius: 4px;
    }
  }
  &__footer {
    box-shadow: -3px -13px 21px rgba(0, 0, 0, 0.1);
    padding: 25px 15px;
  }

  // display: none;
  .product-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 8px;
    &__wrap {
      overflow-y: auto;
      flex-grow: 1;
    }
  }
  .product-img {
    width: 65px;
    object-fit: contain;
    object-position: top;
    padding-right: 6px;
  }

  .max-available-amount {
    &:before {
      bottom: -22px;
      left: 8px;
    }
    &:after {
      bottom: -9px;
      left: 45px;
    }
    .control-box__plus {
      pointer-events: none;
      color: #ccc;
    }
  }
}

.cart {
  &__wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  &__left {
    flex-grow: 1;
    padding-right: 3%;
    padding-bottom: 60px;
    &__top {
      display: flex;
      justify-content: flex-end;
    }
    &__bottom {
      display: flex;
      justify-content: space-between;
    }
  }
  &__table {
    border: 1px solid $gray-400;
    padding: 24px 16px 0px 16px;
    &__row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 30px;
      &__right {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
      }
    }
    &__img {
      height: 60px;
      width: 60px;
      object-fit: contain;
    }
    &__xs {
      width: 60px;
      text-align: center;
    }
    &__sm {
      width: 120px;
      text-align: center;
    }
    &__md {
      width: 300px;
    }
    .max-available-amount {
      &:before {
        bottom: -23px;
        left: 7px;
      }
      &:after {
        bottom: -10px;
        left: 45px;
      }
      .control-box__plus {
        pointer-events: none;
        color: #ccc;
      }
    }
  }
  &__right {
    max-width: 380px;
    width: 100%;
    border: 1px solid $gray-400;
    padding: 24px 16px;
  }
}

@media (max-width: 1300px) {
  .cart {
    &__table {
      padding: 24px 4px 0px 16px;
    }
    &__table__md {
      width: 230px;
    }
    &__left {
      padding-right: 16px;
    }
  }
}

@media (max-width: 1060px) {
  .cart {
    &__wrap {
      flex-direction: column;
    }
    &__left {
      width: 100%;
      padding-right: 0;
    }
    &__right {
      max-width: 100%;
    }
  }
}

@media (max-width: 700px) {
  .cart {
    &__left {
      &__top {
        justify-content: space-between;
      }
      &__bottom {
        flex-direction: column;
      }
    }
    &__table {
      padding: 24px 12px;
      &__row {
        flex-direction: column;
        align-items: flex-start;
        border-bottom: 1px solid $gray-400;
        padding-top: 20px;
        padding-bottom: 20px;
        &__h {
          display: none;
        }
      }
      &__row:last-child {
        border: none;
      }
      &__row__right {
        width: 100%;
      }
      &__md {
        width: 100%;
        justify-content: space-between;
        padding-bottom: 8px;
      }
      &__sm {
        text-align: left;
        &.fw-bold {
          text-align: right;
        }
      }
    }
  }
}

@media (max-width: 500px) {
  .side-cart {
    width: 100%;
  }
  .side-cart__header {
    padding: 25px 15px 8px 15px;
  }
  .cart {
    &__table {
      padding-top: 0;
      padding-bottom: 10px;
      &__img {
        height: 45px;
        width: 45px;
      }
    }
    &__left{
      padding-bottom: 40px;
    }
  }
}
