/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --text: #1a1a2e;
  --text-light: #555;
  --border: #dce1e8;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* ===== HEADER ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { font-weight: 700; font-size: 1.15rem; color: var(--primary); }
.logo-icon { margin-right: 0.35rem; }
.header nav { display: flex; gap: 1.5rem; align-items: center; }
.header nav a {
  text-decoration: none; color: var(--text); font-size: 0.95rem; font-weight: 500;
  transition: color 0.2s;
}
.header nav a:hover { color: var(--primary); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block; padding: 0.65rem 1.6rem;
  background: var(--primary); color: #fff; border: none; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.9rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; text-align: center; }
.btn-outline {
  background: transparent; color: var(--primary); border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: #fff; padding: 5rem 0 4.5rem; text-align: center;
}
.hero h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.hero-sub { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero .btn { background: #fff; color: var(--primary); }
.hero .btn:hover { background: #e8eef7; }

/* ===== SECTIONS ===== */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 2.5rem;
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.product-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; text-align: center; box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.product-card:hover { transform: translateY(-4px); }
.product-card .product-icon {
  font-size: 4rem; margin-bottom: 1rem; display: block;
}
.product-card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.product-card .price { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin: 0.75rem 0; }
.product-card .price span { font-size: 0.95rem; font-weight: 400; color: var(--text-light); }
.product-card p.desc { color: var(--text-light); font-size: 0.95rem; }

/* ===== STEPS ===== */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem; text-align: center;
}
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 1.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.step h3 { margin-bottom: 0.4rem; }
.step p { color: var(--text-light); font-size: 0.95rem; }

/* ===== FORM ===== */
.form-wrapper {
  max-width: 520px; margin: 0 auto;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow);
}
.form-step { display: none; }
.form-step.active { display: block; }
.form-step h3 { font-size: 1.3rem; margin-bottom: 1.25rem; }

.form-label {
  display: block; font-weight: 600; font-size: 0.9rem;
  margin-bottom: 0.4rem; margin-top: 1rem;
}
.form-input {
  width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: 1rem; outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--primary); }

.form-row {
  display: flex; gap: 0.75rem; margin-top: 1.5rem;
}
.form-row .btn { flex: 1; text-align: center; }

/* Product select */
.product-select {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
}
.product-option {
  flex: 1; min-width: 140px; padding: 1rem;
  border: 2px solid var(--border); border-radius: var(--radius);
  cursor: pointer; text-align: center; transition: border-color 0.2s, background 0.2s;
}
.product-option:hover { border-color: var(--primary); }
.product-option.selected { border-color: var(--primary); background: #e8f0fe; }
.product-option .po-icon { font-size: 2rem; display: block; margin-bottom: 0.3rem; }
.product-option .po-name { font-weight: 600; font-size: 0.95rem; }
.product-option .po-price { font-size: 0.85rem; color: var(--text-light); }

/* Product options (size, condition, door type, etc.) */
.product-options { margin-top: 0.5rem; }
.option-group { margin-top: 0.75rem; }
.option-group .form-label { margin-top: 0.5rem; margin-bottom: 0.4rem; }
.option-note { font-weight: 400; font-size: 0.8rem; color: #b45309; font-style: italic; }
.option-choices { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.option-choice {
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--border); border-radius: var(--radius);
  cursor: pointer; text-align: center; font-size: 0.9rem; font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.option-choice:hover { border-color: var(--primary); }
.option-choice.selected { border-color: var(--primary); background: #e8f0fe; font-weight: 600; }
.dl-options-group { margin-bottom: 1rem; }
.dl-options-group strong { font-size: 0.95rem; display: block; margin-bottom: 0.25rem; }

/* Frequency select */
.freq-select { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.freq-option {
  flex: 1; min-width: 100px; padding: 0.7rem;
  border: 2px solid var(--border); border-radius: var(--radius);
  cursor: pointer; text-align: center; font-weight: 600; font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}
.freq-option:hover { border-color: var(--primary); }
.freq-option.selected { border-color: var(--primary); background: #e8f0fe; }
.freq-option small { display: block; font-weight: 400; font-size: 0.8rem; color: var(--text-light); }

/* Price summary */
.price-summary {
  margin-top: 1.25rem; padding: 1rem; background: var(--bg-alt);
  border-radius: var(--radius); font-size: 0.95rem;
}
.price-summary .line {
  display: flex; justify-content: space-between; padding: 0.3rem 0;
}
.price-summary .line.total {
  border-top: 1px solid var(--border); margin-top: 0.4rem; padding-top: 0.6rem;
  font-weight: 700; font-size: 1.05rem;
}
.fee-line, .ps-line.fee-line {
  color: #b45309; font-size: 0.85rem; font-style: italic;
}

/* Payment summary */
.payment-summary {
  margin-bottom: 1.25rem; padding: 1rem; background: var(--bg-alt);
  border-radius: var(--radius);
}
.payment-summary .ps-line {
  display: flex; justify-content: space-between; font-size: 0.95rem; padding: 0.2rem 0;
}
.payment-summary .ps-line.highlight {
  font-weight: 700; font-size: 1.05rem; border-top: 1px solid var(--border);
  margin-top: 0.4rem; padding-top: 0.5rem;
}

/* Stripe card element */
.card-element {
  padding: 0.8rem; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; margin-bottom: 0.5rem;
}
.card-errors { color: #e53935; font-size: 0.85rem; min-height: 1.2rem; margin-bottom: 0.75rem; }

.btn-pay {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}

/* Terms checkbox */
.terms-agree {
  margin-bottom: 1rem; padding: 0.85rem; background: #fff8e1;
  border: 1px solid #ffe082; border-radius: var(--radius);
}
.terms-checkbox-label {
  display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer;
  font-size: 0.9rem; line-height: 1.5; color: var(--text);
}
.terms-checkbox-label input[type="checkbox"] {
  margin-top: 0.25rem; width: 18px; height: 18px; flex-shrink: 0;
  accent-color: var(--primary); cursor: pointer;
}
.terms-checkbox-label a {
  color: var(--primary); font-weight: 600; text-decoration: underline;
}

/* Success */
.success-box { text-align: center; padding: 2rem 0; }
.success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: #43a047; color: #fff; font-size: 2rem;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.success-sub { color: var(--text-light); margin-top: 0.75rem; font-size: 0.95rem; }

/* Spinner */
.spinner {
  width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite;
}
.hidden { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== DIRECT LINK BANNER ===== */
.direct-link-banner {
  margin-bottom: 1.5rem; padding: 1rem;
  background: linear-gradient(135deg, #e8f0fe 0%, #f0f4ff 100%);
  border: 1px solid #c5d8f8; border-radius: var(--radius);
}
.dlb-item {
  display: flex; align-items: center; gap: 1rem; padding: 0.4rem 0;
}
.dlb-item + .dlb-item { border-top: 1px solid #d4e2f7; margin-top: 0.4rem; padding-top: 0.8rem; }
.dlb-item .dlb-icon { font-size: 2.2rem; }
.dlb-item .dlb-name { font-weight: 700; font-size: 1.1rem; }
.dlb-item .dlb-price { color: var(--primary); font-weight: 600; font-size: 1rem; }

/* ===== FOOTER ===== */
.footer {
  text-align: center; padding: 2rem 0; font-size: 0.9rem; color: var(--text-light);
  border-top: 1px solid var(--border);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }
  .header nav a:not(.btn) { display: none; }
  .form-wrapper { padding: 1.25rem; }
  .product-select { flex-direction: column; }
}
