:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-soft: #F2ECE1;
  --primary: #1E4D3B;
  --primary-deep: #132A21;
  --accent: #D95D39;
  --accent-hover: #C24B28;
  --text: #1C2420;
  --muted: #526058;
  --border: #E2DACD;
  --danger: #B91C1C;
  --danger-bg: #FEF2F2;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --shadow-sm: 0 6px 20px rgba(19, 42, 33, 0.06);
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Top Marquee Strip (~36px, 1 line on mobile) */
.top-strip {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 36px;
  background: var(--primary-deep);
  color: #FAF7F2;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.top-strip__track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
  animation: checkoutMarquee 26s linear infinite;
}

.top-strip__group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 12px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.top-strip__tag {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.top-strip__sep {
  opacity: 0.45;
}

@keyframes checkoutMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .top-strip__track {
    animation: none;
  }
}

.container {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding-inline: 14px;
}

.checkout-shell {
  padding-top: 14px;
  padding-bottom: 44px;
}

.checkout-banner {
  margin: 0 0 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.checkout-banner img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.checkout-sidebar {
  order: -1;
  display: grid;
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
}

/* Compact Sidebar / Top Mobile Summary */
.summary-card {
  padding: 14px 16px;
}

.summary-product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-product img {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.summary-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: rgba(30, 77, 59, 0.10);
  padding: 2px 8px;
  border-radius: 999px;
}

.summary-product h2 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--primary-deep);
  margin: 4px 0 2px;
}

.summary-price-main {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

/* Hide redundant bullet list on mobile so Step 1 + Step 2 appear immediately */
.summary-bullets {
  display: none;
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--muted);
}

.summary-bullets li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.summary-bullets li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 900;
}

.summary-lines {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.summary-line strong {
  color: var(--primary-deep);
  white-space: nowrap;
}

.summary-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1.5px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.summary-total span {
  font-weight: 700;
  color: var(--primary-deep);
}

.summary-total strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--primary);
}

.guarantee-mini {
  display: none;
}

.guarantee-mini h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--primary-deep);
  margin: 0 0 6px;
}

.guarantee-mini p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Form Steps */
.step-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 14px;
}

.step-badge {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  margin-top: 2px;
}

.step-head h1,
.step-head h2 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.2;
  color: var(--primary-deep);
  margin: 0;
}

.step-head p {
  margin: 3px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 5px;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: #FFFDF9;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 59, 0.14);
}

/* Payment Method Section (Strictly Step 2) */
.payment-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.method-tab {
  border: 1.5px solid var(--border);
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  display: grid;
  gap: 2px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.method-tab strong {
  font-size: 0.96rem;
  color: var(--primary-deep);
}

.method-tab span {
  font-size: 0.78rem;
  color: var(--muted);
}

.method-tab.is-active {
  border-color: var(--primary);
  background: rgba(30, 77, 59, 0.08);
  box-shadow: 0 0 0 2px rgba(30, 77, 59, 0.14);
}

.method-panel {
  margin-top: 12px;
  padding: 13px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.method-panel p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Order Bumps (Strictly Step 3) */
.bumps-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.bumps-section__head {
  margin-bottom: 12px;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-hover);
  background: rgba(217, 93, 57, 0.13);
  padding: 4px 10px;
  border-radius: 999px;
}

.bumps-section__head h2 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--primary-deep);
  margin: 7px 0 0;
}

.bumps-list {
  display: grid;
  gap: 12px;
}

.bump-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  border: 2px dashed #D7CBB8;
  background: #FFFDF8;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.bump-card.is-selected {
  border-style: solid;
  border-color: var(--primary);
  background: rgba(30, 77, 59, 0.06);
  box-shadow: 0 6px 18px rgba(30, 77, 59, 0.10);
}

.bump-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bump-card__img {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.bump-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.bump-card__top strong {
  font-size: 0.94rem;
  line-height: 1.25;
  color: var(--primary-deep);
}

.bump-price {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(30, 77, 59, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.bump-card__body p {
  margin: 5px 0 9px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
}

.bump-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 9px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary-deep);
}

.bump-toggle-pill::before {
  content: '';
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid var(--primary);
  background: #fff;
  display: inline-block;
}

.bump-card.is-selected .bump-toggle-pill {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.bump-card.is-selected .bump-toggle-pill::before {
  content: '✓';
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  color: var(--primary);
  background: #fff;
}

/* Submit */
.pay-submit-wrap {
  margin-top: 20px;
}

.alert-error {
  margin-bottom: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--danger-bg);
  border: 1px solid rgba(185, 28, 28, 0.25);
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 700;
}

.btn-pay {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(217, 93, 57, 0.30);
  transition: background 0.16s ease, transform 0.16s ease;
}

.btn-pay:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-pay:disabled {
  opacity: 0.7;
  cursor: wait;
}

.pay-micro {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* Pix & Success Panels */
.pix-result,
.success-panel {
  text-align: center;
}

.pix-result h2,
.success-panel h2 {
  font-family: var(--font-display);
  margin: 10px 0 6px;
  color: var(--primary-deep);
}

.pix-qr-wrap {
  margin: 16px auto;
  width: 220px;
  max-width: 100%;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.pix-copy-box {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.pix-copy-box input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.84rem;
}

.btn-copy {
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.pix-status {
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

.success-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
}

/* Desktop Breakpoint */
@media (min-width: 860px) {
  .container {
    padding-inline: 20px;
  }

  .checkout-shell {
    padding-top: 22px;
  }

  .checkout-banner {
    margin-bottom: 20px;
  }

  .checkout-grid {
    grid-template-columns: 1.32fr 0.88fr;
    gap: 20px;
  }

  .checkout-sidebar {
    order: 1;
    position: sticky;
    top: 52px;
  }

  .card {
    padding: 24px;
  }

  .summary-bullets {
    display: grid;
  }

  .guarantee-mini {
    display: block;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .bump-card {
    grid-template-columns: 88px 1fr;
    padding: 14px;
  }

  .bump-card__img {
    width: 88px;
    height: 88px;
  }
}
