@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300..800&display=swap');

/* ==========================================================================
   Checkout VIP & Polar MoR Stylesheet
   Theme: Shopify Cinematic Night & Transactional Aloe Mint
   Palette: Night (#000000, #0A0A0D, #141418) + Aloe Mint (#C1FBD4) + Pistachio (#D4F9E0)
   ========================================================================== */

:root {
  /* Canvas — Shopify Dual Track */
  --canvas-night: #000000;
  --canvas-night-elevated: #0A0A0D;
  --surface-dark-teal: #1E2C31;
  --canvas-light: #FFFFFF;
  --canvas-cream: #FBFBF5;

  /* Accent Mint Aloe & Pistachio */
  --aloe: #C1FBD4;
  --pistachio: #D4F9E0;

  /* Text & Shades */
  --ink: #000000;
  --on-primary: #FFFFFF;
  --shade-30: #D4D4D8;
  --shade-40: #A1A1AA;
  --shade-50: #71717A;
  --shade-60: #52525B;
  --shade-70: #3F3F46;

  /* Mapped Compatibility Variables */
  --bg-main: #000000;
  --bg-card: #0A0A0D;
  --bg-card-inner: #141418;
  --bg-card-hover: #1A1A22;
  --border-card: rgba(255, 255, 255, 0.08);
  --border-focus: #C1FBD4;
  --text-main: #FFFFFF;
  --text-muted: #A1A1AA;
  --text-dim: #71717A;
  --accent-cyan: #C1FBD4;
  --accent-cyan-glow: rgba(193, 251, 212, 0.25);
  --accent-emerald: #10B981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-amber: #F59E0B;
  --accent-red: #EF4444;

  /* Shopify Radius & Elevation */
  --radius-pill: 9999px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  font-feature-settings: "ss03";
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Container */
.checkout-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* Header */
.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-card);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--aloe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 2px 10px rgba(193, 251, 212, 0.3);
}

.trust-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Two-Column SamCart Grid */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 2.5rem;
  align-items: start;
}

/* Left Column: Reassurance & Mini Sales Letter */
.reassurance-col {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.15), 0 4px 4px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--aloe);
  color: #000000;
  border: none;
}

.product-hero-box {
  text-align: center;
  margin-bottom: 1.25rem;
}

.product-mockup-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  margin-bottom: 1.25rem;
  background: #000;
}

.deliverables-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.deliverable-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.93rem;
  color: #CBD5E1;
}

.deliverable-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent-emerald);
  margin-top: 3px;
}

.deliverable-highlight {
  color: var(--text-main);
  font-weight: 700;
}

/* 30-Day Guarantee Box */
.guarantee-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.guarantee-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guarantee-content h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-emerald);
  margin-bottom: 4px;
}

.guarantee-content p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAQ Accordion */
.faq-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.faq-item {
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  background: var(--bg-card-inner);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 0.9rem 1.1rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-answer {
  padding: 0 1.1rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Right Column: Form, Bump & Payment Gateway */
/* CRITICAL: Must be position: static (never sticky) to avoid pushing "Pay now" offscreen */
.form-col {
  position: static !important;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Mobile Product Summary Card (<900px only) */
.mobile-product-summary-card {
  display: none;
  background: var(--bg-card);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  margin-bottom: 0.5rem;
}

.mobile-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mobile-card-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #000;
  border: 1px solid var(--border-card);
}

.mobile-card-info {
  flex: 1;
}

.mobile-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.mobile-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}

.mobile-card-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent-cyan);
}

.mobile-card-strike {
  text-decoration: line-through;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.mobile-deliverables-dropdown {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-card);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.mobile-deliverables-dropdown summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-cyan);
  outline: none;
}

/* Form Steps */
.step-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.9rem;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--aloe);
  color: #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}

/* Contact Inputs */
.input-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.input-field-wrap {
  position: relative;
}

.input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.input-field {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card-inner);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.input-field:focus {
  border-color: var(--aloe);
  box-shadow: 0 0 0 2px rgba(193, 251, 212, 0.25);
}

/* Maria Wendt Order Bump Card */
.bump-card {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%);
  border: 2px dashed rgba(245, 158, 11, 0.5);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
  position: relative;
}

.bump-card:hover {
  border-color: var(--accent-amber);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.bump-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.bump-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--accent-amber);
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

.bump-headline-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 10px;
}

.bump-headline {
  font-weight: 800;
  font-size: 0.96rem;
  color: #FEF3C7;
  line-height: 1.35;
}

.bump-price-badge {
  font-weight: 900;
  font-size: 0.96rem;
  color: var(--accent-amber);
  white-space: nowrap;
}

.bump-body-text {
  font-size: 0.85rem;
  color: #E2E8F0;
  line-height: 1.55;
  margin-top: 0.6rem;
  padding-left: 34px;
}

.bump-body-text b {
  color: var(--accent-amber);
}

.bump-cta-hook {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-top: 0.4rem;
  padding-left: 34px;
}

/* Order Breakdown Card */
.order-breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
}

.breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.65rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-card);
}

.breakdown-title {
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.package-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--aloe);
  color: #000000;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  color: #E2E8F0;
  margin-bottom: 0.45rem;
}

.bump-breakdown-row {
  display: none;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  color: var(--accent-amber);
  margin-bottom: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--border-card);
}

.btn-remove-bump {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #F87171;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  margin-top: 3px;
  transition: var(--transition);
}

.btn-remove-bump:hover {
  background: rgba(239, 68, 68, 0.3);
}

.breakdown-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1.5px solid var(--border-card);
}

.total-label {
  font-size: 0.95rem;
  font-weight: 800;
}

.total-amount {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--aloe);
}

.total-combo-note {
  display: none;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
  margin-top: 2px;
}

/* Payment Method Tabs (Polar vs VietQR) */
.payment-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--aloe);
  color: #000000;
  border-color: var(--aloe);
  box-shadow: 0 2px 10px rgba(193, 251, 212, 0.25);
}

/* Polar Container (Zero Scrollbars Contract: min-height 1320px Desktop / 1400px Mobile) */
.polar-container {
  min-height: 1320px;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff; /* Polar uses light or dark, light ensures crisp card logos */
  border: 1.5px solid var(--border-card);
}

.polar-container iframe {
  width: 100%;
  height: 1320px;
  border: none;
  overflow: hidden;
}

/* Frosted Loading Shimmer Overlay */
.polar-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(6px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: opacity 0.25s ease;
  color: #fff;
  text-align: center;
  padding: 1.5rem;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* VietQR Container */
.vietqr-container {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
}

.vietqr-qr-img {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
  margin: 1.25rem auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.vietqr-details-table {
  width: 100%;
  text-align: left;
  font-size: 0.88rem;
  border-collapse: collapse;
  margin-top: 1rem;
}

.vietqr-details-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-card);
}

.vietqr-details-table td:first-child {
  color: var(--text-dim);
  width: 38%;
}

.vietqr-details-table td:last-child {
  color: var(--text-main);
  font-weight: 700;
}

/* Footer & Policies */
.checkout-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-card);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0A0A0D;
  color: #fff;
  border: 1px solid var(--border-card);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive CRO Queries (Mobile Breakpoints)
   ========================================================================== */
@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .mobile-product-summary-card {
    display: block;
  }

  .reassurance-col {
    order: 2; /* Reassurance moves below form so buyer sees checkout first on mobile */
  }

  .form-col {
    order: 1;
  }

  .polar-container {
    min-height: 1400px !important;
  }

  .polar-container iframe {
    height: 1400px !important;
  }

  .checkout-wrapper {
    padding: 1.25rem 1rem 3rem;
  }
}

@media (max-width: 540px) {
  /* Prevent iOS Safari input auto-zoom: 16px font-size minimum */
  input[type="text"], input[type="email"] {
    font-size: 16px !important;
    min-height: 48px;
  }

  .trust-strip {
    display: none; /* Hide trust icons on narrow mobile to keep header clean */
  }

  .bump-headline-row {
    flex-direction: column;
    gap: 4px;
  }
}
