:root {
  --af-navy: #004080;
  --af-blue: #007bff;
  --af-blue-dark: #0056b3;
  --af-pink: #e35d71;
  --af-light: #eaf2ff;
  --af-border: #dae1e5;
  --af-text: #1a1a1a;
  --af-muted: #4d5a68;
  --af-success: #1a9e47;
  --af-bg: #f4f7fb;
  --af-btn-gap: 16px;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(0, 64, 128, 0.08);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.45;
  color: var(--af-text);
  background: var(--af-bg);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
}

.app {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.app-header {
  text-align: center;
  margin-bottom: 18px;
}

.app-logo {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--af-navy);
  letter-spacing: 0.02em;
}

.app-tagline {
  margin: 6px 0 0;
  color: var(--af-muted);
  font-size: 1rem;
}

.progress-wrap {
  margin: 18px 0 22px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--af-muted);
  margin-bottom: 8px;
}

.progress-bar {
  height: 10px;
  background: #dde5ee;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--af-blue), var(--af-navy));
  transition: width 0.25s ease;
}

.card {
  background: #fff;
  border: 2px solid var(--af-navy);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
}

.step {
  display: none;
}

.step.is-active {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.step-content {
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: 12px;
}

.step-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 5vw, 1.75rem);
  line-height: 1.15;
  color: var(--af-navy);
  font-weight: 900;
}

.step-hint {
  margin: 0 0 20px;
  color: var(--af-muted);
  font-size: 1.1rem;
  line-height: 1.5;
}

.step-body {
  font-size: 1.1rem;
  margin: 0 0 8px;
  line-height: 1.5;
  color: var(--af-text);
}

.step-body strong {
  color: var(--af-navy);
}

.option-grid {
  display: grid;
  gap: var(--af-btn-gap);
}

.option-grid--2 {
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .option-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.option-btn {
  width: 100%;
  min-height: 76px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 2px solid var(--af-blue);
  background: #fff;
  color: var(--af-text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  touch-action: manipulation;
}

.option-btn:hover {
  background: var(--af-light);
}

.option-btn:active {
  transform: scale(0.99);
}

.option-btn.is-selected {
  background: var(--af-blue-dark);
  border-color: var(--af-navy);
  color: #fff;
  font-weight: 800;
}

.option-btn__title {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}

.option-btn__desc {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--af-muted);
}

.option-btn.is-selected .option-btn__desc {
  color: #fff;
  opacity: 1;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--af-btn-gap);
}

.chip {
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 2px solid var(--af-blue);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  touch-action: manipulation;
  text-align: left;
}

.chip--with-desc {
  border-radius: 16px;
  min-height: 64px;
  flex: 1 1 100%;
  max-width: 100%;
}

.chip__title {
  display: block;
}

.chip__desc {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--af-muted);
}

.chip.is-selected {
  background: var(--af-navy);
  border-color: var(--af-navy);
  color: #fff;
}

.chip.is-selected .chip__desc {
  color: #fff;
  opacity: 1;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-weight: 800;
  color: var(--af-navy);
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.field input,
.field select {
  min-height: 58px;
  padding: 14px 16px;
  border: 2px solid var(--af-blue);
  border-radius: 12px;
  background: #fff;
}

.field > input,
.field > select {
  display: block;
  width: 100%;
  max-width: 100%;
}

.field-hint {
  margin: 8px 0 0;
  font-size: 1rem;
  color: #5a6b7d;
  line-height: 1.45;
}

.field-error {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: #b42318;
  line-height: 1.45;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: #b42318;
}

.phone-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}

.phone-row__country {
  flex: 0 1 8.25rem;
  width: auto;
  max-width: 40%;
  min-width: 6.75rem;
  min-height: 58px;
  padding: 14px 2.25rem 14px 12px;
  border: 2px solid var(--af-blue);
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23004080' d='M1.4.6 6 5.2 10.6.6 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  font-weight: 700;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
}

.phone-row__number {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 58px;
  padding: 14px 16px;
  border: 2px solid var(--af-blue);
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 480px) {
  .phone-row {
    flex-wrap: wrap;
  }

  .phone-row__country {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
  }

  .phone-row__number {
    flex: 1 1 100%;
    width: 100%;
  }
}

.field > select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23004080' d='M1.4.6 6 5.2 10.6.6 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}

.nav-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--af-btn-gap);
  flex: 0 0 auto;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid var(--af-light);
  position: static;
  z-index: auto;
  background: #fff;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.nav-row .btn-secondary,
.nav-row .btn-primary {
  width: 100%;
  min-width: 0;
  flex: none;
}

.btn {
  min-height: 60px;
  padding: 16px 22px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.25;
  touch-action: manipulation;
}

.btn:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--af-blue-dark);
  color: #fff;
}

.btn-primary:disabled {
  background: #b8c9de;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--af-navy);
  border: 2px solid var(--af-border);
}

.btn-whatsapp {
  width: 100%;
  min-height: 64px;
  background: var(--af-success);
  color: #fff;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.product-grid {
  display: grid;
  gap: var(--af-btn-gap);
}

.product-card {
  border: 2px solid var(--af-border);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  display: grid;
  gap: 14px;
  align-items: start;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-card__summary {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  align-items: start;
}

.product-card.is-expanded {
  border-color: var(--af-blue);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
  cursor: default;
}

.product-card.is-expanded .product-card__summary {
  cursor: pointer;
}

.product-card.is-selected,
.product-card.is-shortlisted {
  border-color: var(--af-blue);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.product-card.is-primary {
  border-color: var(--af-navy);
  box-shadow: 0 0 0 3px rgba(0, 64, 128, 0.28);
}

.product-card__kind {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--af-navy);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.product-card__picked {
  display: inline-block;
  margin-top: 8px;
  margin-right: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f7ed;
  color: #1e7e34;
  font-size: 0.85rem;
  font-weight: 800;
}

.product-card__img {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
  background: #f6f7f9;
}

.product-card__name {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--af-navy);
  line-height: 1.2;
}

.product-card__price {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--af-blue);
  margin: 0 0 6px;
}

.product-card__reason {
  margin: 0;
  font-size: 0.95rem;
  color: var(--af-muted);
}

.product-card__badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--af-light);
  color: var(--af-navy);
  font-size: 0.85rem;
  font-weight: 800;
}

.summary-box {
  background: var(--af-light);
  border: 2px solid var(--af-blue);
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
  font-size: 0.98rem;
}

.summary-box h3 {
  margin: 0 0 10px;
  color: var(--af-navy);
  font-size: 1.1rem;
}

.summary-box ul {
  margin: 0;
  padding-left: 1.2rem;
}

.summary-box li {
  margin-bottom: 6px;
}

.loading {
  text-align: center;
  padding: 24px;
  color: var(--af-muted);
}

.hidden {
  display: none !important;
}

.notice {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff8e6;
  border: 1px solid #f0e0a0;
  font-size: 0.95rem;
}

.financing-panel {
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 14px;
  border: 2px solid var(--af-blue);
  background: var(--af-light);
  font-size: 0.95rem;
  line-height: 1.45;
}

.financing-panel--overview {
  margin-top: 0;
  margin-bottom: 16px;
  background: #fff;
}

.financing-panel--muted {
  border-color: var(--af-border);
  background: #f6f7f9;
}

.financing-panel h3 {
  margin: 0 0 10px;
  color: var(--af-navy);
  font-size: 1.05rem;
}

.financing-panel ul {
  margin: 0 0 10px;
  padding-left: 1.2rem;
}

.financing-panel li {
  margin-bottom: 6px;
}

.financing-panel li.is-eligible {
  color: #1e7e34;
  font-weight: 700;
}

.financing-panel li.is-muted {
  color: var(--af-muted);
}

.financing-panel__intro {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--af-navy);
}

.financing-panel__lead {
  margin: 0 0 10px;
}

.financing-panel__note {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--af-muted);
}

.financing-panel__warn {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff3cd;
  border: 1px solid #ffecb5;
  color: #664d03;
  font-size: 0.9rem;
}

.financing-panel a {
  color: var(--af-blue);
  font-weight: 800;
}

.pay-plan-grid {
  margin: 14px 0 6px;
}

.financing-pay-grid {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.financing-pay-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--af-border);
  font-size: 0.9rem;
}

.financing-pay-card strong {
  color: var(--af-navy);
  font-size: 1rem;
}

.financing-pay-card span {
  color: var(--af-text);
}

.checkout-step {
  margin-top: 18px;
}

.checkout-step__hint {
  color: var(--af-muted);
  font-size: 0.95rem;
  margin: 12px 0 0;
}

.checkout-detail {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 2px solid var(--af-blue);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: var(--af-btn-gap);
}

.checkout-detail h4 {
  margin: 0;
  color: var(--af-navy);
  font-size: 1.15rem;
}

.checkout-detail p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.checkout-order {
  margin: 0;
  font-size: 1.1rem;
}

.checkout-order__num {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--af-light);
  color: var(--af-navy);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.checkout-action {
  display: block;
  width: 100%;
  margin: 0;
  text-align: center;
  text-decoration: none;
}

.bank-panel {
  margin: 14px 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--af-light);
  border: 1px solid var(--af-border);
  font-size: 0.92rem;
}

.bank-panel h4 {
  margin: 0 0 8px;
  color: var(--af-navy);
}

.bank-panel ul {
  margin: 0;
  padding-left: 1.2rem;
}

.bank-panel li {
  margin-bottom: 10px;
}

.product-card__price-sub {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--af-muted);
  margin: 0 0 4px;
  line-height: 1.25;
}

.product-card__tap {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--af-blue);
}

.product-card.is-liked {
  border-color: var(--af-success);
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.35);
}

.shortlist-panel {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 2px solid var(--af-blue);
  background: var(--af-light);
}

.shortlist-panel__title {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--af-navy);
}

.shortlist-panel__items {
  display: grid;
  gap: var(--af-btn-gap);
}

.shortlist-panel__hint {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--af-muted);
}

.shortlist-chip {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--af-border);
}

.shortlist-chip.is-primary {
  border-color: var(--af-navy);
  background: #fff;
}

.shortlist-chip__name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.shortlist-chip__tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--af-navy);
  white-space: nowrap;
}

.shortlist-chip__primary,
.shortlist-chip__remove {
  border: 1px solid var(--af-blue);
  background: #fff;
  color: var(--af-blue);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  min-height: 44px;
}

.shortlist-chip__remove {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.af-toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10000;
  max-width: min(92vw, 420px);
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--af-navy);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: af-toast-in 0.2s ease;
}

@keyframes af-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.promo-banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef6ff;
  border: 2px solid var(--af-blue);
  color: var(--af-navy);
  font-weight: 700;
  font-size: 0.95rem;
}

.promo-banner--lg {
  text-align: center;
  padding: 18px 16px;
}

.promo-banner__code {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--af-blue);
  margin-bottom: 6px;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0 4px;
  font-size: 0.95rem;
  color: var(--af-muted);
  font-weight: 600;
  cursor: pointer;
}

.check-row input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.soft-finish {
  display: grid;
  gap: 14px;
}

.soft-finish__note {
  margin: 0;
  color: var(--af-muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.soft-finish .btn,
.soft-finish__btn {
  width: 100%;
  text-decoration: none !important;
  text-align: center;
  box-sizing: border-box;
}

.btn-wa {
  background: #25d366 !important;
  border-color: #25d366 !important;
  color: #fff !important;
  text-decoration: none !important;
}

.btn-wa:hover,
.btn-wa:focus {
  background: #1fb855 !important;
  border-color: #1fb855 !important;
  color: #fff !important;
}

.save-options-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f5f8fc;
  border: 1px solid var(--af-border);
  color: var(--af-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.save-options-note p {
  margin: 0;
}

.field .opt {
  font-weight: 600;
  color: var(--af-muted);
  font-size: 0.88em;
}

/* —— Product detail (inline expand-in-place) —— */
.pd-inline {
  display: grid;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--af-border);
  animation: pd-expand-in 0.22s ease;
}

@keyframes pd-expand-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pd-status {
  margin: 0;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e7e34;
}

.pd-hero {
  border-radius: 16px;
  background: #f6f7f9;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-hero__img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.pd-pricing {
  background: var(--af-light);
  border: 2px solid var(--af-blue);
  border-radius: 14px;
  padding: 14px;
}

.pd-price-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.pd-price-tab {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  border: 2px solid var(--af-blue);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.pd-price-tab.is-active {
  background: var(--af-blue);
  color: #fff;
}

.pd-price-main {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--af-navy);
}

.pd-price-sub,
.pd-price-line {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--af-muted);
  font-weight: 700;
}

.pd-personal h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--af-navy);
}

.pd-personal ul {
  margin: 0;
  padding-left: 1.2rem;
}

.pd-personal li {
  margin-bottom: 6px;
}

.pd-feedback {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--af-btn-gap);
}

.pd-fb {
  min-height: 56px;
  border-radius: 14px;
  border: 2px solid var(--af-border);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pd-fb--like.is-active {
  border-color: var(--af-success);
  background: #eafff0;
}

.pd-fb--dislike.is-active {
  border-color: var(--af-pink);
  background: #fff0f2;
}

.pd-choose {
  width: 100%;
}

.pd-choose--picked {
  background: #1e7e34;
}

.pd-primary,
.pd-collapse {
  width: 100%;
}

.pd-store {
  display: block;
  text-align: center;
  color: var(--af-blue);
  font-weight: 800;
  font-size: 0.95rem;
}

.pd-primary,
.pd-collapse {
  width: 100%;
  margin-top: 0;
}

@media (min-width: 640px) {
  .nav-row {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #fff 32%);
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }
}

@media (min-width: 520px) {
  .nav-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .nav-row .btn-secondary {
    flex: 0 0 auto;
    width: auto;
    min-width: 9rem;
  }

  .nav-row .btn-primary {
    flex: 1 1 12rem;
    width: auto;
  }
}

/* Recomendador has in-flow WhatsApp actions — never show a global floating FAB. */
.wa-fab,
.guia-wa-fab,
a[aria-label="WhatsApp Andafacil"],
a[aria-label="WhatsApp"] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .option-btn,
  .product-card,
  .pd-inline {
    transition: none;
    animation: none;
  }
}
