#cart-drawer:not(.cart-open) .drawer-overlay {
  opacity: 0;
  transition:
    opacity 0.4s,
    width 0s linear 0.4s,
    visibility 0s linear 0.4s;
  visibility: hidden;
  width: 0;
}

#cart-drawer:not(.cart-open) .drawer__wrapper {
  transform: translate(100%, 0px);
}

.cart__warnings {
  text-align: center;
}

.drawer__wrapper .cart-header {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cart__wrapper .cart-header {
  border-bottom: .1rem solid rgba(var(--color-foreground), .2);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  margin-bottom: 1rem;
  font-size: 2.5rem;
  font-weight: 600;
}

.cart-header h2 {
  margin: 0;
  font-weight: 500;
  font-size: 140%;
  font-family: var(--font-heading-family);
}

.cart-header a {
  color: inherit;
  letter-spacing: 0.03em;
  font-size: 1.8rem;
  font-weight: 400;
  text-underline-offset: 3px;
}

.cart-drawer__close {
  display: flex;
  cursor: pointer;
}

.cart-items {
  opacity: 1;
  transition: opacity 0.2s;
  padding: 2rem;
  overflow: auto;
  flex: 1;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr 3fr;
  column-gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: .1rem solid rgba(var(--color-foreground), .2);
  border-bottom: unset;
}

.cart-item:last-child {
  border-color: transparent;
  margin-bottom: 0;
  padding: 0;
}

.cart-item__errors {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: row-reverse;
  gap: 5px;
  font-size: 12px;
  grid-column: span 2;
  letter-spacing: 0;
}

.cart-item__errors svg {
  flex-shrink: 0;
}

[data-ajax-cart-errors]:empty+svg {
  display: none;
}

.cart-item__media img {
  max-width: 162px;
  height: 221px;
  object-fit: cover;
}

.cart-item__details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: flex-start;
  font-size: 15px;
}

.cart-item__heading a {
  line-height: 1.3;
  display: block;
  color: rgba(var(--color-foreground));
  text-decoration: none;
  max-width: 30ch;
  font-size: 2rem;
  font-weight: 600;
}

.cart-item__heading .cart-item__price {
  display: block;
  margin-top: 6px;
  font-weight: 400;
  font-size: 1.8rem;
  color: #262626;
}

.cart-item__options {
  display: grid;
  gap: 2px;
  margin-block: 6px;
  font-size: 1.6rem;
  line-height: 100%;
  font-weight: 400;
}

.cart-item__option * {
  display: inline;
  margin: 0;
  font-size: 13px;
  font-weight: normal;
}

.cart-item__option:empty {
  display: none;
}

.cart-item__total {
  text-align: right;
  font-size: 1.8rem;
}

#cart-drawer .cart-item__total {
  grid-area: 1/2;
  display: none;
}

.cart-item__total s {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.cart-item__details ul.cart-discounts {
  margin: 10px 0 0;
}

.drawer__wrapper .cart-item__action {
  flex-direction: column;
}

.cart-item__action {
  padding-block: 10px;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  grid-area: 2 / span 2;
}

.cart__wrapper .cart-item__action {
  align-items: flex-start;
}

.cart-item__remove {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-item__remove svg {
  width: 14px;
}

.cart-item__remove a {
  font-size: 12px;
  color: rgba(var(--color-foreground), 0.5);
  text-decoration: none;
  text-transform: uppercase;
}

ajax-cart-quantity {
  display: grid;
  grid-template-columns: 30px 60px 30px;
  border: .1rem solid rgba(var(--color-foreground), .2);
  width: 100%;
  height: 40px;
  max-width: 128px;
}

ajax-cart-quantity a {
  display: grid;
  place-items: center;
  padding-block: 10px;
  color: rgba(var(--color-foreground));
}

ajax-cart-quantity input {
  border: 0;
  text-align: center;
  background: transparent;
  color: rgba(var(--color-foreground));
}

ajax-cart-quantity input::-webkit-outer-spin-button,
ajax-cart-quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

ajax-cart-quantity input {
  appearance: textfield;
  -moz-appearance: textfield;
}

ajax-cart-quantity svg {
  width: 14px;
  height: auto;
}

.drawer__wrapper .cart-footer {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cart__wrapper .cart-footer {
  border-top: .1rem solid rgba(var(--color-foreground), .2);
}

.cart-footer {
  padding: 2rem;
}

.cart-note {
  display: flex;
  flex-direction: column;
  height: fit-content;
  margin-bottom: 1rem;
  font-size: 2rem;
  color: #5D5D5D;
}

.cart-note label {
  display: block;
  margin-bottom: 1rem;
  cursor: pointer;
}

small.cart-total__small {
  font-size: 1.6rem;
  color: #5D5D5D;
}

.cart-note textarea {
  flex-grow: 1;
  resize: vertical;
  padding: 1rem;
  height: 51px;
  margin-bottom: 2rem;
}

.drawer__wrapper .cart-note textarea {
  max-width: 540px;
}

.cart__wrapper .cart-note textarea {
  width: 100%;
  max-width: 540px;
}

/* #cart-drawer .cart-note label:not(.note-open) + textarea {
  display: none;
} */
ul.cart-discounts {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  color: #838383;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
  font-size: 2rem;
  font-weight: 600;
}

span.cart-total__label {
  font-weight: 400;
  color: #5D5D5D;
}

.cart-charges {
  margin-bottom: 1rem;
}

.cart-discounts li {
  display: flex;
  align-items: center;
}

.cart-discounts svg.icon-discount {
  width: 12px;
  height: auto;
  margin-right: 0.5rem;
}

form#my-ajax-cart-form button {
  border: 1px solid rgb(var(--color-button));
  background: rgb(var(--color-button));
  color: rgb(var(--color-button-text));
  font-size: 1.8rem;
  padding: 15px;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-weight: 600;
}

html.js-ajax-cart-processing .cart-items {
  opacity: 0.7;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  height: 100%;
}

.cart-header--empty {
  align-self: flex-end;
  border-bottom: 0;
}

.cart__empty-content {
  text-align: center;
}

h2.cart__empty-text {
  margin-top: 0;
  font-weight: 400;
}

.cart__empty-content p {
  margin-block: 0 1rem;
}

.cart__empty-content .button {
  display: block;
  width: max-content;
  max-width: 100%;
  background: rgb(var(--color-button));
  color: rgb(var(--color-button-text));
  padding: 15px 20px;
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: .03em;
  margin: 0 auto 2rem;
}

.cart__login-paragraph,
.cart__login-paragraph a {
  color: rgba(var(--color-foreground), 0.75);
}

.cart-collection {
  width: 100%;
}

.cart-collection a {
  text-decoration: none;
}

.cart-collection img {
  display: block;
  width: 80%;
  height: auto;
  margin-inline: auto;
}

.cart-collection__title {
  padding: 1rem 10% 0;
  color: rgba(var(--color-foreground));
}

/* Main Cart Page */

#cart-main {
  padding-block: 5rem;
  max-width: 1280px;
}

#cart-main .cart-header,
#cart-main .cart-items,
#cart-main .cart-footer {
  padding: 1.5rem 0;
}

@media (min-width: 768px) {
  #cart-main .cart-item {
    grid-template-columns: 1fr 8fr;
    column-gap: 2rem;
    border-color: transparent;
  }

  #cart-main .cart-item__details {
    grid-template-columns: 2fr 1fr 1fr;
  }

  #cart-main .cart-item__action {
    grid-area: unset;
  }

  #cart-main .cart-footer {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
  }

  #cart-main .cart-charges {
    text-align: right;
  }

  #cart-main .cart-total,
  #cart-main .cart-footer .cart-discounts li {
    justify-content: flex-end;
  }

  #cart-main .cart-note {
    width: 100%;
    border-color: transparent;
    margin-bottom: 0;
  }

  #cart-main .cart-actions {
    width: 100%;
    margin-left: auto;
    max-width: 466px;
  }
}

@media (max-width: 768px) {
  .drawer__wrapper {
    width: min(328px, 100%);
  }

  .cart-item__heading a {
    font-size: 1.7rem;
  }

  .cart-item__heading .cart-item__price {
    font-size: 1.5rem;
  }

  .cart-item__options {
    font-size: 1.4rem;
  }

  .cart-header {
    font-size: 1.8rem;
  }

  .cart-note {
    font-size: 1.4rem;
  }

  ul.cart-discounts {
    font-size: 1.4rem;
  }

  .cart-total {
    font-size: 1.7rem;
  }

  small.cart-total__small {
    font-size: 1.2rem;
  }

  form#my-ajax-cart-form button {
    font-size: 1.4rem;
  }

  ajax-cart-quantity {
    width: 100%;
    height: 36px;
    max-width: 117px;
  }

  .cart__wrapper .cart-item__action {
    flex-direction: column;
  }

  .cart__wrapper .cart-note textarea {
    width: 100%;
    max-width: 343px;
    height: 39px;
  }

  .drawer__wrapper .cart-note textarea {
    max-width: 288px;
  }

  .cart__wrapper .cart-header a {
    display: none;
  }

  #cart-main {
    padding-block: 0rem 5rem;
  }

  .cart__wrapper .cart-item__media img,
  .drawer__wrapper .cart-item__media img {
    height: 190px;
    max-width: 135px;
  }


}