.cart-page {
  background: #f5f2e9;
  padding-top: 0;
}

.cart-main {
  padding: 44px var(--page-pad-x) 72px;
}

.cart-container {
  margin: 0 auto;
  max-width: 1120px;
}

.cart-container > h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 36px;
}

.cart-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.58fr) minmax(320px, 1fr);
}

.cart-card,
.order-summary {
  background: #fff;
  border-radius: 4px;
}

.cart-product {
  display: grid;
  gap: 28px;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 236px;
  padding: 36px 28px;
}

.cart-product__media {
  align-self: center;
  aspect-ratio: 1;
  overflow: visible;
}

.cart-product__media img {
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: translateY(-16px) scale(1.4);
  width: 100%;
}

.cart-product__details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cart-product__topline {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 84px 80px;
}

.cart-product h2,
.order-summary h2 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.cart-product__topline .quantity-control {
  justify-self: center;
  transform: translateX(-12px);
}

.cart-product__topline strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  justify-self: end;
  text-align: right;
}

.quantity-control {
  align-items: center;
  background: #F8F8F8;
  display: grid;
  grid-template-columns: repeat(3, 28px);
  min-height: 32px;
}

.quantity-control button {
  background: transparent;
  border: 0;
  height: 32px;
  padding: 0;
}

.quantity-control input {
  appearance: textfield;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  height: 32px;
  min-width: 0;
  padding: 0;
  text-align: center;
  width: 100%;
}

.quantity-control input::-webkit-inner-spin-button,
.quantity-control input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.quantity-control input:focus {
  outline: none;
}

.quantity-control button:focus-visible,
.cart-remove:focus-visible,
.cart-secondary-button:focus-visible,
.checkout-button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.quantity-control button:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.cart-product__plan {
  border-top: 1px solid #ececec;
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 18px;
}

.cart-product__plan span,
.cart-product__plan small,
.cart-product__plan del {
  display: block;
  font-size: 12px;
}

.cart-product__plan small,
.cart-product__plan-price span,
.cart-product__plan-price del {
  font-size: 13px;
}

.cart-product__plan small,
.cart-product__plan del {
  color: #b4b4b4;
}

.cart-product__plan-price {
  text-align: right;
}

.cart-remove {
  align-items: center;
  align-self: flex-end;
  background: transparent;
  border: 0;
  color: #1267bd;
  display: inline-flex;
  font-size: 12px;
  gap: 4px;
  margin-top: auto;
  min-height: 44px;
  padding: 8px 0 0 12px;
}

.cart-remove img {
  height: 16px;
  object-fit: contain;
  width: 16px;
}

.order-summary {
  min-height: 684px;
  padding: 28px 24px 32px;
}

.order-summary h2 {
  font-size: 18px;
}

.summary-lines {
  margin: 28px 0 0;
}

.summary-lines > div {
  display: grid;
  font-size: 14px;
  gap: 24px;
  grid-template-columns: 1fr 1.35fr;
  margin-top: 24px;
}

.summary-lines dt,
.summary-lines dd {
  margin: 0;
}

.summary-lines dd {
  line-height: 1.65;
  text-align: right;
}

.summary-lines a {
  color: #1267bd;
  font-size: 12px;
}

.cart-remove:hover span,
.cart-remove:active span,
.cart-remove:focus-visible span,
.summary-lines a:hover,
.summary-lines a:active,
.summary-lines a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.summary-lines .summary-total {
  font-size: 15px;
  font-weight: 600;
}

.summary-total dd {
  align-items: baseline;
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.summary-total__currency {
  color: #777;
  font-size: 11px;
  font-weight: 400;
}

.summary-total__amount {
  color: #111;
  font-size: 18px;
  font-weight: 600;
}

.checkout-button {
  align-items: center;
  background: #000;
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 15px;
  font-weight: 600;
  justify-content: center;
  margin-top: 28px;
  min-height: 56px;
  transition: background 160ms ease, opacity 160ms ease;
}

.checkout-button:hover {
  background: #242424;
}

.checkout-button.is-disabled,
.checkout-button.is-loading {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

.payment-methods {
  border-bottom: 1px solid #e7e7e7;
  padding: 24px 0 28px;
}

.payment-methods p {
  font-size: 13px;
  margin: 0 0 16px;
}

.payment-methods > div {
  display: grid;
  grid-template-columns: repeat(5, 60px);
  justify-content: space-between;
  max-width: 440px;
  row-gap: 12px;
  width: 100%;
}

.payment-method:nth-child(6) {
  grid-column: 2;
}

.payment-method:nth-child(7) {
  grid-column: 3;
}

.payment-method:nth-child(8) {
  grid-column: 4;
}

.payment-method {
  align-items: center;
  background: #fff;
  display: flex;
  flex: 0 0 60px;
  height: 32px;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.payment-methods img {
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  box-sizing: border-box;
  display: block;
  height: calc(100% - 6px);
  min-width: 0;
  object-fit: contain;
  width: calc(100% - 8px);
}

.payment-method--unframed {
  align-self: center;
  border: 1px solid #bdbdbd;
  border-radius: 6px;
  box-sizing: border-box;
  height: 26px;
  justify-self: center;
  max-height: 26px;
  max-width: 48px;
  width: 48px;
}

.payment-method--afterpay {
  background: #b2fce5;
}

.payment-method--klarna {
  background: #ffb3c7;
}

.payment-method--unframed img {
  border: 0;
  border-radius: 0;
  height: 100%;
  transform: none;
  width: 100%;
}

.purchase-reasons {
  padding-top: 28px;
}

.purchase-reasons h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 24px;
}

.purchase-reasons ul {
  display: grid;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.purchase-reasons li {
  align-items: center;
  display: flex;
  font-size: 14px;
  gap: 8px;
}

.purchase-reasons li img {
  flex: 0 0 auto;
  height: 20px;
  object-fit: contain;
  width: 20px;
}

.cart-empty {
  min-height: 236px;
  padding: 40px;
}

.cart-empty h2 {
  font-size: 20px;
  margin: 0;
}

.cart-empty p {
  color: var(--color-text-muted);
  margin: 12px 0 24px;
}

.cart-secondary-button {
  background: transparent;
  border: 1px solid #111;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 24px;
}

@media (max-width: 1023px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .cart-main {
    padding: 32px 16px 48px;
  }

  .cart-container > h1 {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .cart-product {
    gap: 20px;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 0;
    padding: 20px 16px;
  }

  .cart-product__media {
    align-items: center;
    align-self: stretch;
    aspect-ratio: auto;
    display: flex;
    justify-content: center;
  }

  .cart-product__media img {
    height: auto;
    transform: translateY(-26px) scale(2);
  }

  .cart-product__topline {
    gap: 8px;
    grid-template-columns: 1fr auto;
  }

  .cart-product__topline .quantity-control {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    transform: none;
  }

  .quantity-control,
  .quantity-control button {
    min-height: 30px;
  }

  .quantity-control {
    grid-template-columns: repeat(3, 24px);
  }

  .cart-product__topline strong {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .cart-product__plan {
    margin-top: 20px;
  }

  .cart-remove {
    margin-top: 12px;
  }

  .order-summary {
    min-height: 0;
    padding: 24px 20px 28px;
  }

  .summary-lines > div {
    gap: 12px;
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .summary-lines > div:first-child,
  .summary-lines > div:nth-child(2) {
    border-bottom: 1px solid #e7e7e7;
    padding-bottom: 24px;
  }

  .summary-lines .summary-total dt,
  .summary-lines .summary-total dd {
    white-space: nowrap;
  }

  .cart-empty {
    min-height: 220px;
    padding: 32px 24px;
  }
}

@media (max-width: 420px) {
  .cart-product {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .cart-product h2,
  .cart-product__topline strong {
    font-size: 14px;
  }

  .payment-method {
    flex-basis: 50px;
    height: 30px;
  }

  .payment-methods > div {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
