{{-- Mobile tap highlight fix --}} {{-- ╔══════════════════════════════════════════════╗ ║ STEPPER ║ ╚══════════════════════════════════════════════╝ --}} @if ($step <= 4)
    {{-- connector --}}
    @foreach (['Servicio', 'Profesional', 'Fecha y hora', 'Mis datos'] as $i => $label) @php $n = $i + 1; @endphp
  1. {{ $n }}
  2. @endforeach
@endif
{{-- ── Error ──────────────────────────────────── --}} @if ($error)

{{ $error }}

@endif {{-- ╔══════════════════════════════════════════════╗ ║ PASO 1 — Servicios ║ ╚══════════════════════════════════════════════╝ --}} @if ($step === 1)

¿Qué servicio deseas?

Selecciona el servicio para comenzar.

@if ($this->services->isEmpty())

No hay servicios disponibles en este momento.

@else
@foreach ($this->services as $svc) @php $cardPromotion = $this->featuredPromotions->first(fn ($promotion) => $promotion->appliesToService($svc->id)); $servicePrice = (float) $svc->effectivePrice(); $discountedPrice = $cardPromotion ? max(0, $servicePrice - $cardPromotion->calculateDiscount($servicePrice)) : $servicePrice; @endphp @endforeach
@endif
@endif {{-- ╔══════════════════════════════════════════════╗ ║ PASO 2 — Profesional ║ ╚══════════════════════════════════════════════╝ --}} @if ($step === 2)
@include('livewire.public._back-btn')

¿Con quién quieres tu cita?

{{ $this->selectedService?->name }}

@if ($this->employees->isEmpty())
Este servicio aún no tiene profesionales asignados.
@else
{{-- Cualquier profesional --}} @foreach ($this->employees as $emp) @endforeach
@endif
@endif {{-- ╔══════════════════════════════════════════════╗ ║ PASO 3 — Fecha y hora ║ ╚══════════════════════════════════════════════╝ --}} @if ($step === 3)
@include('livewire.public._back-btn')

¿Cuándo te viene bien?

{{ $this->selectedService?->name }} · {{ $this->selectedService?->duration_minutes }} min

{{-- Date strip --}}

{{ \Carbon\Carbon::parse($date)->isoFormat('dddd, D [de] MMMM [de] YYYY') }}

@foreach ($this->dateOptions as $opt) @endforeach
{{-- Slots --}}

Horarios disponibles

Buscando horarios...
@if ($this->availableSlots->isEmpty())

Sin horarios para este día.

Selecciona otra fecha.

@else @php $grouped = $this->availableSlots->groupBy(function ($slot) { $h = (int) explode(':', $slot['start'])[0]; if ($h < 12) return 'Mañana'; if ($h < 18) return 'Tarde'; return 'Noche'; }); @endphp
@foreach ($grouped as $period => $slots)

{{ $period }}

@foreach ($slots as $slot) @endforeach
@endforeach
@endif
@endif {{-- ╔══════════════════════════════════════════════╗ ║ PASO 4 — Datos del cliente ║ ╚══════════════════════════════════════════════╝ --}} @if ($step === 4)
@include('livewire.public._back-btn') {{-- Resumen de reserva --}}

Tu reserva

@foreach ([ ['icon'=>'M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z', 'label'=>'Servicio', 'value'=> $this->selectedService?->name ?? '—'], ['icon'=>'M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z', 'label'=>'Fecha', 'value'=> \Carbon\Carbon::parse($date)->isoFormat('ddd D MMM')], ['icon'=>'M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z', 'label'=>'Hora', 'value'=> $time], ] as $item)

{{ $item['label'] }}

{{ $item['value'] }}

@endforeach

Completa tus datos

Solo necesitamos tu nombre y celular para confirmar.

@error('customer_first_name')

{{ $message }}

@enderror
{{ $countryCallingCode }}

Solo los 10 dígitos de tu WhatsApp

@error('customer_phone')

{{ $message }}

@enderror
@error('customer_email')

{{ $message }}

@enderror
{{-- ── Cupón (link → panel Alpine) ── --}}

Código de descuento

@if ($appliedCouponId) @endif
@if ($couponMessage)

{{ $couponMessage }}

@endif @if ($couponError)

{{ $couponError }}

@endif
{{-- Recordar datos --}} {{-- Precio + CTA --}}
@if ($this->pricing['promotion_discount'] > 0 || $this->pricing['coupon_discount'] > 0)

Subtotal: $ {{ number_format($this->pricing['subtotal'], 0, ',', '.') }}

@if ($this->pricing['promotion_discount'] > 0)

Promoción: -$ {{ number_format($this->pricing['promotion_discount'], 0, ',', '.') }}

@endif @if ($this->pricing['coupon_discount'] > 0)

Cupón: -$ {{ number_format($this->pricing['coupon_discount'], 0, ',', '.') }}

@endif
@endif

Total

$ {{ number_format($this->pricing['total'], 0, ',', '.') }}

@endif {{-- ╔══════════════════════════════════════════════╗ ║ PASO 5 — Éxito ║ ╚══════════════════════════════════════════════╝ --}} @if ($step === 5)

¡Reserva confirmada!

Anota tu código para gestionar la cita.

Código de reserva

{{ $confirmedCode }}

@foreach ([ ['Servicio', $this->selectedService?->name ?? '—'], ['Fecha', \Carbon\Carbon::parse($date)->isoFormat('ddd D [de] MMM')], ['Hora', $time], ['Total', '$ '.number_format($this->pricing['total'], 0, ',', '.')], ] as [$k, $v])
{{ $k }} {!! $v !!}
@endforeach

Recibirás una confirmación al correo que ingresaste.

@if ($confirmedCancelUrl) Cancelar esta reserva @endif
@endif