.book-body { background: var(--bg-soft); min-height: 100vh; }
.book-main { padding: 32px 24px 64px; max-width: 860px; }

/* Stepper */
.stepper { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 28px; flex-wrap: wrap; }
.step-dot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.step-dot .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); font-size: 13px; }
.step-dot.active { color: var(--primary); }
.step-dot.active .n { border-color: var(--primary); background: var(--primary); color: #fff; }
.step-dot.done .n { border-color: var(--accent); background: var(--accent); color: #04322a; }
.step-line { width: 28px; height: 2px; background: var(--line); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card h2 { font-size: 24px; letter-spacing: -.5px; margin-bottom: 4px; }
.card .card-sub { color: var(--muted); margin-bottom: 22px; }

/* Listado de tarjetas seleccionables */
.option-list { display: grid; gap: 12px; }
.option {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 16px 18px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease; background: #fff;
}
.option:hover { border-color: var(--primary); background: var(--primary-light); }
.option.selected { border-color: var(--primary); background: var(--primary-light); }
.option .o-main { display: flex; align-items: center; gap: 14px; }
.option .o-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--primary-light); display: grid; place-items: center; color: var(--primary); font-weight: 700; font-size: 17px; flex-shrink: 0; }
.option .o-title { font-weight: 700; }
.option .o-desc { font-size: 13.5px; color: var(--muted); }
.option .o-meta { text-align: right; flex-shrink: 0; }
.option .o-price { font-weight: 800; color: var(--ink); }
.option .o-dur { font-size: 13px; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }

/* Fecha y slots */
.date-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 20px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.slot-btn {
  padding: 11px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: all .12s ease;
}
.slot-btn:hover { border-color: var(--primary); color: var(--primary); }
.slot-btn.selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.empty-note { color: var(--muted); padding: 16px; background: var(--bg-soft); border-radius: 12px; text-align: center; }

.nav-buttons { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }

/* Resumen */
.summary { background: var(--bg-soft); border-radius: 14px; padding: 18px; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.summary-row .k { color: var(--muted); }
.summary-row .v { font-weight: 600; }
.summary-total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 12px; font-size: 18px; }

/* Éxito */
.success-box { text-align: center; padding: 20px 0; }
.success-ico { width: 72px; height: 72px; border-radius: 50%; background: #e6f9f2; color: #067a55; font-size: 36px; display: grid; place-items: center; margin: 0 auto 16px; }
.success-box h2 { font-size: 26px; margin-bottom: 8px; }
.success-detail { display: inline-block; text-align: left; margin: 16px auto; }

.pill-professional { display:flex; align-items:center; gap:8px; background:var(--primary-light); color:var(--primary); padding:4px 10px; border-radius:999px; font-size:13px; font-weight:700; }

/* Encabezado del negocio */
.biz-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.biz-logo { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; }
.biz-logo-ph { display: grid; place-items: center; background: var(--primary-light); color: var(--ink); font-weight: 800; font-size: 24px; }
.biz-title { font-size: 26px; letter-spacing: -.5px; }
.biz-meta { color: var(--muted); font-size: 14px; margin-top: 2px; }

/* Carrusel de fotos */
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow); background: #000; width: 100%; }
.carousel-track { display: flex; transition: transform .6s ease; }
.carousel-slide { min-width: 100%; height: 180px; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; }
.carousel-slide-ph { width: 100%; height: 100%; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(255,255,255,.9); color: #1a1a1a; font-size: 18px; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-btn:hover { background: #fff; }
.carousel-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.cdot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.cdot.on { background: #fff; }

/* Foto en avatar de profesional (reserva) */
.option .o-avatar.has-img { padding: 0; overflow: hidden; }
.option .o-avatar.has-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ---------- Responsive móvil (página de reserva) ---------- */
@media (max-width: 640px) {
  .book-main { padding: 16px 14px 48px; }
  .card { padding: 18px 16px; }
  .card h2 { font-size: 20px; }

  /* Stepper compacto: etiquetas más chicas, se ajusta en una línea */
  .stepper { gap: 4px; margin: 8px 0 18px; }
  .step-dot { font-size: 11px; gap: 4px; }
  .step-dot .n { width: 22px; height: 22px; font-size: 11px; }
  .step-line { width: 12px; }

  /* Cabecera del negocio apilada y centrada */
  .biz-header { gap: 12px; }
  .biz-logo { width: 56px; height: 56px; }
  .biz-title { font-size: 21px; }

  /* Carrusel más bajo */
  .carousel-slide { height: 140px; }

  /* Opciones (servicio/profesional) con texto que no se corta */
  .option { padding: 13px 14px; }
  .option .o-title { font-size: 15px; }
  .option .o-desc { font-size: 12.5px; }
  .option .o-avatar { width: 40px; height: 40px; font-size: 15px; }

  /* Slots en grilla cómoda al tacto */
  .slots { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
  .slot-btn { padding: 12px 6px; }

  /* Botones de navegación del flujo apilados */
  .nav-buttons { flex-direction: column-reverse; gap: 8px; }
  .nav-buttons .btn { width: 100%; }
}

/* Aviso de cliente reconocido (autocompletado) */
.welcome-back { background: var(--primary-light); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; color: var(--ink); }
.welcome-back .wb-sugg { color: var(--muted); font-size: 13px; }

/* Selector de sucursal en la reserva pública. */
.branch-picker { background: #fff; border: 1px solid var(--line, #e6e6ea); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.branch-picker label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.branch-picker select { width: 100%; padding: 10px 12px; border: 1px solid var(--line, #e6e6ea); border-radius: 9px; font-size: 15px; background: #fff; }
.branch-picker .branch-hint { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted, #6b7280); line-height: 1.4; }

/* Campo RUT en la reserva pública. */
.rut-field .opt { font-weight: 400; color: var(--muted, #6b7280); font-size: 12.5px; }
.rut-hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted, #6b7280); line-height: 1.4; }
.rut-hint-ok { color: #0a7d4b; }
.rut-hint-err { color: #c0392b; }

/* ---------- Página de gestión de reserva (reserva.html) ---------- */
.rsv-banner { border-radius: 12px; padding: 12px 16px; font-weight: 600; font-size: 14.5px; margin-bottom: 14px; }
.rsv-banner.ok { background: #e6f9f2; color: #067a55; border: 1px solid #bfe9d9; }
.rsv-banner.warn { background: #fff3d6; color: #8a6100; border: 1px solid #ffe1a3; }
.rsv-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.rsv-chip.pending { background: #fff3d6; color: #8a6100; }
.rsv-chip.confirmed { background: #e6f9f2; color: #067a55; }
.rsv-chip.cancelled { background: #fdecec; color: #c0392b; }
.rsv-chip.done { background: var(--primary-light); color: var(--primary); }
.rsv-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.rsv-detail > div { display: flex; flex-direction: column; gap: 2px; }
.rsv-detail span { font-size: 12.5px; color: var(--muted); }
.rsv-detail strong { font-size: 15px; }
.rsv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.rsv-actions .btn.danger { border-color: #e6b4b0; color: #c0392b; }
.rsv-actions .btn.danger:hover { background: #fdecec; border-color: #c0392b; }
.rsv-resched { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.rsv-date { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 15px; }
.rsv-slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rsv-slot { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; transition: border-color .15s ease, background .15s ease; }
.rsv-slot:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
@media (max-width: 480px) { .rsv-detail { grid-template-columns: 1fr; } }

/* Resalta el botón sugerido desde el correo (no ejecuta nada, solo guía al usuario) */
.rsv-pulse { box-shadow: 0 0 0 0 rgba(15,157,122,.5); animation: rsvPulse 1.6s ease-out infinite; }
@keyframes rsvPulse { 0% { box-shadow: 0 0 0 0 rgba(15,157,122,.45); } 70% { box-shadow: 0 0 0 10px rgba(15,157,122,0); } 100% { box-shadow: 0 0 0 0 rgba(15,157,122,0); } }
@media (prefers-reduced-motion: reduce) { .rsv-pulse { animation: none; } }
