@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #ECECEC;
  --paper: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #767676;
  --line: #EDEDED;
  --accent: #16A34A;
  --accent-dark: #15803D;
  --accent-tint: #E3F7E9;
  --pix: #32BCAD;
  --pix-tint: #E4F6F4;
  --radius-lg: 14px;
  --radius-md: 10px;
}

* { box-sizing: border-box; }

.hidden { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px 14px 28px;
  position: relative;
}

.banner {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.content-sheet {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px 16px;
}

.brand {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.secure {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.secure svg { width: 13px; height: 13px; flex: none; }

main.checkout {
  padding: 0 20px 140px;
  display: flex;
  flex-direction: column;
}

/* Sections: full-bleed, divided by hairlines — no floating cards */
.card {
  background: var(--paper);
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.card:last-of-type { border-bottom: none; }

/* Product section */
.product-card {
  display: flex;
  gap: 16px;
  align-items: center;
}

.product-media {
  width: 68px;
  height: 68px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media svg { width: 30px; height: 30px; color: var(--accent); }

.product-info { flex: 1; min-width: 0; }

.product-info h1 {
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 4px;
  line-height: 1.25;
  overflow-wrap: break-word;
  letter-spacing: -0.01em;
}

.product-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* Summary section */
.summary-card .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 5px 0;
}

.summary-card .row.total {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 12px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
}

.summary-card .row.total span:last-child {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
}

.summary-card .row.discount-row span:last-child { color: var(--pix); font-weight: 700; }

.coupon-toggle {
  background: none;
  border: none;
  padding: 12px 0 0;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.coupon-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.coupon-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  background: var(--paper);
}

.coupon-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.coupon-row button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 18px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  flex: none;
}

.coupon-msg {
  margin: 8px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  min-height: 1em;
}

.coupon-msg.ok { color: var(--pix); }
.coupon-msg.error { color: var(--accent); }

/* Customer data section */
.customer-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
}

.customer-card-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.customer-card-header h2 svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--ink-soft);
}

.country-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
}

.country-flag { width: 20px; height: auto; flex: none; border-radius: 2px; }

.country-code {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.country-change {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
  background: var(--paper);
  color: var(--ink);
}

.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field input:invalid:not(:placeholder-shown) { border-color: #F2B6BA; }

/* Payment section */
.payment-card { position: relative; transition: opacity 0.25s ease; padding-bottom: 20px; }

.payment-card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 2px 0 14px;
}

/* Method tabs: side-by-side selectable boxes */
.method-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.method-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.method-tab svg { width: 24px; height: 24px; }

.method-tab.active {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-dark);
}

.pix-icon { width: 24px; height: 24px; object-fit: contain; }
.pix-icon-white { filter: brightness(0) invert(1); }

.method-panel { display: none; }
.method-panel.active { display: block; }

.pix-pay-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pix);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 15px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
}

.pix-pay-btn .pix-icon { width: 20px; height: 20px; }
.pix-pay-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.pix-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.pix-info-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pix-info-item svg {
  width: 20px;
  height: 20px;
  color: var(--pix);
  flex: none;
  margin-top: 2px;
}

.pix-info-item strong { display: block; font-size: 0.85rem; margin-bottom: 2px; }
.pix-info-item p { margin: 0; font-size: 0.78rem; color: var(--ink-soft); line-height: 1.4; }

.footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin: 20px 0 0;
}

/* Result overlay (success / pix / error) */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  transition: opacity 0.2s ease;
}

.overlay.hidden { display: none; }

.sheet {
  width: 100%;
  max-width: 480px;
  background: var(--paper);
  border-radius: 20px 20px 0 0;
  padding: 28px 24px 34px;
  text-align: center;
  animation: sheet-up 0.3s cubic-bezier(.2,.9,.3,1.2) both;
  max-height: 88vh;
  overflow-y: auto;
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet .icon-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-badge.success { background: var(--pix-tint); color: var(--pix); }
.icon-badge.pending { background: var(--accent-tint); color: var(--accent); }
.icon-badge.error { background: var(--accent-tint); color: var(--accent-dark); }

.icon-badge svg { width: 28px; height: 28px; }

.sheet h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.sheet p { color: var(--ink-soft); font-size: 0.88rem; margin: 0 0 18px; }

.qr-box {
  background: #FAFAFA;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.qr-box img {
  width: 176px;
  height: 176px;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}

.pix-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  margin-top: 12px;
}

.pix-copy input {
  border: none;
  background: transparent;
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-family: monospace;
}

.pix-copy button {
  background: var(--pix);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  flex: none;
}

.countdown {
  font-size: 0.78rem;
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 4px;
}

.sheet .close-btn {
  margin-top: 6px;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Card Payment Brick container polish */
#cardPaymentBrick_container { min-height: 220px; }

/* Countdown bar */
.countdown-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  /* sangra até a borda de .page, ignorando o padding do "cartão flutuante" */
  margin: -14px -14px 14px;
}

.countdown-bar strong {
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* Order bump */
.order-bump-card { padding: 0; }

.order-bump-label {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  cursor: pointer;
  align-items: flex-start;
}

.order-bump-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  accent-color: var(--accent);
  flex: none;
}

.order-bump-media {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.order-bump-media img { width: 100%; height: 100%; object-fit: cover; }
.order-bump-media svg { width: 26px; height: 26px; color: var(--accent); }

.order-bump-info { flex: 1; min-width: 0; }

.order-bump-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.order-bump-info strong { display: block; font-size: 0.92rem; margin-bottom: 2px; }
.order-bump-info p { margin: 0 0 4px; font-size: 0.8rem; color: var(--ink-soft); }
.order-bump-price { font-weight: 800; color: var(--accent-dark); font-size: 0.88rem; }

/* Testimonials */
.testimonials-section { padding: 20px 0; border-top: 1px solid var(--line); }
.testimonials-section h2 { font-size: 1rem; margin: 0 0 14px; }

.testimonial-card {
  background: #FAFAFA;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}

.testimonial-stars { color: #F5A623; font-size: 0.8rem; margin-bottom: 6px; letter-spacing: 1px; }
.testimonial-text { margin: 0 0 8px; font-size: 0.85rem; color: var(--ink); line-height: 1.5; }
.testimonial-name { font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }

/* Social proof toast (simulado) */
.social-toast {
  position: fixed;
  left: 16px;
  bottom: 16px;
  max-width: 300px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 40;
  animation: toast-in 0.3s ease both;
}

.social-toast .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  background: var(--pix-tint);
  color: var(--pix);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.social-toast .text { font-size: 0.78rem; line-height: 1.35; }
.social-toast .text strong { display: block; font-size: 0.8rem; }
.social-toast .text span { color: var(--ink-soft); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.info-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 340px;
  margin: 0 auto;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: 12px 16px;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: center;
  z-index: 40;
  animation: toast-in 0.3s ease both;
}
