.cart-drawer {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  background-color: rgba(var(--color-mask), 0.5);
  transition: visibility 200ms ease;
}

.cart-drawer {
  visibility: hidden;
}

.cart-drawer.active {
  visibility: visible;
}

.cart-drawer__inner {
  height: 100%;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 200ms ease;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  background-color: rgb(var(--color-page-background));
  padding-top: 0;
}

.cart-drawer__fixed-checkout {
  transform: translateX(100%);
  transition: transform 200ms ease;
}

.cart-drawer__inner .cart-drawer__inner-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cart-drawer__warnings {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
}

.cart-drawer.active .cart-drawer__inner,
.cart-drawer.active .cart-drawer__fixed-checkout {
  transform: translateX(0);
}

.cart-drawer__header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

.cart-drawer__header::after {
  /* content: ""; */
  /* position: absolute; */
  /* bottom: 0; */
  /* width: calc(100%); */
  /* height: 1px; */
  /* background-color: rgb(var(--color-entry-line)); */
}

.cart-drawer__close {
  color: rgb(var(--color-text));
  cursor: pointer;
  width: 24px;
  height: 24px;
  line-height: 0;
  padding: 6px;
}

cart-drawer {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
}

.cart-drawer-container {
  /* width: 440px; */
  width: 1200px;
}

.cart-drawer__overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.cart-drawer__overlay:empty {
  display: block;
}

/* cart-drawer-items {
  overflow: auto;
  flex: 1;
} */

.cart-drawer__inner {
  overflow-y: scroll;
}

@media screen and (max-height: 650px) {
  cart-drawer-items {
    overflow: visible;
  }

  .cart-drawer__inner {
    overflow-y: scroll;
  }
}

@media (max-width: 959px) {
  .cart-drawer-container {
    width: 90%;
  }
}

cart-drawer-items::-webkit-scrollbar {
  width: 3px;
}

cart-drawer-items::-webkit-scrollbar-thumb {
  background-color: rgba(18, 18, 18, 0.7);
  border-radius: 100px;
}

cart-drawer-items::-webkit-scrollbar-track-piece {
  margin-top: 20px;
}

/* cart-drawer-footer */

.cart-drawer__footer__container {
  display: flex;
  justify-content: flex-end;
  padding-top: 40px;
  padding-bottom: 40px;
}

.cart-drawer__checkout-container {
  width: 100%;
  position: relative;
  padding: 40px 20px;
}

.cart-drawer__checkout-container::after {
  /* content: "";
  position: absolute;
  top: 0;
  left: -20px;
  width: calc(100% + 20px);
  height: 1px;
  background-color: rgb(var(--color-entry-line)); */
}

.cart-drawer__amount-wrapper {
  margin: 0;
  padding: 0;
}

.cart-drawer__amount-wrapper li {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgb(var(--color-text));
  margin-bottom: 8px;
}

.cart-drawer__amount-wrapper li em {
  font-style: normal;
  margin-right: 12px;
}

.cart-drawer__amount-wrapper .cart__discount span {
  color: rgb(var(--color-discount));
}

.cart-drawer__discount span {
  color: rgb(var(--color-discount));
}

#checkout {
  width: 100%;
}

.cart-drawer__checkout {
  margin-top: 15px;
}

.cart-drawer__taxes__desc {
  text-align: center;
  margin-bottom: 10px;
}

.cart-drawer__body {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
}

.cart-drawer__body .cart-drawer__inner {
  flex: 1;
}

.cart-drawer__body .cart-fixed-checkout {
  position: static;
}

/* The ipad end responds to the mobile end in vertical screen */

/* @custom-media --tablet (max-width: 959px); */

/* @custom-media --gt-mobile (min-width: 751px); */

/* detectingScreen need to consider the configuration of the tablet */

.cart-drawer-like{
  display: flex;
  flex-direction: column;
}

.cart-drawer-like h2{
  margin: 0;
  font-size: 16px;
  color: #3C306B;
  padding: 20px 20px 0;
}
.cart-drawer-like .cart-drawer-like-content{
  padding: 20px 12px;
  height: 100%;
  overflow: hidden auto;
}
.cart-drawer-like .cart-drawer-like-content ul{
  flex: 1;
  /* overflow-y: scroll; */
  display: flex;
  flex-wrap: wrap;
  padding-bottom: 20px;
}
.cart-drawer-like .cart-drawer-like-content li{
  width: 50%;
}
/* .cart-drawer-like .cart-drawer-like-content li img{
 object-fit: contain;
} */

.cart-drawer__fixed-checkout .button {
  margin: 0;
  background-color: var(--bg);
  border-radius: 60px;
  color: var(--color);

  &:active,
  &:focus {
    color: var(--color);
    background-color: var(--bg);
  }

  
}

.cart-fixed-checkout__checkout-icon-text-desktop {
  display: flex;
  align-items: center;
  gap: 10px;

  img, svg {
    height: 24px;
    width: auto;
  }
}

.cart-fixed-checkout__checkout-icon-text-mobile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 400;

  img, svg {
    height: 19px;
    width: auto;
  }
}

.cart-discount-over {
  display: none;
}

.cart-discount-amount, .cart-discount-item-amount {
  color: red;
  flex-shrink: 0;
}

/* 移动端样式 */
@media screen and (max-width: 768px) {
  .cart-drawer-container {
    width: 100% !important;
  }

  .progress-bar-wrap {
    background-color: rgba(var(--cart-shipping-background, 119, 101, 192), 0.1);
    overflow: hidden;

    .cart_discount_title {
      font-size: 14px;
      font-weight: 500;
    }
  }

  .cart-drawer__inner {
    padding: 0;
    overflow: hidden;
  }

  .cart-drawer__header {
    padding: 16px;
    position: sticky;
    top: 0;
    background: #FFFFFF;
    z-index: 10;
    height: 52px;
    border-bottom: 1px solid rgba(var(--color-entry-line));

    &::after {
      content: none;
    }
  }

  .cart-drawer__heading {
    font-size: 16px;
    font-weight: 500;
  }

  .cart-drawer__body-wrapper {
    flex: 1;
    overflow: auto;
  }

  .cart-drawer__body-left {
    width: 100% !important;
  }

  .cart-drawer__checkout-container {
    display: none;
  }

  .cart-drawer__amount-wrapper {
    margin-bottom: 16px;
  }

  .cart-drawer__amount-wrapper li {
    margin-bottom: 12px;
  }

  .cart-drawer__amount-wrapper .cart__total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(var(--color-entry-line));
  }

  .cart-drawer__taxes__desc {
    display: none;
  }

  .cart-drawer__body .cart-fixed-checkout {
    position: sticky;
  }

  /* 购物车为空时的样式 */
  .cart-drawer__inner-wrapper.cart-empty {
    .cart__warnings {
      padding: 32px 16px;
      text-align: center;
    }

    .cart__empty-text {
      font-size: 14px;
      margin-bottom: 16px;
    }
  }

  /* 优惠券区域样式 */
  .cart-drawer__checkout-container .cart-coupon {
    margin-bottom: 16px;
  }

  .cart-freight-insurance-icon {
    width: 40px;
    height: 40px;
  }

  .freight-insurance-title {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .freight-insurance-des {
    font-size: 12px;
  }

  .freight-insurance-price {
    font-size: 14px;
  }
}

