/* =========================================================
   GLOBAL RESET & BASE RULES
   ========================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: #313131;

  background-image: url('../img/bg-payment-page.png');
  background-repeat: no-repeat;
  background-position: top right;
  background-size: cover;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   HONEYPOT (ANTI-SPAM)
   ========================================================= */

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================================================
   PAGE LAYOUT WRAPPER
   ========================================================= */

.payment-wrap {
  max-width: 1040px;
  margin: 50px auto;
  display: flex;
  overflow: hidden;

  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 75px rgba(0,0,0,0.10);
}

/* =========================================================
   LEFT PANEL (INFO / FAQ / BRANDING)
   ========================================================= */

.p-txt {
  flex: 0 0 500px;
  padding: 50px;

  background: #193C57;
  color: #ffffff;
}

/* Badge */
.p-txt .badge {
  display: inline-block;
  background: #FD6736;
  color: #ffffff;
  font-size: 14px;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 14px;
}

/* Domain name — FORCE UPPERCASE */
.p-txt h1 {
  font-size: 28px;
  margin: 8px 0;
  text-transform: uppercase;
}

.p-txt h3 {
  font-size: 20px;
  margin: 12px 0;
}

.p-txt p {
  font-size: 14px;
  margin-top: 9px;
  line-height: 1.5;
}

/* Divider */
.separator-line {
  height: 1px;
  background-color: #FD6736;
  margin: 40px 0;
}

/* FAQ */
.faq-item {
  margin-top: 20px;
}

.faq-item strong {
  display: block;
  margin-bottom: 8px;
}

/* Email Address */
.sale-contact-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: #FD6736;
  font-weight: 600;
  cursor: pointer;
  font-size: inherit;
}

.sale-contact-btn:hover {
  text-decoration: underline;
}


/* =========================================================
   RIGHT PANEL (FORMS)
   ========================================================= */

.p-form {
  flex: 1 1 auto;
  padding: 50px;
}

.p-form h2 {
  font-size: 24px;
  margin-bottom: 15px;
}

.sm-txt {
  display: block;
  font-size: 12px;
  color: #888888;
  margin-bottom: 20px;
}

/* =========================================================
   FORM ELEMENTS
   ========================================================= */

.form-group {
  margin-bottom: 15px;
}

.form-control {
  width: 100%;
  padding: 20px 30px;
  font-size: 14px;

  border: 1px solid #ced4da;
  border-radius: 5px;
}

.form-control:focus {
  outline: none;
  border-color: #86b7fe;
}

textarea.form-control {
  height: 110px;
  resize: vertical;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn-primary {
  width: 100%;
  height: 60px;

  background-color: #FD6736;
  color: #ffffff;
  border: none;
  border-radius: 5px;

  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================================
   SYSTEM MESSAGES
   ========================================================= */

.message {
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 5px;
  font-size: 14px;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Validation error */
.error .form-control {
  border-color: #d9534f;
}

.error .form-control::placeholder {
  color: #d9534f;
}

/* =========================================================
   BUY NOW SUMMARY
   ========================================================= */

.purchase-summary {
  margin: 25px 0;
  padding: 20px;

  background: #f9f9f9;
  border: 1px solid #e4e4e4;
  border-radius: 6px;
}

.ps-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333333;
}

.ps-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-top: 1px solid #eeeeee;
}

.ps-row:first-of-type {
  border-top: none;
}

.buy-now-form {
  margin-top: 20px;
}

.buy-note {
  margin-top: 12px;
  font-size: 12px;
  color: #777777;
  text-align: center;
}

/* ----------------------------------------
   Lease-to-own information block
---------------------------------------- */

.lease-info {
  margin-top: 30px;
  padding: 20px 22px;
  border: 1px dashed #d6d6d6;
  border-radius: 6px;
  background: #fafafa;
}

.lease-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #313131;
}

.lease-info p {
  font-size: 13px;
  line-height: 1.6;
  color: #555555;
  margin-bottom: 8px;
}

.lease-info p:last-child {
  margin-bottom: 0;
}

.lease-contact {
  font-weight: 600;
}

.lease-contact a {
  color: #FD6736;
  text-decoration: none;
}

.lease-contact a:hover {
  text-decoration: underline;
}

/* =========================================================
   STRIPE MODAL
   ========================================================= */

.stripe-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.stripe-modal.is-open {
  display: block;
}

/* Backdrop */
.stripe-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

/* Modal panel (scrollable) */
.stripe-modal__panel {
  position: relative;
  width: min(520px, calc(100% - 40px));
  margin: 40px auto;
  padding: 16px 16px 14px;

  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 75px rgba(0,0,0,0.25);

  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

/* Header */
.stripe-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stripe-modal__title {
  font-size: 16px;
  font-weight: 600;
}

.stripe-modal__close {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  padding: 6px 8px;
}

/* Error */
.stripe-modal__error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 13px;
}

/* Stripe mount */
.stripe-modal__mount {
  margin: 10px 0 14px;
}

/* Actions */
.stripe-modal__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.stripe-modal__actions .btn-primary {
  flex: 1 1 auto;
}

.stripe-modal__cancel {
  height: 60px;
  padding: 0 16px;
  border-radius: 5px;
  border: 1px solid #ced4da;
  background: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

/* Loading state */
.stripe-modal__actions .btn-primary.is-loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

.stripe-modal__actions .btn-primary.is-loading::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.6);
  border-top-color: #ffffff;
  border-radius: 50%;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  animation: stripe-spin 0.8s linear infinite;
}

@keyframes stripe-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* =========================================================
   --- MOBILE OVERRIDES ---
   ========================================================= */

@media (max-width: 768px) {

  /* Stack layout: FORM FIRST, INFO SECOND */
  .payment-wrap {
    flex-direction: column-reverse;
    margin: 30px;
  }

  .p-form,
  .p-txt {
    padding: 30px;
    text-align: center;
  }

  .p-txt {
    border-radius: 0 0 10px 10px;
  }
}
