:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #ccfbf1;
  --ink: #1f2937;
  --ink-soft: #6b7280;
  --bg: #f7f9f9;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --whatsapp: #25d366;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.topbar {
  background: var(--teal);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo { font-size: 1.15rem; font-weight: 700; }

.zone-badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.screen { display: none; }
.screen.active { display: block; animation: fadeIn .2s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 { font-size: 1.5rem; margin: 8px 0 2px; }
h2 { font-size: 1.3rem; margin: 4px 0 2px; }
h3 { font-size: 1rem; margin: 0 0 10px; color: var(--ink); }
.subtitle { color: var(--ink-soft); margin: 0 0 20px; font-size: 0.95rem; }
.section-label { margin-top: 24px; }

.back-btn {
  background: none;
  border: none;
  color: var(--teal-dark);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 0 16px;
  cursor: pointer;
}

.service-grid { display: flex; flex-direction: column; gap: 14px; }

.service-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .15s, transform .1s;
}
.service-card:active { transform: scale(0.98); }
.service-card:hover { border-color: var(--teal); }

.service-icon { font-size: 2rem; }
.service-title { font-size: 1.1rem; font-weight: 700; }
.service-desc { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.4; }

.product-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }

.product-item {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.product-name { font-weight: 700; margin-bottom: 8px; font-size: 1rem; }

.qty-options { display: flex; flex-wrap: wrap; gap: 8px; }

.qty-btn {
  border: 2px solid var(--border);
  background: white;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
  cursor: pointer;
  min-width: 78px;
  text-align: center;
  line-height: 1.3;
}
.qty-btn strong { display: block; font-size: 0.95rem; }
.qty-btn.selected {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal-dark);
}

.choice-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }

.choice-option {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.choice-option.selected { border-color: var(--teal); background: var(--teal-light); }
.choice-option .co-name { font-weight: 600; }
.choice-option .co-price { color: var(--ink-soft); font-size: 0.9rem; }

.order-box {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 24px;
}

.summary-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; font-size: 0.92rem; }
.summary-row { display: flex; justify-content: space-between; }
.empty-msg { color: var(--ink-soft); font-size: 0.9rem; }

.total-line {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-bottom: 14px;
}

.primary-btn {
  width: 100%;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
}
.primary-btn:disabled { background: #cbd5e1; cursor: not-allowed; }

.field-label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: 0.92rem; }

.text-input {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  resize: none;
}
.text-input:focus { outline: none; border-color: var(--teal); }

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.checkbox-row input { margin-top: 3px; width: 18px; height: 18px; }

.whatsapp-btn {
  width: 100%;
  background: var(--whatsapp);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wa-icon { font-size: 1.2rem; }

.hint-text { text-align: center; color: var(--ink-soft); font-size: 0.82rem; margin: 10px 0 0; }

.foot-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  padding: 20px;
}

/* ---------- Programa de fidelización ---------- */

.progreso-link {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 18px 0 6px;
  cursor: pointer;
}

.field-note {
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin: -10px 0 4px;
}

.hidden-block { display: none; }
.hidden-block.active { display: block; }

#progreso-buscar .primary-btn { margin-top: 12px; }

.premio-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.premio-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.premio-icono { font-size: 1.6rem; }
.premio-nombre { font-weight: 700; font-size: 1.05rem; }

.premio-desc {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.4;
  margin: 0 0 12px;
}

.progress-bar {
  background: var(--border);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  background: var(--teal);
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width .3s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0;
}

.referido-code-box {
  margin-top: 12px;
  background: var(--teal-light);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}

.referido-code-box strong {
  color: var(--teal-dark);
  font-size: 1rem;
  letter-spacing: 0.04em;
}
