/* ============================================
   VIVIA CUSTOM CHECKOUT v4
   Branded banner + benefit copy + testimonial photo
   Font sizes matched to landing page (17-18px body, 36px+ headlines)
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  color: #2A1F30;
  background: #F5F1ED;
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ========== BRANDED BANNER ========== */
.branded-banner {
  background: #6A3D5E;
  padding: 14px 20px;
}

.banner-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.banner-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
}

.banner-trust-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}

.banner-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.banner-contact {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.banner-contact a {
  color: #fff;
  text-decoration: underline;
  font-weight: 500;
}

@media (max-width: 600px) {
  .banner-trust-items { gap: 6px 14px; }
  .banner-item { font-size: 15px; }
  .banner-logo { font-size: 26px; }
  .banner-contact { font-size: 14px; }
}


/* ========== FORM HEADING ========== */
.form-main-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  color: #2A1F30;
  text-align: center;
  margin-bottom: 6px;
  padding-top: 4px;
}

.form-main-sub {
  font-size: 17px;
  color: #7A6D7E;
  text-align: center;
  margin-bottom: 32px;
}

/* ========== MAIN LAYOUT ========== */
.checkout-main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 32px 16px 60px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 820px) {
  .checkout-grid {
    grid-template-columns: 1fr 380px;
    gap: 36px;
  }
  .checkout-main { padding: 36px 24px 80px; }
  .checkout-summary-col { order: 2; }
  .checkout-form-col { order: 1; }
}

/* ========== STEP SECTIONS ========== */
.step-section {
  background: #fff;
  border: 1px solid #E8E2DD;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #FDFBF9;
  border-bottom: 1px solid #F0EBE7;
  flex-wrap: wrap;
}

.step-number {
  width: 30px;
  height: 30px;
  background: #6A3D5E;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: #2A1F30;
}

.step-subtitle {
  font-size: 13px;
  color: #9B8E9E;
  margin-left: auto;
}

.step-body { padding: 20px; }

/* ========== FORM FIELDS ========== */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #5A4D5E;
  margin-bottom: 6px;
}

.optional { font-weight: 400; color: #A89BA3; }
.required { color: #C8956C; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row .field { margin-bottom: 0; }

.field-row--3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 480px) {
  .field-row--3 { grid-template-columns: 1fr 1fr; }
  .field-row--3 .field:first-child { grid-column: 1 / -1; }
}

input, select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #D5CED0;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: #2A1F30;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

input::placeholder { color: #B8ADBA; }

input:focus, select:focus {
  border-color: #6A3D5E;
  box-shadow: 0 0 0 3px rgba(106, 61, 94, 0.1);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236A3D5E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Shipping note */
.shipping-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  font-size: 14px;
  color: #166534;
  font-weight: 500;
}

.shipping-note svg { flex-shrink: 0; }

/* ========== DIVIDER ========== */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 16px;
  color: #9B8E9E;
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E0DAD5;
}

/* ========== STRIPE ELEMENTS ========== */
#payment-element { min-height: 100px; }
#express-checkout-element { min-height: 48px; }

/* ========== MOBILE ORDER TOTAL ========== */
.mobile-total {
  background: #fff;
  border: 1px solid #E8E2DD;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 4px;
}

.mobile-total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 16px;
  color: #5A4D5E;
}

.mobile-total-row.total {
  padding-top: 14px;
  margin-top: 10px;
  border-top: 2px solid #2A1F30;
  font-size: 22px;
  font-weight: 700;
  color: #2A1F30;
}

@media (min-width: 820px) {
  .mobile-total { display: none; }
}

/* ========== SUBMIT BUTTON ========== */
.submit-btn {
  width: 100%;
  padding: 20px 24px;
  background: #C8956C;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  margin-top: 8px;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(200, 149, 108, 0.4);
}

.submit-btn:hover {
  background: #B8855C;
  box-shadow: 0 6px 24px rgba(200, 149, 108, 0.5);
}

.submit-btn:active { transform: scale(0.995); }

.submit-btn:disabled {
  background: #D4B8A0;
  cursor: not-allowed;
  box-shadow: none;
}

.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ========== BELOW BUTTON ========== */
.below-btn-reassurance {
  text-align: center;
  padding: 16px 0 0;
}

.below-btn-reassurance p {
  font-size: 14px;
  color: #7A6D7E;
  margin-bottom: 0;
  line-height: 1.4;
}

/* ========== ERROR ========== */
.error-message {
  margin-top: 16px;
  padding: 14px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  color: #991B1B;
  font-size: 15px;
  text-align: center;
}

/* (guarantee styles moved to section below payment logos) */

/* ========== SIDEBAR: SUMMARY ========== */
.summary-card {
  background: #fff;
  border: 1px solid #E8E2DD;
  border-radius: 12px;
  padding: 24px;
}

@media (min-width: 820px) {
  .summary-card.sticky { position: sticky; top: 20px; }
}

.summary-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #6A3D5E;
  margin-bottom: 18px;
}

.summary-product {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid #F0EBE7;
}

.product-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: #F2ECF0;
  flex-shrink: 0;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info { flex: 1; }

.product-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: #2A1F30;
  margin-bottom: 2px;
}

.product-variant {
  font-size: 13px;
  color: #9B8E9E;
  margin: 0;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
  color: #5A4D5E;
}

.summary-tag {
  background: #F2ECF0;
  color: #6A3D5E;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.value-original {
  color: #9B8E9E;
  font-size: 15px;
}

.value-original s { text-decoration: line-through; }

.summary-line--savings {
  background: #F0FDF4;
  margin: 2px -24px;
  padding: 8px 24px;
}

.savings-amount {
  color: #16A34A;
  font-weight: 700;
}

.free-shipping {
  color: #16A34A;
  font-weight: 600;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 14px 0 0;
  margin-top: 8px;
  border-top: 2px solid #2A1F30;
  font-size: 20px;
  font-weight: 700;
  color: #2A1F30;
}

/* ========== SIDEBAR: TRUST BADGES ========== */
.trust-badges-bottom { margin-top: 16px; }

.badge-row {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #6A3D5E;
  text-align: center;
}

/* ========== PAYMENT LOGOS (below CTA) ========== */
.payment-logos {
  margin-top: 20px;
  text-align: center;
}

.cards-img {
  height: 32px;
  width: auto;
  opacity: 0.85;
}

.payment-secure-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: #16A34A;
  font-weight: 500;
  margin-top: 10px;
}

/* ========== CHECKOUT TRUST STRIP ========== */
.checkout-trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-top: 20px;
  padding: 14px 16px;
  background: #F7F4F0;
  border: 1px solid #E8E2DD;
  border-radius: 8px;
}

.cts-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: #5A4D5E;
}

/* ========== TESTIMONIAL + GUARANTEE (bottom of page) ========== */
.bottom-trust {
  max-width: 680px;
  margin: 40px auto 0;
}

.checkout-testimonial {
  background: #fff;
  border: 1px solid #E8E2DD;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.testimonial-photo {
  width: 100%;
  height: auto;
  display: block;
}

.checkout-guarantee {
  background: #F9F6F4;
  border: 1px solid #E0D6CF;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

.guarantee-seal { margin-bottom: 14px; }

.guarantee-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: #6A3D5E;
  margin-bottom: 12px;
}

.guarantee-text {
  font-size: 15px;
  color: #5A4D5E;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .checkout-guarantee { padding: 24px 20px; }
  .guarantee-title { font-size: 20px; }
}

/* ========== MOBILE ========== */
@media (max-width: 819px) {
  .checkout-summary-col { order: -1; }

  .submit-btn {
    position: sticky;
    bottom: 12px;
    z-index: 50;
    box-shadow: 0 -2px 16px rgba(42, 31, 48, 0.15), 0 4px 14px rgba(200, 149, 108, 0.35);
  }

  /* Mobile text sizing — bumped for older users (match sales page readability) */
  .form-main-heading { font-size: 32px; }
  .form-main-sub { font-size: 18px; margin-bottom: 24px; }

  .product-name { font-size: 24px; }
  .product-variant { font-size: 18px; color: #5A4D5E; }
  .product-thumb { width: 70px; height: 70px; }

  .summary-title { font-size: 17px; }
  .summary-line { font-size: 18px; }
  .summary-total { font-size: 22px; }
  .summary-tag { font-size: 13px; }

  .step-title { font-size: 20px; }
  .step-subtitle { font-size: 15px; }

  label { font-size: 16px; }
  input, select { font-size: 17px; padding: 15px 16px; }

  .submit-btn { font-size: 20px; padding: 22px 24px; }

  .cts-item { font-size: 15px; }
  .badge-item { font-size: 14px; }

  .below-btn-reassurance p { font-size: 16px; }
  .shipping-note { font-size: 16px; }
  .guarantee-text { font-size: 17px; }
  .payment-secure-text { font-size: 14px; }
  .error-message { font-size: 16px; }
}
