:root {
  --lime: #c8ff00;
  --black: #111111;
  --gray-700: #444444;
  --gray-200: #e8e8e8;
  --gray-100: #f5f5f5;
  --white: #ffffff;
  --font: "Montserrat", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--black);
}

a {
  color: inherit;
  text-decoration: none;
}

input,
select,
button {
  font: inherit;
}

.checkout-body {
  background: var(--gray-100);
  min-height: 100dvh;
}

.checkout-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 24px;
}

.checkout-brand img {
  height: 38px;
}

.checkout-strip {
  background: var(--lime);
  text-align: center;
  padding: 10px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.checkout-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--white);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.45;
}

.step.active,
.step.done {
  opacity: 1;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.step.active .step-dot {
  background: var(--lime);
  color: var(--black);
}

.step.done .step-dot {
  background: var(--black);
  color: var(--white);
}

.step-label {
  font-size: 0.68rem;
  font-weight: 700;
}

.step-bar {
  width: 40px;
  height: 2px;
  background: var(--gray-200);
}

.checkout-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-box {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.card-box.hidden {
  display: none !important;
}

.box-title {
  margin: 0 0 20px;
  font-size: 1.1rem;
  font-weight: 800;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
}

.field-row {
  display: grid;
  gap: 12px;
}

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.summary-items {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}

.summary-item small {
  display: block;
  color: var(--gray-700);
  margin-top: 2px;
}

.delivery-section,
.address-block {
  margin-top: 8px;
  margin-bottom: 20px;
}

.section-label {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.delivery-options {
  display: grid;
  gap: 10px;
}

.delivery-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.delivery-option:has(input:checked) {
  border-color: var(--black);
  background: #fafef0;
}

.delivery-option input {
  margin-top: 4px;
  accent-color: var(--black);
}

.delivery-option strong {
  display: block;
  font-size: 0.9rem;
}

.delivery-option small {
  display: block;
  margin-top: 2px;
  color: var(--gray-700);
  font-size: 0.78rem;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  padding-right: 40px;
}

.input-adorn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
}

.input-adorn.ok {
  color: #16a34a;
  font-weight: 800;
}

.hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--gray-700);
}

.cep-ok {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.cep-ok p {
  margin: 4px 0 0;
}

.mini-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.address-block {
  padding-top: 4px;
  border-top: 1px solid var(--gray-200);
}

.summary-totals .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.summary-totals .row-total {
  border-top: 1px solid var(--gray-200);
  margin-top: 8px;
  padding-top: 16px;
  font-weight: 800;
  font-size: 1.1rem;
}

.pay-option {
  border: 2px solid var(--gray-200);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
}

.pay-option.selected {
  border-color: var(--black);
}

.pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--gray-100);
}

.pay-title {
  font-weight: 800;
  font-size: 0.95rem;
}

.pay-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--lime);
  padding: 4px 10px;
  border-radius: 999px;
}

.pay-body {
  padding: 16px;
}

.pay-amount {
  font-size: 0.95rem;
  margin: 12px 0 16px;
}

.muted {
  color: var(--gray-700);
}

.sm {
  font-size: 0.85rem;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 999px;
  background: var(--lime);
  color: var(--black);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-submit:hover {
  filter: brightness(0.95);
}

.btn-dark {
  background: var(--black);
  color: var(--white);
}

.btn-back {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
}

.empty-cart {
  text-align: center;
  padding: 60px 20px;
}

.empty-cart h2 {
  margin: 0 0 12px;
}

.empty-cart p {
  color: var(--gray-700);
  margin: 0 0 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
}

.success-box {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--lime);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
}

.order-code {
  font-weight: 800;
  margin-top: 16px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 8px;
}

.spinner.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

.checkout-legal-footer {
  text-align: center;
  padding: 24px 16px 40px;
  font-size: 0.75rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.checkout-legal-footer a {
  color: var(--black);
  font-weight: 600;
}

.pay-legal {
  font-size: 0.75rem;
  color: var(--gray-700);
  margin: 0 0 16px;
  line-height: 1.5;
}

.pay-legal a {
  color: var(--black);
  font-weight: 600;
}
