:root {
  font-family: "DM Sans", Arial, sans-serif;
  color: #333;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --checkout-yellow: #ffe600;
  --checkout-blue: #3483fa;
  --checkout-green: #00a650;
  --checkout-line: #e5e5e5;
  --checkout-muted: #737373;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  font-size: 15px;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.checkout-header {
  position: sticky;
  z-index: 5;
  top: 0;
  width: min(100%, 520px);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 auto;
  padding: 10px 16px;
  background: var(--checkout-yellow);
  color: #333;
}

.checkout-header .store-brand {
  display: inline-flex;
  align-items: center;
}

.checkout-header .store-brand__logo {
  display: block;
  width: 130px;
  height: auto;
}

.checkout-header a:focus-visible {
  outline: 3px solid rgba(52, 124, 246, 0.4);
  outline-offset: 2px;
}

.checkout-page {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 18px 16px 40px;
}

h1 {
  margin: 0 0 20px;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.25;
}

.checkout-product {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.checkout-product img {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #f5f5f5;
  object-fit: contain;
}

.checkout-product div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.checkout-product strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.checkout-product span {
  color: var(--checkout-muted);
  font-size: 12px;
}

.checkout-layout {
  display: grid;
  gap: 16px;
}

.delivery-card,
.order-summary {
  border: 1px solid var(--checkout-line);
  border-radius: 17px;
  background: #fff;
}

.delivery-card {
  padding: 16px;
}

.delivery-card h2,
.order-summary h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
}

.delivery-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
  padding: 3px;
  border-radius: 16px;
  background: #f2f2f2;
}

.delivery-tabs button {
  min-height: 46px;
  flex: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #333;
  font-weight: 600;
  cursor: pointer;
}

.delivery-tabs button[aria-selected="true"] {
  border-color: var(--checkout-blue);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.delivery-tabs button span {
  color: var(--checkout-green);
  font-size: 12px;
  font-weight: 500;
}

.delivery-tabs button[data-delivery-method="pickup"] span {
  color: var(--checkout-muted);
}

.address-card {
  padding: 13px;
  border: 1px solid var(--checkout-line);
  border-radius: 13px;
  background: #fff;
}

.address-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.address-heading h3,
.shipping-options h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.address-heading p {
  margin: 2px 0 0;
  color: var(--checkout-muted);
  font-size: 12px;
}

.address-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.invoice-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--checkout-line);
  border-radius: 10px;
  background: #fff;
}

.invoice-fields h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.invoice-fields > p {
  margin: -5px 0 0;
  color: var(--checkout-muted);
  font-size: 11px;
}

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field > span {
  font-size: 12px;
  font-weight: 500;
}

.field small {
  color: var(--checkout-muted);
  font-size: 11px;
  font-weight: 400;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  height: 41px;
  padding: 0 10px;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 14px;
}

.field input:focus,
.field select:focus {
  border-color: var(--checkout-blue);
  outline: 2px solid rgba(52, 131, 250, 0.16);
}

.button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.button--outline {
  border: 1px solid var(--checkout-blue);
  background: #fff;
  color: var(--checkout-blue);
}

.button--primary {
  width: 100%;
  background: var(--checkout-blue);
  color: #fff;
}

.button--primary:disabled {
  background: #a7c7f7;
  cursor: not-allowed;
}

.saved-address {
  display: grid;
  gap: 3px;
  font-size: 13px;
  line-height: 1.4;
}

.saved-address strong {
  font-size: 14px;
}

.saved-address span {
  overflow-wrap: anywhere;
}

.text-button {
  justify-self: start;
  margin-top: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--checkout-blue);
  font-size: 13px;
  cursor: pointer;
}

.shipping-options {
  margin-top: 20px;
}

.shipping-options h3 {
  margin-bottom: 10px;
}

.shipping-options h3 span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--checkout-green);
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
}

.shipping-options h3 svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.shipping-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 0 4px;
  font-size: 13px;
}

.shipping-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--checkout-blue);
}

.shipping-option > span {
  flex: 1;
}

.shipping-option strong {
  color: var(--checkout-green);
  white-space: nowrap;
}

.shipping-note {
  margin: 4px 0 0 27px;
  color: var(--checkout-muted);
  font-size: 11px;
}

.pickup-notice {
  padding: 14px;
  border-radius: 12px;
  background: #f5f5f5;
  color: var(--checkout-muted);
  font-size: 13px;
  line-height: 1.5;
}

.order-summary {
  padding: 16px;
}

.order-summary h2 {
  margin-bottom: 15px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 11px 0;
  font-size: 14px;
}

.summary-row strong {
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.summary-row--discount strong,
.savings {
  color: var(--checkout-green);
}

.order-summary hr {
  margin: 14px 0 11px;
  border: 0;
  border-top: 1px solid var(--checkout-line);
}

.summary-row--total {
  align-items: baseline;
  margin: 0;
  font-size: 18px;
}

.summary-row--total strong {
  font-weight: 700;
}

.savings {
  margin: 8px 0 17px;
  font-size: 12px;
  text-align: right;
}

.payment-method {
  margin: 0 0 16px;
}

.payment-method__label {
  display: block;
  margin-bottom: 7px;
  color: #333;
  font-size: 13px;
  font-weight: 500;
}

.payment-method__option {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--checkout-line);
  border-radius: 9px;
  background: #fff;
}

.pix-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #333;
  font-size: 15px;
}

.pix-brand img {
  width: 25px;
  height: 25px;
}

.pix-brand strong {
  font-weight: 700;
}

.payment-selected {
  width: 20px;
  height: 20px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--checkout-blue);
  border-radius: 50%;
}

.payment-selected span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--checkout-blue);
}

.checkout-disclaimer {
  margin: 12px 0 0;
  color: var(--checkout-muted);
  font-size: 11px;
  line-height: 1.45;
}

.flow-back,
.flow-link {
  display: inline-block;
  color: var(--checkout-blue);
  font-size: 13px;
  text-decoration: none;
}

.flow-back {
  margin-bottom: 12px;
}

.flow-kicker {
  margin: 0 0 5px;
  color: var(--checkout-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.flow-intro {
  margin: -10px 0 18px;
  color: var(--checkout-muted);
  font-size: 14px;
  line-height: 1.5;
}

.payment-order,
.qr-panel,
.tracking-product,
.tracking-status {
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid var(--checkout-line);
  border-radius: 14px;
  background: #fff;
}

.payment-product,
.tracking-product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-product img,
.tracking-product img {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #f5f5f5;
  object-fit: contain;
}

.payment-product div,
.tracking-product div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.payment-product strong,
.tracking-product strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.payment-product span,
.tracking-product span {
  color: var(--checkout-muted);
  font-size: 12px;
}

.payment-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--checkout-line);
  font-size: 15px;
}

.payment-total strong {
  font-weight: 700;
}

.payment-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--checkout-muted);
  font-size: 13px;
}

.payment-status strong {
  color: #333;
  font-weight: 600;
  text-align: right;
}

.qr-panel .pix-brand {
  margin-bottom: 14px;
}

.qr-placeholder {
  width: min(100%, 230px);
  aspect-ratio: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 20px;
  border: 1px dashed #c9c9c9;
  border-radius: 12px;
  background: #fafafa;
  color: #333;
  text-align: center;
}

.qr-placeholder strong {
  font-size: 15px;
}

.qr-placeholder span {
  color: var(--checkout-muted);
  font-size: 12px;
  line-height: 1.4;
}

.qr-placeholder img {
  width: min(100%, 190px);
  aspect-ratio: 1;
  background: #fff;
  object-fit: contain;
}

.pix-copy-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.pix-copy-panel label {
  font-size: 13px;
  font-weight: 600;
}

.pix-copy-panel textarea {
  width: 100%;
  min-height: 84px;
  padding: 9px;
  border: 1px solid var(--checkout-line);
  border-radius: 8px;
  background: #fafafa;
  color: #333;
  font: inherit;
  font-size: 12px;
  overflow-wrap: anywhere;
  resize: vertical;
}

.payment-notice,
.tracking-disclaimer {
  margin: 13px 0 0;
  color: var(--checkout-muted);
  font-size: 12px;
  line-height: 1.5;
}

.flow-link {
  margin: 2px 0 10px;
}

.flow-link--secondary {
  display: block;
  margin-top: 10px;
}

.tracking-page h1 {
  margin-bottom: 16px;
}

.tracking-eta {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid #d5e9dd;
  border-radius: 13px;
  background: #f3faf5;
}

.tracking-eta span {
  color: var(--checkout-muted);
  font-size: 12px;
}

.tracking-eta strong {
  color: var(--checkout-green);
  font-size: 19px;
}

.tracking-eta__delivery {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tracking-eta__delivery svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
}

.tracking-status {
  padding-bottom: 5px;
}

.tracking-status h2 {
  margin: 0 0 15px;
  font-size: 17px;
  font-weight: 600;
}

.tracking-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tracking-timeline li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 48px;
  color: var(--checkout-muted);
  font-size: 13px;
}

.tracking-timeline li:not(:last-child)::after {
  position: absolute;
  top: 24px;
  left: 10px;
  width: 2px;
  height: 24px;
  background: var(--checkout-line);
  content: "";
}

.tracking-timeline__marker {
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #c9c9c9;
  border-radius: 50%;
  background: #fff;
  font-size: 11px;
}

.tracking-timeline li.is-complete,
.tracking-timeline li.is-current {
  color: #333;
}

.tracking-timeline li.is-complete .tracking-timeline__marker {
  border-color: var(--checkout-green);
  background: var(--checkout-green);
  color: #fff;
}

.tracking-timeline li.is-current .tracking-timeline__marker {
  border: 2px solid var(--checkout-blue);
  color: var(--checkout-blue);
  font-weight: 700;
}

.tracking-timeline li div {
  display: grid;
  gap: 2px;
  padding-top: 2px;
}

.tracking-timeline small {
  color: var(--checkout-muted);
  font-size: 11px;
}

.checkout-status {
  margin: 10px 0 0;
  color: #333;
  font-size: 12px;
  line-height: 1.45;
}

[hidden] {
  display: none !important;
}

@media (max-width: 360px) {
  .checkout-page {
    padding-inline: 12px;
  }

  .checkout-header {
    padding-inline: 11px;
  }

  .checkout-header .store-brand__logo {
    width: 108px;
  }

  .delivery-card,
  .order-summary {
    padding: 13px;
  }

  .address-card {
    padding: 11px;
  }
}
