cart-drawer-custom {
  --_inline-space: 16px;

  .text-note {
    color: var(--theme-color-grey-4);
  }

  &.modal .modal__container {
    max-width: 33vw;
  }

  free-shipping-bar {
    margin-bottom: 8px;
  }

  .modal__body {
    [class*="swym-wishlist-"] {
      display: none;
    }
  }

  .modal__body > div.v-stack {
    height: 100%;
    overflow: auto;
    overflow-x: hidden;
    align-content: space-between;

    &::-webkit-scrollbar {
      width: 10px;
    }

    &::-webkit-scrollbar-thumb {
      background-color: var(--theme-color-primary);
      border: 0;
      border-left: 7px solid transparent;
      background-clip: content-box;
    }
  }

  .modal__body:has(.empty-cart) {
    overflow: hidden;
  }

  .line-item {
    gap: 16px;
    align-items: stretch;
    padding-block: 16px;
    border-top: 1px solid var(--theme-color-grey-2);
  }

  .giftcard-note {
    padding: 6px 12px;
    border-radius: 6px;
    margin-top: -4px;
    margin-bottom: 16px;
  }

  *:focus-visible {
    outline: 2px solid var(--theme-color-grey-4);
    outline-offset: 2px;
  }

  .line-item__line-price price-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .line-item__remove-button {
    width: fit-content;
    margin-left: auto;
    opacity: 1;
    margin-top: auto;
    margin-bottom: 0;
    visibility: visible;
  }

  .cart-single-product-addon--minicart {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 4px 8px;
    align-items: start;
    padding: 6px;
    padding-right: 12px;
    background-color: var(--theme-color-white);
    border-radius: 8px;
    margin-bottom: 12px;
  }

  .cart-single-product-addon--minicart .cart-single-product-addon__media {
    display: block;
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--theme-color-grey-1);
  }

  .cart-single-product-addon--minicart .cart-single-product-addon__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .cart-single-product-addon--minicart .cart-single-product-addon__info {
    height: 100%;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px;
  }

  .cart-single-product-addon--minicart .cart-single-product-addon__button {
    justify-self: end;
    white-space: nowrap;
    padding: 2px;
  }

  .cart-single-product-addon--minicart .price-list {
    gap: 2px;
  }

  .cart-single-product-addon--minicart .line-item__error-container {
    grid-column: 2 / -1;
  }
  
  .cart-drawer__products-carousel {
    padding-top: 22px;
    padding-bottom: 18px;
    border-top: 1px solid var(--theme-color-grey-2);
    /* position: sticky;
    bottom: 0;
    background-color: var(--theme-color-white-blur-9);
    backdrop-filter: blur(10px);
    z-index: 1; */
  
    .line-item {
      padding-block: 0;
      border-top: 0;
      background-color: var(--theme-color-white);
      padding: 6px;
      border-radius: 8px;
    }

    .line-item__media {
      flex: 0 0 54px;
      width: 54px;
      min-width: 54px;
      max-width: 54px;
      aspect-ratio: 3 / 4;
    }
  }

  .order-summary__extra_item--carousel {
    margin-top: 8px;
    border-radius: 4px;
    /* position: sticky;
    bottom: 0;
    z-index: 1; */

    .order-summary__extra_item-head {
      padding-top: 16px;
      margin-bottom: 12px;
      border-top: 1px solid var(--theme-color-grey-2);
    }

    .order-summary__extra_item-title {
      margin: 0;
      padding: 0;
      border: 0;
      line-height: 1.25;
    }

    .cart-products-carousel__top-controls {
      flex-shrink: 0;

      .circle-button {
        width: 1.75rem;
        height: 1.75rem;
      }

      .swiper-button-prev,
      .swiper-button-next {
        width: 1.5rem;
        height: 1.5rem;
        margin: 0;
        position: static;
        cursor: pointer;
        color: var(--theme-color-black);

        &::after {
          display: none;
        }
      }
    }

    .order-summary__row {
      display: grid;
      gap: 4px 12px;
      grid-template-columns: 72px minmax(0, 1fr);
      align-items: end;

      &:has(.order-summary__quantity-selector) .add-to-cart-item-link,
      &:has(.order-summary__quantity-selector) .cart-products-carousel__view-product-link {
        grid-column: 2;
      }

      .line-item {
        display: contents;
        grid-column: 1 / -1;
        gap: 0.875rem;
        align-items: stretch;
        border-top: 0;
        padding-block: 0;

        .contents {
          display: block;
          grid-column: 2;
          grid-row: 1;
          min-width: 0;
          align-self: start;
        }
      }

      .line-item__info {
        height: auto;
        justify-content: flex-start;
        align-self: start;
        text-align: left;
      }

      .price-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        text-align: left;

        .sales-price {
          flex: 1 0 100%;
        }
      }

      .order-summary__quantity-selector {
        grid-column: 2;
        order: 1;
      }

      .quantity-selector__button,
      .quantity-selector__input {
        --quantity-input-size: 32px;
      }

      .add-to-cart-item-link,
      .cart-products-carousel__view-product-link {
        grid-column: 2;
        grid-row: 2;
        order: 0;
        justify-self: flex-end;
        align-self: flex-end;
        text-align: right;
        white-space: nowrap;
      }

      .line-item__final-price {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        justify-self: stretch;
        align-self: flex-end;
        width: 100%;
        position: relative;
      }
    }

    .line-item__media {
      grid-column: 1;
      grid-row: 1 / span 2;
      align-self: stretch;
      flex: 0 0 72px;
      width: 72px;
      min-width: 72px;
      max-width: 72px;
      aspect-ratio: 3 / 4;
      border-radius: 0;
      overflow: hidden;
      background-color: var(--theme-color-grey-1);
    }

    .line-item__media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .line-item__info-with-line-price {
      flex: 1 1 0;
      min-width: 0;
    }

    .cart-products-carousel__card {
      padding-top: 0;
    }

    .cart-single-product-addon {
      display: grid;
      grid-template-columns: 72px minmax(0, 1fr) auto;
      gap: 4px 12px;
      align-items: center;
      padding-block: 12px;
      border-top: 1px solid var(--theme-color-grey-2);
    }

    .cart-single-product-addon__media {
      display: block;
      width: 72px;
      min-width: 72px;
      max-width: 72px;
      aspect-ratio: 3 / 4;
      overflow: hidden;
      background-color: var(--theme-color-grey-1);
    }

    .cart-single-product-addon__media img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .cart-single-product-addon__info {
      display: flex;
      min-width: 0;
      flex-direction: column;
      gap: 4px;
    }

    .cart-single-product-addon__button {
      justify-self: end;
      white-space: nowrap;
    }

    .cart-single-product-addon .line-item__error-container {
      grid-column: 2 / -1;
    }

    .cart-products-carousel__slide {
      height: auto;
    }
  }

  .cart-products-carousel {
    .swiper-wrapper {
      align-items: stretch;
    }

    .swiper-slide {
      height: auto;
      background-color: var(--theme-color-white);
      padding: 6px;
      border-radius: 8px;
    }

    .swiper-button-prev,
    .swiper-button-next {
      position: static;
      background-color: var(--theme-color-white);
      border-radius: 6px;
    }
  }

  .footer,
  product-recommendations {
    border-top: 1px solid var(--theme-color-grey-2);
    margin-inline: calc(var(--_inline-space) * -1);
    padding: var(--_inline-space);
  }

  product-recommendations {
    position: relative;
    margin-top: auto;
    margin-bottom: 0;
    padding-right: 0;
    border-top: 0;

    &:before {
      content: "";
      position: absolute;
      top: 0;
      left: var(--_inline-space);
      right: var(--_inline-space);
      width: calc(100% - var(--_inline-space) * 2);
      height: 1px;
      background: var(--theme-color-grey-2);
    }

    .cart-drawer__cross-sell-header {
      padding-right: var(--_inline-space);
    }

    .inline-card {
      --_card-width: 100%;

      .inline-card__details {
        gap: 16px;
        flex-direction: row;
        flex-wrap: wrap;
        align-content: center;
        text-align: left;

        p {
          flex: 1 0 100%;
        }

        price-list {
          flex: 1;
        }
      }
    }

    .circle-button {
      color: var(--theme-color-black);
      --button-size: 24px;
      transition: all 0.2s ease-in-out;
      border-radius: 8px;

      &:hover:not([disabled]):before {
        background-color: var(--theme-color-grey-2);
        transform: unset;
      }

      &:before {
        border-radius: 8px;
        background-color: var(--theme-color-white);
      }

      &[disabled] {
        color: var(--theme-color-grey-3);
      }

      svg {
        width: 100%;
        height: 100%;
      }
    }
  }

  .footer {
    position: sticky;
    right: calc(var(--_inline-space) * -1);
    left: calc(var(--_inline-space) * -1);
    bottom: 0;
    width: calc(100% + calc(var(--_inline-space) * 2));
    margin-top: auto;
    margin-bottom: 0;
    padding-bottom: var(--_inline-space);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    padding-bottom: 0;

    .cart-drawer__total {
      padding-bottom: 12px;

      .text-m {
        color: var(--theme-color-grey-4);
      }
    }
  }

  .empty-cart-title {
    padding-block: 0 8px;
    margin-top: -8px;
  }

  .empty-cart__suggested-products-grid {
    --_empty-cart-column: 3;
    display: grid;
    grid-template-columns: repeat(var(--_empty-cart-column), minmax(0, 1fr));
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    align-content: start;
    height: 100%;

    .product-card {
      display: block;
    }
  }

  .empty-cart {
    display: flex;
    height: 100%;
    flex-direction: column;
    gap: 16px;
  }

  .empty-footer {
    margin-top: auto;
    margin-bottom: 0;
    position: sticky;
    bottom: 0;
    right: 0;
    left: 0;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;
    border-top: 1px solid var(--theme-color-grey-2);
  }
}

@media screen and (max-width: 1000px) {
  cart-drawer-custom {
    .empty-cart__suggested-products-grid {
      --_empty-cart-column: 2;
    }
  }
}

.cart__right {
  padding: min(40px, var(--container-gutter));
  border-width: 1px;
  position: sticky;
  inset-block-start: calc(var(--sticky-area-height) + 20px);
}

@media screen and (max-width: 699px) {
  .cart th:nth-child(2),
  .cart th:nth-child(3),
  .cart td:nth-child(2),
  .cart td:nth-child(3) {
    display: none;
  }
}

@media screen and (min-width: 700px) {
  .cart .line-item__quantity-selector,
  .cart .line-item__line-price,
  .cart .line-item__unit-line-price {
    display: none;
  }
}

.drawer--cart::part(footer) {
  padding: 0;
}

.drawer--cart .free-shipping-bar {
  margin-block-start: -0.25rem;
}

.drawer--cart .tab-pills {
  grid-template-rows: auto minmax(0, 1fr);
}

.drawer--cart:has(.tab-pills)::part(header) {
  border-block-end: none;
}

.drawer--cart:has(.tab-pills)::part(body) {
  padding-block-start: 0;
}

@media screen and (max-width: 699px) {
  .drawer--cart {
    --drawer-max-width: none;
  }
}

.cart-drawer__footer-inner {
  padding: min(1.75rem, var(--drawer-footer-padding-block)) var(--drawer-footer-padding-inline);
}

.cart-drawer__footer-actions {
  border-block-end-width: 1px;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  display: grid;
}

.cart-drawer__footer-action-button {
  text-align: center;
  justify-content: safe center;
  align-items: center;
  column-gap: 0.5rem;
  padding: 1.1rem 1rem;
  display: flex;
}

.cart-offers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  display: grid;
}

.cart-offers svg {
  fill: gray;
  background: #000;
}

.cart-offers__item {
  container-type: inline-size;
}

.cart-offers__item--full {
  grid-column: 1 / -1;
}

.cart-offers .offer-item {
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  display: flex;
}

.cart-offers .offer-item .offer-item__content {
  flex-direction: column;
  align-items: center;
  gap: 0.5rem 0.75rem;
  display: flex;
}

@container (width > 400px) {
  .cart-offers .offer-item {
    text-align: start;
    flex-direction: row;
    justify-content: space-between;
  }

  .cart-offers .offer-item .offer-item__content {
    flex-direction: row;
  }
}

.cart-drawer__cross-sell {
  border-block-start-width: 1px;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 12px;
  margin-block-start: 0;
  padding-block: 0;
  display: grid;
  border-top: 0;

  .text-label-small {
    color: var(--theme-color-grey-4);
  }
}

.cart-drawer__cross-sell-carousel {
  --distance-to-bleed: var(--drawer-body-padding-inline);
  scroll-snap-type: x mandatory;
  grid-auto-columns: calc(100% - 16px);
  grid-auto-flow: column;
  column-gap: 1.25rem;
  display: grid;
  position: relative;
}

@media screen and (min-width: 1000px) {
  .cart-drawer__cross-sell-carousel {
    grid-auto-columns: 65%;
  }
}

@keyframes spin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}
.preview-opener {
  font-size: 0.6875rem;
  line-height: 1.27;
  letter-spacing: 0.01em;
  font-weight: 400 !important;
  padding: 6px 10px;
  background-color: var(--theme-color-yamamay-light);
  color: var(--theme-color-yamamay-badge-dark);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.line-item {
  flex-wrap: wrap;
}

.line-item > .customily-property {
  flex: 0 0 100%;
  width: 100%;
  margin-top: 8px;
}
