#checkout-dialog {
  width: min(960px, calc(100% - 40px));
  height: min(850px, calc(100svh - 48px));
  max-width: none;
  max-height: calc(100svh - 48px);
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  color: #111;
}
#checkout-dialog::backdrop {
  background: #000b;
}
.checkout-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.checkout-header {
  position: static;
  z-index: auto;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
  display: flex;
  grid-template-columns: none;
  justify-content: space-between;
  align-items: center;
  padding: 21px 28px;
  border-bottom: 1px solid #e8e8e8;
}
.checkout-header h2 {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1.7px;
  margin: 0;
}
.checkout-header button {
  border: 0;
  background: #fff;
  width: 34px;
  height: 34px;
  font-size: 25px;
  cursor: pointer;
}
.checkout-body {
  padding: 28px;
  overflow: auto;
  flex: 1;
}
.checkout-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  border-bottom: 1px solid #e7e7e7;
}
.checkout-manager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  max-width: 800px;
  margin: 0 auto 20px;
  padding: 10px 12px;
  border: 1px solid #e8e8e8;
  color: #666;
  background: #fafafa;
  font-size: 10px;
  line-height: 1.4;
}
.checkout-manager > span:first-child { color: #111; font-size: 15px; line-height: 1; }
.checkout-manager a { color: #111; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.checkout-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 15px;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #aaa;
}
.checkout-steps li:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: transparent;
}
.checkout-steps li[aria-current] {
  color: #111;
}
.checkout-steps li[aria-current]:after,
.checkout-steps li.complete:after {
  background: #111;
}
.checkout-steps li > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #ddd;
  border-radius: 50%;
  font-size: 10px;
}
.checkout-steps li[aria-current] > span,
.checkout-steps li.complete > span {
  border-color: #111;
  background: #111;
  color: #fff;
}
.checkout-step {
  max-width: 800px;
  margin: 0 auto;
}
.checkout-kicker {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #aaa;
  margin: 0 0 8px;
}
.checkout-step h3 {
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.6px;
  margin: 0 0 30px;
}
.checkout-step > label {
  display: block;
  margin: 18px 0;
}
.checkout-step label > span,
.checkout-grid label > span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 8px;
}
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.account-prefill {
  display: grid !important;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin: 0 0 22px !important;
  padding: 14px;
  border: 1px solid #ddd;
  cursor: pointer;
}
.account-prefill[hidden] { display: none !important; }
.account-prefill input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: #111; }
.account-prefill > span { margin: 0 !important; color: #111 !important; }
.account-prefill b { display: block; font-size: 11px; letter-spacing: .2px; }
.account-prefill small { display: block; margin-top: 4px; color: #777; font-size: 10px; line-height: 1.4; }
.checkout-step input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.checkout-step select,
.checkout-step textarea {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 0;
  background: #fff;
  padding: 14px;
  font:
    14px Arial,
    sans-serif;
  color: #111;
  min-height: 48px;
}
.checkout-step input:focus,
.checkout-step select:focus,
.checkout-step textarea:focus {
  outline: 1px solid #111;
  outline-offset: 1px;
}
.delivery-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 26px;
}
.delivery-options > label {
  position: relative;
  cursor: pointer;
}
.delivery-options input {
  position: absolute;
  opacity: 0;
}
.delivery-options label > span {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 92px;
  padding: 15px;
  border: 1px solid #ddd;
  margin: 0;
  color: #111;
}
.delivery-options input:checked + span {
  border-color: #111;
  box-shadow: inset 0 0 0 1px #111;
}
.delivery-options input:disabled + span {
  opacity: 0.35;
  cursor: not-allowed;
}
.delivery-options b {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.6px;
}
.delivery-options small {
  font-size: 9px;
  line-height: 1.4;
  color: #888;
}
.pickup-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
  font-size: 10px;
  color: #666;
}
.map-location-label {
  margin: -4px 0 10px;
  color: #111;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.pickup-heading button {
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  font: 9px Arial;
  letter-spacing: 0.8px;
  cursor: pointer;
}
.pickup-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  padding-right: 3px;
}
.pickup-list > p {
  grid-column: 1/-1;
  font-size: 11px;
  color: #888;
  line-height: 1.6;
}
.pickup-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 9px;
  padding: 13px;
  border: 1px solid #e4e4e4;
  cursor: pointer;
}
.pickup-card:has(input:checked) {
  border-color: #111;
  background: #fafafa;
}
.pickup-card input {
  margin: 2px 0 0;
  accent-color: #111;
}
.pickup-card span {
  margin: 0 !important;
}
.pickup-card b {
  display: block;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
}
.pickup-card small {
  display: block;
  font-size: 8px;
  color: #999;
  line-height: 1.5;
  margin-top: 5px;
}
.pickup-card a {
  position: relative;
  z-index: 2;
  font-size: 8px;
  text-decoration: underline;
  color: #777;
  white-space: nowrap;
}
.delivery-quote {
  min-height: 18px;
  margin: 16px 0;
  font-size: 11px;
  line-height: 1.6;
  color: #555;
}
.payment-choice {
  border: 0;
  padding: 0;
  margin: 30px 0 0;
}
.payment-choice legend {
  font-size: 9px;
  letter-spacing: 1.3px;
  color: #777;
  margin-bottom: 11px;
}
.payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.payment-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid #ddd;
  cursor: pointer;
}
.payment-option input {
  position: absolute;
  opacity: 0;
}
.payment-option:has(input:checked) {
  border-color: #111;
  box-shadow: inset 0 0 0 1px #111;
}
.payment-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}
.payment-sbp { min-height: 82px; }
.payment-sbp .payment-icon {
  width: 50px;
  height: 50px;
  background: #111;
  color: #fff;
  border-color: #111;
  font-size: 12px;
}
.payment-option b {
  display: block;
  font-size: 11px;
  font-weight: 500;
}
.payment-option small {
  display: block;
  font-size: 9px;
  color: #888;
  margin-top: 5px;
}
.payment-note {
  font-size: 10px;
  color: #888;
  line-height: 1.6;
}
.checkout-consents {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #eee;
}
.checkout-consents label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  color: #666;
  font-size: 10px;
  line-height: 1.55;
  cursor: pointer;
}
.checkout-consents input[type="checkbox"] {
  appearance: auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  margin: 1px 0 0;
  accent-color: #111;
}
.checkout-consents a,
.manager-help a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.manager-help {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid #e3e3e3;
  font-size: 10px;
  line-height: 1.5;
}
.review-row {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding: 13px 0;
  border-bottom: 1px solid #eee;
  font-size: 11px;
  line-height: 1.5;
}
.review-row strong {
  font-weight: 400;
  white-space: nowrap;
}
.checkout-error {
  max-width: 800px;
  margin: 16px auto 0;
  color: #a32626;
  font-size: 11px;
  line-height: 1.6;
}
.checkout-bottom {
  position: static;
  width: 100%;
  max-width: none;
  margin: 0;
  border-top: 1px solid #e8e8e8;
  padding: 16px 28px;
  background: #fff;
  color: #111;
  font-size: 11px;
}
.checkout-bottom > div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 12px;
}
.checkout-bottom strong {
  font-weight: 400;
}
.checkout-bottom > button {
  width: 100%;
  height: 49px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font: 10px Arial;
  letter-spacing: 1.4px;
  cursor: pointer;
}
.checkout-bottom > button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.checkout-bottom #checkout-previous {
  height: 32px;
  border: 0;
  background: #fff;
  color: #777;
  margin-top: 3px;
  font-size: 9px;
}
@media (max-width: 650px) {
  #checkout-dialog {
    width: 100%;
    height: 100svh;
    max-height: 100svh;
  }
  .checkout-header {
    padding: 16px 18px;
  }
  .checkout-body {
    padding: 20px 16px;
  }
  .checkout-steps {
    margin-bottom: 26px;
  }
  .checkout-steps li {
    font-size: 8px;
    gap: 6px;
  }
  .checkout-steps li > span {
    width: 22px;
    height: 22px;
  }
  .checkout-step h3 {
    font-size: 22px;
    margin-bottom: 24px;
  }
  .checkout-grid,
  .delivery-options,
  .payment-options,
  .pickup-list {
    grid-template-columns: 1fr;
  }
  .delivery-options label > span {
    min-height: 70px;
  }
  .payment-sbp {
    min-height: 82px;
  }
  .checkout-step input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
  .checkout-step select,
  .checkout-step textarea {
    font-size: 16px;
  }
  .checkout-bottom {
    padding: 12px 16px;
  }
  .pickup-list {
    max-height: 260px;
  }
}

/* Keep contact and address fields in clean, independent rows. */
.checkout-grid {
  align-items: start;
  column-gap: 18px;
  row-gap: 24px;
  margin: 0 0 24px;
}
.checkout-grid + .checkout-grid {
  margin-top: 0;
}
.checkout-grid > label {
  display: flex;
  min-width: 0;
  margin: 0;
  flex-direction: column;
}
.checkout-grid > label > span {
  flex: 0 0 auto;
  min-height: 17px;
  margin: 0 0 8px;
  line-height: 1.35;
}
.checkout-grid > label > input,
.checkout-grid > label > select,
.checkout-grid > label > textarea {
  display: block;
  margin: 0;
}
@media (max-width: 650px) {
  .checkout-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 16px;
    margin-bottom: 16px;
  }
}
