.checkout-content {
  width: min(100%, 1120px);
  margin: auto;
}

.checkout-title {
  margin: 12px 0 26px;
  font-size: clamp(32px, 4.2vw, 44px);
  font-weight: 750;
  line-height: 1.17;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(310px, 1fr);
  align-items: start;
  gap: clamp(20px, 3.5vw, 42px);
}

.checkout-main:not(.is-signed-in) .checkout-content { max-width: 472px; }
.checkout-main:not(.is-signed-in) .checkout-grid { grid-template-columns: minmax(0, 1fr); }

.checkout-details,
.checkout-summary {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--shop-flow-line);
  border-radius: 20px;
}

.checkout-summary { background: var(--shop-flow-surface); }

.shop-checkout-page :is(.checkout-details, .checkout-summary) h2 {
  margin: 0 0 18px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

.shop-checkout-page .shop-verify h2 { margin-bottom: 6px; }

.checkout-intro,
.checkout-payment-channel {
  color: var(--shop-flow-muted);
  font-size: 13px;
  line-height: 1.6;
}

.shop-verify .checkout-intro { margin-bottom: 20px; }
.checkout-shipping { margin-top: 26px; }

.checkout-recipient {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.shop-checkout-page .checkout-shipping .shop-field {
  color: var(--shop-flow-ink);
  font-weight: 600;
}

.shop-checkout-page .checkout-shipping textarea { min-height: 92px; }

.checkout-summary .bag-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--shop-flow-line);
}

.checkout-summary .bag-item:first-child { padding-top: 4px; }

.shop-checkout-page .checkout-summary .bag-item img {
  width: 60px;
  height: 80px;
  flex: none;
  object-fit: contain;
  border-radius: 7px;
  background: transparent;
}

.checkout-summary .bag-item-body { min-width: 0; }

.shop-checkout-page .checkout-summary .bag-item h3 {
  color: var(--shop-flow-ink);
  font-size: 15px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.shop-checkout-page .checkout-summary .bag-item strong {
  color: var(--shop-flow-ink);
  font-size: 15px;
}

.checkout-summary .bag-item .shop-hint,
.checkout-summary .bag-item-controls { color: var(--shop-flow-muted); }

.checkout-summary .bag-item-controls {
  gap: 8px;
  margin-top: 8px;
}

.checkout-summary .bag-item-controls label { gap: 8px; }

.shop-checkout-page .checkout-summary .bag-item-controls input {
  width: 43px;
  min-height: 36px;
  padding-inline: 6px;
  appearance: textfield;
  background: #fff;
  border-radius: 7px;
  text-align: center;
}

.checkout-summary .bag-item-controls input::-webkit-inner-spin-button,
.checkout-summary .bag-item-controls input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.checkout-summary .bag-item-controls .plain-button { color: var(--shop-flow-muted); }

.checkout-summary .shop-empty {
  margin: 0;
  padding: 18px 12px;
  background: #fff;
  border-radius: 10px;
  text-align: center;
}

.checkout-totals {
  display: grid;
  gap: 8px;
  margin: 18px 0 20px;
  font-size: 14px;
}

.checkout-totals > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.checkout-totals dt { color: var(--shop-flow-muted); }
.checkout-totals dd { margin: 0; font-variant-numeric: tabular-nums; }

.checkout-total {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--shop-flow-line);
  font-weight: 700;
}

.checkout-total dt { color: var(--shop-flow-ink); font-size: 16px; }

.checkout-total dd {
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.1;
}

.checkout-summary #place-order {
  width: 100%;
  min-height: 52px;
}

.checkout-payment-channel { margin-top: 10px; text-align: center; }
.checkout-payment-channel:empty { display: none; }

@media (max-width: 880px) {
  .checkout-content { max-width: 640px; }
  .checkout-title { margin: 9px 0 18px; }
  .checkout-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .checkout-recipient { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .shop-checkout-page .checkout-summary .bag-item img { width: 54px; height: 72px; }
}
