.cart-items td,
.cart-items th {
  padding: 0;
  border: none;
}
.cart-items td {
  padding-top: 1em;
}

.cart-items th {
  text-align: left;
  padding-bottom: .8rem;
  opacity: 0.85;
  font-weight: normal;
}

.cart-item__quantity-wrapper {
  display: flex;
}

.cart-item__totals {
  position: relative;
}

.cart-items *.right {
  text-align: right;
}

.cart-item__image-container {
  display: inline-flex;
  align-items: flex-start;
}

.cart-item__image-container:after {
  content: none;
}

.cart-item__image {
  height: auto;
  max-width: calc(10rem / var(--font-body-scale));
}

@media screen and (min-width: 750px) {
  .cart-item__image {
    max-width: 100%;
  }
}

.cart-item__media {
  position: relative;
}
.cart-item__image_wrapper {
  text-align: center;
}
.cart-item__link {
  display: block;
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.cart-item__name {
  text-decoration: none;
  display: block;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.9em;
  color: inherit;
}

a.cart-item__name:hover {
  text-decoration: none;
  color: #000;
}

.cart-item__price-wrapper > * {
  display: block;
  margin: 0;
  padding: 0;
}

.cart-item__discounted-prices dd {
  margin: 0;
}

/* .cart-item__discounted-prices .cart-item__old-price {
  font-size: 1.4rem;
} */

/* .cart-item__old-price {
  opacity: 0.7;
} */

.product-option {
  word-break: break-word;
  font-size: 0.85em;
  line-height: normal;
  padding: 1px 0 3px 0;
  color: var(--color-grey6);
  font-weight: 400;
}

.cart-item cart-remove-button {
  display: flex;
  margin-left: 1rem;
}

.cart-item .cart-quantity {
  border: 2px solid var(--color-grey2);
}

@media screen and (min-width: 750px) and (max-width: 989px) {
  .cart-item cart-remove-button {
    width: 4.5rem;
    height: 4.5rem;
  }
}

cart-remove-button .button {
  min-width: calc(4.5rem / var(--font-body-scale));
  min-height: 4.5rem;
  padding: 0;
  margin: 0 0.1rem 0.1rem 0;
  color: rgba(0,0,0,0.4);
}

cart-remove-button .button:before,
cart-remove-button .button:after  {
  content: none;
}

cart-remove-button .button:not([disabled]):hover {
  color: rgb(var(--color-foreground));
}

@media screen and (min-width: 750px) {
  cart-remove-button .button {
    min-width: 3.5rem;
    min-height: 3.5rem;
  }
}

cart-remove-button .icon-remove {
  height: 1.5rem;
  width: 1.5rem;
}

.cart-item .loading__spinner {
  top: 0;
  left: auto;
  right: auto;
  bottom: 0;
  padding: 0;
}

/* @media screen and (min-width: 750px) {
  .cart-item .loading__spinner {
    right: 0;
    padding-top: 4.5rem;
    bottom: auto;
  }
} */

.cart-item .loading__spinner:not(.hidden) ~ * {
  visibility: hidden;
}

.cart-item__error {
  display: flex;
  align-items: flex-start;
}

.cart-item__error-text {
  font-size: 1.2rem;
  order: 1;
}

.cart-item__error-text + svg {
  flex-shrink: 0;
  width: 1.2rem;
  margin-right: 0.7rem;
}

.cart-item__error-text:empty + svg {
  display: none;
}

.cart-item__error-text + .svg-wrapper {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.7rem;
  margin-top: 0.25rem;
}

.cart-item__error-text:empty + .svg-wrapper {
  display: none;
}

.cart-items thead th {
  text-transform: uppercase;
}

.cart-item__details .spacer {
  margin-top: 0.3em;
}

@media screen and (max-width: 749px) {
  .cart-items,
  .cart-items thead,
  .cart-items tbody {
    display: block;
    width: 100%;
  }

  cart-items .cart-item {
    display: grid;
    grid-template: repeat(2, auto) / auto 1fr auto;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
  }

  .cart-items thead tr {
    display: flex;
    justify-content: space-between;
    border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.2);
  }

  cart-items .cart-item:last-child {
    margin-bottom: 0;
  }

  cart-items .cart-item__media {
    grid-row: span 2;
  }

  cart-items .cart-item__details {
    grid-column: 2 / 3;
  }

  cart-items .cart-item__totals {
    grid-column: 3 / 3;
  }

  cart-items .cart-item__quantity {
    grid-row: 2 / 2;
    grid-column: 2 / span 2;
  }

  cart-items .cart-item__totals {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
  }
}

.cart-item__error-text + svg {
  margin-top: 0.4rem;
}

@media screen and (min-width: 750px) {
  .cart-items {
    border-spacing: 0;
    border-collapse: separate;
    box-shadow: none;
    width: 100%;
    display: table;
  }

  .cart-items th {
    border-bottom: 1px solid var(--color-grey4);
  }

  .cart-items td {
    vertical-align: top;
  }

  /* .cart-item__details {
    width: 35rem;
  } */

  /* .cart-item__media {
    width: 10rem;
  } */

  .cart-item cart-remove-button {
    margin: 0.5rem 0 0 1.5rem;
  }

  .cart-item__price-wrapper > *:only-child:not(.cart-item__discounted-prices) {
    margin-top: 1rem;
  }
}

/* @media screen and (min-width: 990px) {
  .cart-item .cart-item__quantity,
  .cart-items .cart-items__heading--wide {
    padding-left: 6rem;
  }

  .cart-item__details {
    width: 50rem;
  }

  .cart-items thead th:first-child {
    width: 60%;
  }
} */


/* Cart Items Grid
If most or all cells require some sort of interaction, it may be best to use a grid.
If the primary goal is to read the data, stick with a data table.
https://mn.gov/mnit/media/blog/?id=38-541013
*/
.cart-items-grid {
  display: grid;
  row-gap: 0;
  box-sizing: border-box;
  padding-top: 0.5em;
}

.cart-items-grid * {
  box-sizing: border-box;
}

.cart-items-grid .cart-item {
  display: grid;
  grid-template-columns: 100px auto;
  grid-template-rows: 1fr;
  column-gap: 0.5em;
  row-gap: 0;
  position: relative;
  padding: 0.7em 0.5em;
  margin: 0 0;
  border-bottom: 1px solid var(--color-grey2);
}

@media screen and (min-width: 750px) {
  .cart-items-grid .cart-item {
    grid-template-columns: 120px auto;
  }
}

.cart-items-grid .cart-item .loading-overlay {
  padding-top: 6px;
  left: 0;
  right: auto;
}

.cart-items-grid.cart-item__image {
  max-width: 100%;
  height: auto;
}

.cart-items-grid .cart-item__name a {
  line-height: normal;
}

.cart-items-grid .cart-item__media a,
.cart-items-grid .cart-item__name a {
  text-decoration: none;
  display: block;
}

.cart-items-grid a.cart-item__name a:hover {
  text-decoration: none;
  color: inherit;
}

.cart-drawer .cart-item__totals {
  position: relative;
}

.cart-items-grid .cart-item__line-price {
  font-weight: 500;
}

.cart-items-grid .cart-item__final-price {
  font-weight: 500;
}

.cart-items-grid .cart-item__discounted-prices {
  display: flex;
  gap: 7px;
  align-items: center;
}

.cart-items-grid .cart-item__old-price {
  font-weight: 400;
  color: var(--color-grey5);
}

.cart-items-grid .unit-price {
  margin-top: 0.6rem;
}

.cart-items-grid .cart-item cart-remove-button {
  margin: 0;
  width: auto;
  height: auto;
}

.cart-items-grid cart-remove-button .button {
  min-height: 0;
  min-width: 0;
  width: 40px;
  height: 35px;
}

.cart-items-grid .cart-item__quantity-wrapper {
  display: flex;
  justify-content: space-between;
}

/* https://w3c.github.io/wcag/understanding/target-size-minimum.html */
.cart-items-grid .cart-quantity {
  min-height: 35px;
  width: 120px;
  border: 2px solid var(--color-grey2);
}

/* .cart-items-grid .cart-quantity .quantity__input,
.cart-items-grid .cart-quantity .quantity__button {
  width: 40px;
} */

.cart-items-grid .cart-quantity .quantity__button:hover {
  background: var(--background-shopify-checkout);
}

.extend-item {
  margin-top: -10px;
  max-width: 200px;
  line-height: 1;
}
.extend-item svg {
  max-width: 100%;
  line-height: 1;
}
.extend-details {
  margin-top: -5px;
}