.cart-item {
  padding: 10px 0;
  border-bottom: 1px solid rgb(var(--color-entry-line));
}

.cart-item__media {
  width: 140px;
  flex-shrink: 0;
  margin-right: 30px;
}

.cart-item__media .cart-item__image-container {
  display: block;
  outline: none;
  width: 100%;
}

.cart-item__media .cart-item__image-container .placeholder {
  background-color: rgb(var(--color-image-background));
}

.cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item__name {
  text-decoration: none;
  color: rgb(var(--color-text));
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item__details__wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
}

.cart-item__details {
  /* min-width: 294px; */
  flex-grow: 1;
}

.cart-item__details .product-option {
  margin-bottom: 2px;
  color: #333;
}

.cart-item__details .product-option span:first-child {
  font-weight: 600;
}

.cart-item__details .product-property {
  display: flex;
  margin-bottom: 2px;
}

.cart-item__details .product-property .product-property__name {
  flex-shrink: 0;
}

.cart-item__details .product-property .product-property__value {
  display: flex;
  flex-wrap: wrap;
}

.cart-item__details .product-property .product-property__link {
  display: block;
}

.cart-item__details .product-property .product-property__image {
  display: block;
  margin-right: 5px;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.cart-item__quantity {
  width: 20.8%;
  flex-shrink: 0;
  /* margin: 0 20px; */
}

.cart-item__quantity .cart-item__quantity-wrapper {
  display: flex;
  align-items: center;
  /* height: 41px; */
}

.cart-item__quantity .quantity {
  width: 80px;
  height: 22px;
  margin-right: 22px;
  min-height: unset;
  border: none;
}

.cart-item__quantity .quantity::before, 
.cart-item__quantity .quantity::after {
  display: none;
}

.cart-item__quantity .quantity .quantity__button {
  width: 22px;
  height: 22px;
  cursor: pointer;
  border-radius: 50%;
  border: 1px solid #4a4a4a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item__quantity .quantity .quantity__button.disabled {
  cursor: not-allowed;
}

.cart-item__quantity .quantity__button svg {
  width: 10px;
}

.cart-item__quantity .quantity .quantity__input {
  font-size: 14px;
}

.cart-item__quantity cart-remove-button {
  line-height: 0;
}

.cart-item__quantity cart-remove-button svg {
  width: 16px;
  height: 16px;
  color: rgba(var(--color-text), 0.6);
  cursor: pointer;
  display: block;
}

.cart-item__quantity cart-remove-button:hover svg {
  color: rgba(var(--color-text), 1);
}

.cart-item__error {
  display: flex;
  align-items: center;
  /* margin-top: 10px; */
}

.cart-item__error-text {
  order: 1;
}

.cart-item__error .icon-error {
  margin-right: 5px;
  margin-top: 1.5px;
  flex-shrink: 0;
}

.cart-item__error-text:empty + svg {
  display: none;
}

.cart-item__totals {
  /* width: 18.4%; */
  /* flex-shrink: 0; */
  position: relative;
}

.cart-item__price-wrapper {
  text-align: right;
}

.cart-item__totals .original__price {
  /* font-size: 13px; */
  line-height: 1.6;
  text-decoration: line-through;
  opacity: 0.4;
}

.cart-item__totals .final__price {
  color: rgb(var(--color-text));
  word-break: break-all;
}

.cart-item__discounts {
  margin: 0;
  padding: 0;
}

.cart-item__discounts li {
  list-style: none;
  color: rgb(var(--color-discount));
  display: flex;
  align-items: center;
}

.cart-item__discounts li span {
  margin-left: 4px;
}

.cart-drawer__items {
  overflow: hidden;
}

@media (max-width: 959px) {
  .cart-item {
    padding: 24px 0 10px 0;
    border: none;
  }
  .cart-item__media {
    width: 100px;
    margin-right: 10px;
  }
  .cart-item__details__wrapper {
    display: block;
  }
  .cart-item__quantity {
    width: auto;
    margin: 12px 0;
  }
  .cart-item__totals {
    width: auto;
  }
  /* .cart-item__price-wrapper {
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  } */
  /* .cart-item__price-wrapper .final__price {
    margin-right: 6px;
  } */
  .original__price__desktop {
    display: none;
  }
  .cart-item .loading-overlay {
    left: 0;
  }
}

@media (min-width: 960px) {
  .original__price__mobile {
    display: none;
  }
  .cart-item .loading-overlay .loading-overlay__spinner svg {
    width: 25px;
    height: 25px;
  }
  .cart-item__quantity {
    min-width: 200px;
  }
  .cart-item__totals {
    /* min-width: 140px; */
  }
}

/* loading */

.cart-item .loading-overlay {
  top: 0;
  right: 0;
  position: absolute;
  line-height: 0;
}

.cart-item .loading-overlay .loading-overlay__spinner {
  animation-duration: 1s;
}

.cart-item .loading-overlay.loading ~ * {
  visibility: hidden;
}

.cart__items--disabled {
  pointer-events: none;
}

/* cart drawer case */

.cart-drawer__items .cart-item {
  padding: 20px;
  /* border-bottom: none; */
}
.cart-drawer__items .sale_group_slot {
  padding: 0 20px;
}

.cart-drawer__items .cart-item__media {
  width: 142px;
  aspect-ratio: 1/1;
  margin-right: 16px;
}

.cart-drawer__items .cart-item__details__wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  flex: auto;
}

.cart-drawer__items .cart-item__quantity {
  max-width: none;
  margin: 0;
  margin-bottom: 10px;
}

.cart-drawer__items .cart-item__totals {
  max-width: none;
}

.cart-drawer__items .cart-item__price-wrapper {
  text-align: right;
  /* display: flex; */
  /* flex-wrap: wrap; */
  /* align-items: center; */
}

.cart-drawer__items .cart-item__price-wrapper .final__price {
  /* margin-right: 6px; */
}

.cart-drawer__items .original__price__desktop {
  display: none;
}

.cart-drawer__items .original__price__mobile {
  display: block;
}

.cart-drawer__items .cart-item .cart-item__totals .loading-overlay {
  left: 0;
}

.cart-item__totals {
  width: auto;
  position: absolute;
  bottom: 8px;
  right: 0;
}

@media (max-width: 959px) {
  .cart-drawer__items .cart-item__totals,
  .main-cart-items-wrapper .cart-item__totals {
    margin: 10px 0;
  }

  .cart-drawer__items .cart-item__quantity,
  .main-cart-items-wrapper .cart-item__quantity {
    margin: 0;
  }
  .cart-item__quantity .cart-item__quantity-wrapper {
    padding-top: 2px;
  }
  .cart-drawer__items .cart-item__discounts li + li,
  .main-cart-items-wrapper .cart-item__discounts li + li {
    margin-top: 2px;
  }

  .cart-drawer__items .cart-item__error,
  .main-cart-items-wrapper .cart-item__error {
    /* margin-top: 10px; */
  }
  .cart-drawer__items .cart-item__details .product-option:last-child,
  .main-cart-items-wrapper .cart-item__details .product-option:last-child {
    margin-bottom: 0;
  }

  .cart-drawer__items .cart-item__media {
    width: 100px;
    margin-right: 10px;
    align-self: flex-start;
  }

  .cart-drawer__items .cart-item {
    padding: 24px 15px 10px 15px;
  }

  .cart-item__quantity cart-remove-button {
    position: absolute;
    top: -16px;
    right: 0;
    width: 16px;
    height: 16px;
  }

  .cart-item__quantity cart-remove-button svg {
    width: 12px;
    height: 12px;
  }

  .sale_group_slot {
    margin-bottom: 10px;
  }
}

@media (min-width: 960px) {
  .cart-drawer__items .cart-item__discounts {
    margin-bottom: 10px;
  }

  .cart-drawer__items .cart-item__discounts li + li {
    margin-top: 2px;
  }

  .cart-drawer__items .cart-item__quantity .cart-item__quantity-wrapper {
    margin: 0;
  }
  .cart-drawer__items .cart-item__details .product-option:last-child {
    margin-bottom: 0;
  }
}

/* moq */

.cart-item__volume-pricing-wrapper {
  position: relative;
}

.cart-item__volume-pricing-title {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.cart-item__volume-pricing-title > span {
  line-height: 1;
  margin-left: 8px;
}

.cart-item__quantity-rules {
  padding: 4px 20px;
}

cart-item-quantity volume-pricing {
  display: block;
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: absolute;
  z-index: 2;
  left: 0;
  width: 100%;
  margin: 2px 0;
  padding: 10px 0;
  background-color: rgba(var(--color-page-background));
}

@media (min-width: 960px) {
  cart-item-quantity volume-pricing {
    width: 245px;
  }
}

cart-item-quantity volume-pricing ul li {
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
}

cart-item-quantity volume-pricing ul li:nth-child(odd) {
  background: rgba(var(--color-text), 0.03);
}

cart-item-quantity volume-pricing ul li:nth-child(even) {
  background: rgba(var(--color-text), 0.09);
}

/* 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-item-tips{
  font-size: 12px;
  padding: 8px 24px;
  border-radius: 44px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.cart-item-free{
  background-color: var(--free-item-bg-color, #F8F3FA);
  padding: 30px 20px;
  position: relative;
}
.cart-item-free .cart-item__image-container{
  border-radius: 50%;
  overflow: hidden;
}
.cart-item-free-tips{
  display: flex;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
}
.cart-item-free-tips span {
  background-color: var(--theme-color);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 18px;
  padding: 4px 16px;
}
.cart-give-remove{
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
}
.main-cart-items-wrapper .cart-item-free {
  padding-left: 0;
}
@media screen and (max-width: 959px) {
  .main-cart-items-wrapper .cart-item-free {
    width: calc(100% + var(--page-padding) * 2);
    margin-left: calc(var(--page-padding) * -1);
    padding: 15px;
  }
  .cart-give-remove {
    top: -6px;
    right: -1px;
  }
  .cart-give-remove svg {
    width: 12px;
    height: 12px;
    opacity: 0.6;
  }
  .cart-item-free-tips {
    position: absolute;
    bottom: 0;
    right: 0;
  }
  .cart-item-free .cart-item__media {
    width: 68px;
    height: 68px;
  }
  .cart-drawer__items .cart-item-free {
    padding: 15px;
  }
  .cart-item__name {
    margin-bottom: 3px;
  }
  .cart-item-free .cart-item__details {
    margin-top: 3px;
  }
}