/* ═══════════════════════════════════════════════════════
   pay.css — Checkout redesign 2026
   Brand: #8E5BEE, Roboto, #f0f0f5 bg
   ═══════════════════════════════════════════════════════ */

/* 1. Base */
body.pay {
  background: #f0f0f5;
  color: #192d35;
  font-family: "Roboto", sans-serif;
  line-height: 1.5;
  margin: 0; padding: 0;
  overflow-x: hidden;
}
html { overflow-x: hidden; }
body.pay *,
.checkout-page * { filter: none !important; text-shadow: none !important; }

/* 1b. Checkout nav header — tira do absoluto, cria barra dedicada */
body.pay header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  position: relative;
  z-index: 10;
  /* full-bleed: rompe o max-width do .container */
  width: 100vw;
  margin-left: calc((100% - 100vw) / 2);
}
body.pay header::after {
  content: "Pagamento seguro";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #8E5BEE;
  font-family: "Roboto", sans-serif;
  letter-spacing: .2px;
  padding-left: 18px;
  background-image: url("data:image/svg+xml,%3Csvg width='13' height='14' viewBox='0 0 13 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='6' width='11' height='8' rx='2' stroke='%238E5BEE' stroke-width='1.4'/%3E%3Cpath d='M4 6V4a2.5 2.5 0 0 1 5 0v2' stroke='%238E5BEE' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 13px 14px;
  pointer-events: none;
}
body.pay .navbar.altnavbar {
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  max-width: 940px !important;
  margin: 0 auto !important;
  padding: 12px 24px !important;
  background: transparent !important;
  justify-content: flex-start !important;
}

/* 2. Page wrapper */
.checkout-page {
  max-width: 940px;
  margin: 0 auto;
  padding: 56px 24px 56px !important;
}

/* 3. Two-column grid */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

/* 4. Cards */
.checkout-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 14px rgba(0,0,0,.07);
  overflow: hidden;
}

/* 5. Form card header */
.checkout-form-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f2f2f2;
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkout-form-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #192d35;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.checkout-form-body { padding: 24px; }

/* 6. Form groups */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 7px;
  letter-spacing: .1px;
}
.form-group input {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 13px 14px !important;
  font-size: 15px !important;
  color: #192d35 !important;
  background: #fafafa !important;
  border: 1.5px solid #ddd !important;
  border-radius: 10px !important;
  font-family: "Roboto", sans-serif;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-group input:focus {
  outline: none !important;
  border-color: #8E5BEE !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(142,91,238,.12) !important;
}
.form-group input::placeholder { color: #bbb; font-size: 14px; }
.field-error {
  font-size: 12px !important;
  color: #d32f2f !important;
  background: transparent !important;
  background-color: transparent !important;
  display: block !important;
  min-height: 16px;
  margin-top: 5px;
  padding: 0 !important;
  border-left: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  align-items: unset !important;
  gap: unset !important;
}
.field-error::before { content: none !important; }
.field-error:empty { display: none !important; }

/* 7. Terms checkbox */
.checkout-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 22px;
  cursor: pointer;
}
.checkout-terms input[type="checkbox"] {
  width: 18px !important; height: 18px !important; min-width: 18px;
  max-width: 18px !important; max-height: 18px !important;
  padding: 0 !important;
  flex: 0 0 18px;
  align-self: flex-start;
  flex-shrink: 0;
  appearance: none; -webkit-appearance: none;
  background: #fff !important;
  border: 2px solid #c8c8c8 !important;
  border-radius: 5px !important;
  cursor: pointer;
  position: relative;
  margin-top: 2px;
  transition: background .15s, border-color .15s;
  box-sizing: border-box !important;
}
.checkout-terms input[type="checkbox"]:checked {
  background: #8E5BEE !important;
  border-color: #8E5BEE !important;
}
.checkout-terms input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 13px; height: 13px;
  background-image: url("data:image/svg+xml,%3Csvg width='13' height='13' viewBox='0 0 13 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 6.5L5.5 9.5L10.5 3.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: translate(-50%,-50%) scale(0);
  transition: transform .15s ease;
}
.checkout-terms input[type="checkbox"]:checked::after {
  transform: translate(-50%,-50%) scale(1);
}
.checkout-terms span { font-size: 14px; color: #666; line-height: 1.5; }
.terms-link { color: #8E5BEE; font-weight: 600; text-decoration: none; }
.terms-link:hover { text-decoration: underline; }

/* 8. Submit button */
.checkout-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  width: 100% !important;
  padding: 15px 24px !important;
  background: #8E5BEE !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: .3px;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
  transition: background .2s, box-shadow .2s, transform .1s;
}
.checkout-btn:not(:disabled):not(.disabled):hover {
  background: #7a4ed6 !important;
  box-shadow: 0 4px 18px rgba(142,91,238,.35);
}
.checkout-btn:not(:disabled):not(.disabled):active { transform: translateY(1px); }
.checkout-btn:disabled,
.checkout-btn.disabled {
  background: #c4a8f5 !important;
  color: #fff !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: .9;
}

/* 9. Summary card */
.summary-card-header {
  background: #8E5BEE;
  padding: 15px 20px;
  text-align: center;
}
.summary-card-header h3 {
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.summary-body { padding: 0 20px; }
.summary-rows {
  padding: 16px 0 10px;
  border-bottom: 1px solid #f0f0f0;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  font-size: 14px;
}
.summary-label { color: #888; white-space: nowrap; }
.summary-value { font-weight: 700; color: #192d35; text-align: right; }
.summary-price { font-size: 20px !important; color: #8E5BEE !important; }
.summary-details {
  font-size: 13px;
  color: #777;
  line-height: 1.5;
  padding: 10px 0 14px;
  border-bottom: 1px solid #f0f0f0;
  margin: 0;
}

/* 10. Delivery */
.delivery-section {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.delivery-label {
  font-size: 11px;
  font-weight: 700;
  color: #bbb;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.delivery-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
.delivery-item img { width: 22px; height: 22px; flex-shrink: 0; filter: none !important; }
.delivery-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* 11. Trust section */
.trust-section {
  padding: 14px 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ra-seal-wrapper { display: flex; justify-content: center; }
.ra-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f4ff;
  border: 1px solid #e5d9ff;
  border-radius: 10px;
  padding: 10px 14px;
  width: 100%;
  box-sizing: border-box;
}
.ra-badge img { height: 30px; flex-shrink: 0; }
.ra-badge-title { font-size: 13px; font-weight: 700; color: #8E5BEE; }
.ra-badge-score { font-size: 12px; color: #777; margin-top: 2px; }
.ra-more-link { font-size: 12px; color: #8E5BEE; font-weight: 600; text-decoration: none; }
.ra-more-link:hover { text-decoration: underline; }

/* 12b. Footer full-bleed — movido para style.css 'footer { ... }' global.
   body.pay .container agora eh full-width (mesmo behavior de body.index),
   eliminando assimetria com scrollbar que causava gap a direita no .bg-dark. */

/* 12. Disclaimer */
.checkout-disclaimer {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: #aaa;
  line-height: 1.7;
}
.checkout-disclaimer strong {
  display: block;
  color: #777;
  font-weight: 700;
  margin-bottom: 6px;
}

/* 13. Responsive */
@media (max-width: 768px) {
  .checkout-page { padding: 40px 16px 40px !important; }
  body.pay .navbar.altnavbar { padding: 12px 16px !important; }
  body.pay header::after { display: none; }
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .checkout-form-col  { order: 1; }
  .checkout-summary-col { order: 2; }
  .checkout-form-body { padding: 20px 16px; }
  .summary-body { padding: 0 16px; }
  .checkout-form-header { padding: 16px; }
  .summary-card-header { padding: 13px 16px; }
}
@media (max-width: 480px) {
  .checkout-page { padding: 32px 12px 40px !important; }
  .form-group input { padding: 12px !important; font-size: 14px !important; }
  .checkout-btn { font-size: 15px !important; padding: 14px !important; }
}
