/* Checkout Cakto - Réplica visual */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

:root {
  --cakto-bg: #f1f1f1;
  --cakto-primary: #e7a834;
  --cakto-primary-hover: #d4982e;
  --cakto-text: #000000;
  --cakto-text-secondary: #4B5563;
  --cakto-text-muted: #546E7A;
  --cakto-text-label: #324858;
  --cakto-border: #CFD8DE;
  --cakto-border-light: #E5EAEE;
  --cakto-white: #ffffff;
  --cakto-green: #0B6856;
  --cakto-radius: 10px;
  --cakto-max: 720px;
}

.cakto-page {
  min-height: 100vh;
  background: var(--cakto-bg);
  font-family: 'Roboto', ui-sans-serif, system-ui, sans-serif;
  color: var(--cakto-text);
  -webkit-font-smoothing: antialiased;
}

.cakto-wrap {
  max-width: var(--cakto-max);
  margin: 0 auto;
  padding: 0 0 32px;
}

/* Banner */
.cakto-banner {
  width: 100%;
  display: block;
  margin-bottom: 0;
}

.cakto-banner img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 280px;
  object-fit: cover;
}

/* Card principal */
.cakto-card {
  background: var(--cakto-white);
  margin: 0;
}

.cakto-inner {
  padding: 20px 16px;
}

@media (min-width: 768px) {
  .cakto-inner {
    padding: 24px 32px;
  }
}

/* Produto */
.cakto-product {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.cakto-product-img {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--cakto-border-light);
}

.cakto-product-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cakto-text);
}

/* Form */
.cakto-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cakto-field {
  margin-bottom: 16px;
}

.cakto-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--cakto-text-secondary);
  margin-bottom: 6px;
}

.cakto-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cakto-border);
  border-radius: var(--cakto-radius);
  font-size: 16px;
  font-family: inherit;
  color: var(--cakto-text);
  background: var(--cakto-white);
  box-shadow: none;
  appearance: none;
  transition: border-color 0.15s;
}

.cakto-field input:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}

.cakto-field input::placeholder {
  color: #A0AEC0;
}

/* Oferta */
.cakto-offer {
  margin: 8px 0 20px;
  border-radius: var(--cakto-radius);
  overflow: hidden;
  border: 1px solid var(--cakto-border-light);
}

.cakto-offer-header {
  background: var(--cakto-primary);
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
}

.cakto-offer-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: var(--cakto-white);
}

.cakto-offer-label {
  font-size: 14px;
  color: var(--cakto-text-label);
}

.cakto-offer-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--cakto-text-label);
  white-space: nowrap;
}

/* Pagamento */
.cakto-section-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--cakto-text-secondary);
  margin-bottom: 10px;
}

.cakto-payment-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cakto-pay-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 90px;
  flex: 1;
  max-width: 150px;
  padding: 10px 8px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: var(--cakto-white);
  color: #919EAB;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.cakto-pay-tab svg {
  width: 28px;
  height: 28px;
}

@media (min-width: 640px) {
  .cakto-pay-tab {
    font-size: 14px;
    min-width: 120px;
  }
  .cakto-pay-tab svg {
    width: 32px;
    height: 32px;
  }
}

.cakto-pay-tab.active {
  background: var(--cakto-primary);
  color: #fff;
}

.cakto-pay-tab.active svg {
  color: #fff;
  fill: #fff;
}

.cakto-pay-tab:not(.active) svg {
  color: #000;
  fill: #000;
}

.cakto-pay-panel {
  display: none;
  margin-top: 12px;
}

.cakto-pay-panel.active {
  display: block;
}

/* Campos cartão */
.cakto-card-fields .cakto-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cakto-card-fields .cakto-field-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .cakto-card-fields .cakto-field-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.cakto-pix-info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--cakto-radius);
  padding: 14px;
  font-size: 13px;
  color: #166534;
  line-height: 1.5;
}

.cakto-pix-info strong {
  display: block;
  margin-bottom: 4px;
}

/* Assinatura */
.cakto-subscription {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  margin-top: 8px;
  border-top: 1px solid var(--cakto-border-light);
  font-size: 14px;
  color: var(--cakto-text-muted);
}

/* Resumo */
.cakto-summary {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--cakto-border-light);
}

.cakto-summary h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--cakto-text);
}

.cakto-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--cakto-text-label);
  border-bottom: 1px solid var(--cakto-border-light);
}

.cakto-summary-row:last-of-type {
  border-bottom: none;
}

.cakto-summary-product strong {
  display: block;
  font-size: 14px;
  color: var(--cakto-text-label);
}

.cakto-summary-product span {
  font-size: 12px;
  color: var(--cakto-text-muted);
}

.cakto-summary-total {
  display: flex;
  justify-content: space-between;
  padding: 14px 0 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--cakto-text);
}

/* Botão pagar */
.cakto-btn-pay {
  width: 100%;
  padding: 16px 20px;
  margin-top: 8px;
  border: none;
  border-radius: var(--cakto-radius);
  background: var(--cakto-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cakto-btn-pay:hover:not(:disabled) {
  background: var(--cakto-primary-hover);
  box-shadow: 0 8px 16px rgba(231, 168, 52, 0.35);
}

.cakto-btn-pay:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Compra segura */
.cakto-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--cakto-text-muted);
}

.cakto-secure svg {
  width: 16px;
  height: 16px;
  color: var(--cakto-green);
}

/* Termos */
.cakto-terms {
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.45;
  color: #919EAB;
  text-align: center;
}

.cakto-terms a {
  color: var(--cakto-primary);
  text-decoration: underline;
}

/* Footer Cakto */
.cakto-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
}

.cakto-footer p {
  font-size: 12px;
  color: #919EAB;
  margin-bottom: 8px;
}

.cakto-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--cakto-green);
}

.cakto-logo svg {
  width: 24px;
  height: 24px;
}

/* Alerts */
.cakto-alert {
  padding: 12px 14px;
  border-radius: var(--cakto-radius);
  margin-bottom: 16px;
  font-size: 14px;
}

.cakto-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.cakto-alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Desktop two-column inside card */
@media (min-width: 1024px) {
  .cakto-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
  }

  .cakto-summary {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    position: sticky;
    top: 16px;
    background: #f9fafb;
    border-radius: var(--cakto-radius);
    padding: 20px;
    border: 1px solid var(--cakto-border-light);
  }
}

/* Página de pagamento PIX */
.cakto-payment-page {
  max-width: 520px;
  margin: 0 auto;
}

.cakto-payment-header {
  text-align: center;
  margin-bottom: 24px;
}

.cakto-payment-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cakto-payment-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--cakto-primary);
}

.cakto-alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.cakto-alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.cakto-qr-section {
  text-align: center;
  margin: 20px 0;
}

.cakto-qr-image {
  width: 260px;
  height: 260px;
  border: 1px solid var(--cakto-border-light);
  border-radius: var(--cakto-radius);
  padding: 8px;
  background: #fff;
  margin: 0 auto;
}

.cakto-qr-hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--cakto-text-muted);
}

.cakto-copy-section {
  margin: 20px 0;
}

.cakto-copy-section label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--cakto-text-secondary);
  margin-bottom: 8px;
}

.cakto-copy-box {
  display: flex;
  gap: 8px;
}

.cakto-copy-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--cakto-border);
  border-radius: var(--cakto-radius);
  font-size: 12px;
  font-family: monospace;
  background: #f9fafb;
}

.cakto-btn-copy {
  padding: 10px 16px;
  background: var(--cakto-primary);
  color: #fff;
  border: none;
  border-radius: var(--cakto-radius);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.cakto-btn-copy:hover {
  background: var(--cakto-primary-hover);
}

.cakto-payment-steps {
  margin: 20px 0;
}

.cakto-pay-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--cakto-text-label);
}

.cakto-pay-step-num {
  width: 28px;
  height: 28px;
  background: var(--cakto-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.cakto-confirm-form {
  margin-top: 16px;
}

.cakto-payment-info {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--cakto-border-light);
  font-size: 13px;
  color: var(--cakto-text-muted);
}

.cakto-payment-info p {
  margin-bottom: 4px;
}

/* Pagamento aprovado */
.cakto-success {
  text-align: center;
  padding: 8px 0 16px;
}

.cakto-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cakto-success-icon svg {
  width: 40px;
  height: 40px;
}

.cakto-success h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--cakto-text);
}

.cakto-success-amount {
  font-size: 15px;
  color: var(--cakto-text-label);
  margin-bottom: 4px;
}

.cakto-success-order {
  font-size: 13px;
  color: #919EAB;
  margin-bottom: 24px;
}

.cakto-whatsapp-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--cakto-radius);
  padding: 20px;
  margin-bottom: 24px;
}

.cakto-whatsapp-icon {
  width: 48px;
  height: 48px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cakto-whatsapp-icon svg {
  width: 26px;
  height: 26px;
}

.cakto-whatsapp-box h2 {
  font-size: 16px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 8px;
}

.cakto-whatsapp-box p {
  font-size: 14px;
  line-height: 1.5;
  color: #15803d;
}

.cakto-success-steps {
  list-style: none;
  text-align: left;
  margin: 0 0 20px;
  padding: 0;
}

.cakto-success-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--cakto-text-label);
  border-bottom: 1px solid var(--cakto-border-light);
}

.cakto-success-steps li:last-child {
  border-bottom: none;
}

.cakto-step-num {
  width: 28px;
  height: 28px;
  background: var(--cakto-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.cakto-success-note {
  font-size: 12px;
  line-height: 1.5;
  color: #919EAB;
  background: #f9fafb;
  border-radius: var(--cakto-radius);
  padding: 14px;
  text-align: left;
}
