:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #eef6f2;
    --ink: #172033;
    --muted: #697386;
    --line: #dfe5ef;
    --primary: #14213d;
    --blue: #114285;
    --blue-dark: #0b3064;
    --green: #0f9f6e;
    --danger: #dc2626;
    --shadow: 0 18px 45px rgba(17, 24, 39, .08);
}

* { box-sizing: border-box; }
body { margin: 0; max-width: 100%; overflow-x: clip; color: var(--ink); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, select { font: inherit; max-width: 100%; }
img, svg, video { max-width: 100%; }

.public-header { height: 74px; padding: 0 max(5vw, 24px); display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--blue); box-shadow: 0 5px 18px rgba(17,66,133,.18); }
.public-header a { text-decoration: none; }
.public-header > a:last-child { padding: 10px 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; font-size: 13px; font-weight: 700; }
.public-brand { display: flex; gap: 12px; align-items: center; }
.public-brand-logo { width: 40px; height: 40px; object-fit: contain; display: block; }

.directory-hero, .booking-hero { padding: 64px max(7vw, 24px); }
.directory-hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; background: linear-gradient(135deg, #eef4ff, #f5f7fb 55%, #e9f8f1); }
.directory-hero h1, .booking-hero h1 { margin: 12px 0; font-size: clamp(40px, 6vw, 76px); line-height: 1; letter-spacing: -.04em; }
.directory-hero em { color: var(--blue); font-style: normal; }
.directory-hero p { max-width: 600px; color: var(--muted); font-size: 18px; }
.eyebrow, .shop-place, .step { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.directory-hero button, .booking-meta button, .reserve-button { padding: 13px 18px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); font-weight: 700; cursor: pointer; }

.location-filter { margin: 0 max(7vw, 24px) 28px; padding: 20px; display: flex; align-items: end; gap: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.location-filter label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.location-filter select { min-width: 220px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.location-filter > a { padding-bottom: 11px; color: var(--blue); font-size: 13px; font-weight: 700; }

.barbershop-grid { padding: 0 max(7vw, 24px) 70px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.barbershop-card { padding: 22px; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.shop-monogram { min-height: 150px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--blue), var(--blue-dark)); font-size: 36px; font-weight: 800; }
.shop-logo { min-height: 150px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.shop-logo img { width: 100%; height: 100%; max-height: 150px; object-fit: contain; padding: 10px; }
.barbershop-card h2 { margin: 8px 0; font-size: 27px; }
.barbershop-card p { min-height: 42px; color: var(--muted); }
.barbershop-card a { color: var(--blue); font-weight: 800; text-decoration: none; }
.empty-directory { grid-column: 1 / -1; padding: 70px; text-align: center; }

.booking-hero { position: relative; min-height: 280px; padding: 44px max(7vw, 24px); display: flex; align-items: center; color: #fff; background: linear-gradient(135deg, var(--blue-dark), var(--blue)); background-size: cover; background-position: center; background-repeat: no-repeat; }
.booking-hero.has-banner { background-image: linear-gradient(180deg, rgba(10,20,40,.30) 0%, rgba(10,20,40,.55) 50%, rgba(10,20,40,.85) 100%), var(--hero-banner); }
.booking-hero-inner { width: 100%; max-width: 1200px; margin: 0 auto; }
.booking-hero > a, .booking-hero-inner > a { color: #cbdcf4; font-size: 13px; }
.booking-hero h1 { margin-bottom: 8px; max-width: 16ch; }
.booking-hero p { max-width: 60ch; color: #cbdcf4; }
.booking-hero.has-banner h1, .booking-hero.has-banner p, .booking-hero.has-banner .eyebrow { text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.booking-meta { margin-top: 25px; display: flex; gap: 10px; flex-wrap: wrap; }
.booking-meta span, .booking-meta button { padding: 11px 15px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; color: #fff; background: rgba(255,255,255,.08); }
.preview-notice { padding: 13px 24px; color: #7c4a03; background: #fff4d6; text-align: center; font-size: 14px; font-weight: 700; }

.booking-shell { padding: 36px max(5vw, 20px); display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; }
.slots-panel, .reserve-panel { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.barber-picker { margin-bottom: 18px; padding: 15px; border-radius: 10px; background: #eef4ff; }
.barber-picker-title { display: block; margin-bottom: 8px; color: var(--blue); font-weight: 800; }
.barber-card { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.barber-card-photo { flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 50%; background: #eef2f7; }
.barber-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.barber-card-info { display: grid; gap: 2px; min-width: 0; }
.barber-card-info small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.barber-card-info strong { font-size: 16px; overflow-wrap: anywhere; }
.barber-card-whatsapp { display: inline-flex; align-items: center; gap: 6px; color: #128c7e; font-size: 13px; font-weight: 800; text-decoration: none; }
.barber-card-whatsapp:hover { text-decoration: underline; }
.barber-card-whatsapp svg { flex: none; }

/* Selector personalizado (accesible, responsive, sin desbordes) */
.pick { position: relative; width: 100%; }
.pick-trigger { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-width: 0; min-height: 46px; padding: 11px 12px; border: 1px solid #bfd0ea; border-radius: 8px; background: #fff; color: var(--ink); font-weight: 700; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pick-trigger:hover { border-color: var(--blue); }
.pick-trigger:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(17, 66, 133, .15); }
.pick.is-open .pick-trigger { border-color: var(--green); box-shadow: 0 0 0 3px rgba(15, 159, 110, .16); }
.pick-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-caret { flex: none; width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(45deg); transition: transform .2s, margin-top .2s; }
.pick.is-open .pick-caret { margin-top: 4px; transform: rotate(-135deg); }
.pick-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: 6px; list-style: none; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 20px 50px rgba(15, 23, 42, .22); }
.pick-list[hidden] { display: none; }
.pick-option { padding: 10px 12px; border-radius: 8px; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.35; white-space: normal; overflow-wrap: break-word; word-break: break-word; cursor: pointer; }
.pick-option:hover, .pick-option:focus { background: #f5f8ff; outline: none; }
.pick-option.is-selected { background: #f0fbf6; color: #0f5132; font-weight: 800; box-shadow: inset 3px 0 0 var(--green); }

/* Filtro por momento del día (Mañana / Tarde / Todo el día) */
.when-filter { margin-bottom: 16px; }
.when-label { display: block; margin-bottom: 8px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.when-options { display: flex; gap: 8px; }
.when-chip { flex: 1; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.15; text-align: center; text-decoration: none; transition: border-color .15s, background .15s, color .15s, box-shadow .15s; }
.when-chip small { color: var(--muted); font-size: 11px; font-weight: 600; }
.when-chip:hover { border-color: var(--green); }
.when-chip.is-active { border-color: var(--green); background: #f0fbf6; box-shadow: 0 0 0 2px rgba(15, 159, 110, .16); }
.when-chip.is-active small { color: var(--green); }

@media (max-width: 400px) {
    .when-chip small { display: none; }
}
.month-nav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; padding-bottom: 15px; border-bottom: 1px solid var(--line); text-align: center; }
.month-nav h2 { margin: 0; }
.month-nav a, .month-nav-disabled { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; text-decoration: none; font-size: 22px; }
.month-nav a { color: #fff; background: var(--blue); }
.month-nav-disabled { color: #aeb7c5; background: #edf0f5; }
.month-nav a:last-child { justify-self: end; }
.slot-days { margin-top: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.slot-day { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.slot-day h3 { margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; color: var(--blue); text-transform: uppercase; }
.slot-day h3 span { font-size: 25px; }
.slot-day > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.slot { padding: 9px 4px; border: 1px solid var(--line); border-radius: 7px; color: var(--blue); background: #fff; cursor: pointer; }
.slot:hover, .slot.selected { border-color: var(--green); color: #fff; background: var(--green); font-weight: 700; }
.no-slots { grid-column: 1 / -1; padding: 60px 20px; color: var(--muted); text-align: center; }

.reserve-panel h2 { margin-bottom: 5px; }
.reserve-panel > p { color: var(--muted); }
.reserve-panel form, .reserve-panel label { display: grid; gap: 7px; }
.reserve-panel form { gap: 15px; }
.reserve-panel label { color: var(--ink); font-size: 13px; font-weight: 700; }
.reserve-panel input { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.reserve-panel input:focus { outline: 2px solid rgba(17,66,133,.2); border-color: var(--blue); }
.sinpe-note { padding: 15px; display: grid; gap: 5px; border-left: 4px solid var(--green); border-radius: 8px; background: var(--surface-soft); }
.sinpe-note span, .reserve-panel small { color: var(--muted); }
.booking-step > p.booking-note { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 11px 13px; border: 1px solid #ffe2a8; border-radius: 10px; color: #7c4a03; background: #fff7e6; font-size: 13px; font-weight: 700; line-height: 1.35; }
.booking-step > p.booking-note svg { flex: none; margin-top: 1px; }
.public-errors { padding: 12px; border-radius: 8px; color: #991b1b; background: #fee2e2; }
.reserve-button { background: var(--green); }
.reserve-button:disabled { opacity: .5; cursor: not-allowed; }

/* Flujo por pasos de reserva */
.booking-form { display: grid; gap: 15px; }
.step-track { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.step-track-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fbfcfe; font-size: 12px; font-weight: 700; min-width: 0; }
.step-track-item span { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #475569; background: #e2e8f0; font-size: 12px; font-weight: 800; }
.step-track-item em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-track-item.is-active { border-color: var(--green); color: var(--ink); background: #f0fbf6; }
.step-track-item.is-active span,
.step-track-item.is-done span { color: #fff; background: var(--green); }
.step-track-item.is-done { color: var(--ink); }
.step-track-item.is-active em { color: var(--green); }

.booking-step { display: none; }
.booking-step.is-active { display: grid; gap: 15px; }
.booking-step h2 { margin: 0; }
.booking-step > p { margin: 0; color: var(--muted); }
.slot-summary { display: grid; gap: 3px; padding: 12px 15px; border-radius: 10px; background: #eef4ff; }
.slot-summary[hidden] { display: none; }
.slot-summary small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.slot-summary strong { color: var(--blue); font-size: 16px; overflow-wrap: anywhere; }
.step-actions { display: flex; gap: 10px; }
.step-actions .reserve-button { flex: 1; }
.step-back { padding: 11px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font-weight: 700; cursor: pointer; }
.step-back:hover { border-color: var(--blue); color: var(--blue); }

.receipt-shell { max-width: 640px; margin: 48px auto; padding: 44px 38px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.receipt-status { padding: 8px 14px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; color: #991b1b; background: #fee2e2; font-weight: 800; font-size: 13px; }
.receipt-status.confirmed { color: #166534; background: #dcfce7; }
.receipt-status.cancelled { color: #555; background: #eee; }
.receipt-status span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.receipt-shell .eyebrow { display: block; margin-top: 18px; }
.receipt-date { margin: 8px 0 14px; font-size: clamp(22px, 4.5vw, 34px); line-height: 1.2; letter-spacing: -.02em; text-transform: capitalize; overflow-wrap: anywhere; }
.receipt-when { display: inline-flex; align-items: baseline; gap: 10px; margin: 0 0 6px; padding: 10px 22px; border-radius: 999px; background: #eef4ff; }
.receipt-time { color: var(--blue); font-size: clamp(30px, 8vw, 44px); font-weight: 800; line-height: 1; }
.receipt-when span { color: var(--muted); font-weight: 700; font-size: 14px; }
.receipt-details { margin: 28px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); text-align: left; }
.receipt-details div { padding: 16px 18px; display: grid; gap: 6px; background: #fff; min-width: 0; }
.receipt-details small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.receipt-details b { font-size: 15px; overflow-wrap: anywhere; }
.receipt-shell > p { margin: 0 0 22px; color: var(--muted); line-height: 1.6; }
.receipt-shell > p strong { color: var(--ink); }
.receipt-back { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 20px; border: 1px solid var(--line); border-radius: 10px; color: var(--green); background: #f0fbf6; font-weight: 800; text-decoration: none; }
.receipt-back:hover { border-color: var(--green); }

/* Selector de servicio (reserva pública) */
.service-picker { margin-bottom: 16px; }
.service-picker-title { display: block; margin-bottom: 8px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.service-picker-track { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.service-option { flex: 0 0 150px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: inherit; text-decoration: none; scroll-snap-align: start; transition: border-color .15s, box-shadow .15s; }
.service-option.is-selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(15, 159, 110, .2); }
.service-option-media { display: block; aspect-ratio: 4 / 3; background: #eef2f7; }
.service-option-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-option-empty { width: 100%; height: 100%; display: grid; place-items: center; color: #94a3b8; background: linear-gradient(135deg, #eef4ff, #e9f8f1); font-size: 24px; }
.service-option { position: relative; }
.service-option-media { position: relative; z-index: 2; cursor: zoom-in; }
.service-option-media .service-gallery { position: relative; display: block; width: 100%; height: 100%; }
.service-gallery img { display: none; }
.service-gallery img.is-active { display: block; }
.service-option .gallery-nav { position: absolute; top: 50%; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .55); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; transform: translateY(-50%); }
.service-option .gallery-nav.prev { left: 6px; }
.service-option .gallery-nav.next { right: 6px; }
.service-option .gallery-count { position: absolute; right: 6px; bottom: 6px; z-index: 2; padding: 2px 7px; border-radius: 999px; background: rgba(15, 23, 42, .6); color: #fff; font-size: 10px; font-weight: 800; }
.service-option-body { position: relative; display: grid; gap: 3px; padding: 9px 10px; text-decoration: none; color: inherit; }
.service-option-body::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.service-option-body strong { font-size: 13px; overflow-wrap: anywhere; }
.service-option-meta { color: var(--blue); font-size: 12px; font-weight: 800; }
.service-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; text-align: left; }
.service-summary-media { flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 10px; }
.service-summary-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-summary-info { display: grid; gap: 2px; min-width: 0; }
.service-summary-info small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.service-summary-info strong { font-size: 15px; overflow-wrap: anywhere; }
.service-summary-info span { color: var(--blue); font-size: 13px; font-weight: 700; }
.booking-recap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); text-align: left; }
.booking-recap-item { display: grid; gap: 3px; padding: 12px; background: #fff; }
.booking-recap-item.full { grid-column: 1 / -1; }
.booking-recap-item small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.booking-recap-item strong { font-size: 15px; overflow-wrap: anywhere; }

@media (max-width: 600px) {
    .service-option { flex-basis: 132px; }
    .booking-recap { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .directory-hero { align-items: start; flex-direction: column; }
    .barbershop-grid, .booking-shell { grid-template-columns: minmax(0, 1fr); }
    .booking-shell { padding: 18px; }
    .slot-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .public-header strong { display: none; }
    .location-filter { align-items: stretch; flex-direction: column; }
    .location-filter select { width: 100%; min-width: 0; }
    .barbershop-card { grid-template-columns: 82px minmax(0, 1fr); }
    .shop-monogram { min-height: 110px; font-size: 28px; }
    .shop-logo { min-height: 110px; }
    .shop-logo img { max-height: 110px; }
    .slot-days { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .directory-hero { padding: 38px 20px; }
    .directory-hero h1 { font-size: 40px; }
    .booking-hero { min-height: auto; padding: 22px 18px; }
    .booking-hero h1 { font-size: 28px; margin: 8px 0; }
    .booking-hero p { margin: 0; font-size: 14px; }
    .booking-meta { margin-top: 14px; gap: 8px; }
    .booking-meta span, .booking-meta button { padding: 8px 12px; font-size: 13px; }
    .directory-hero button { width: 100%; min-height: 48px; }
    .barbershop-grid { padding: 0 12px 40px; grid-template-columns: minmax(0, 1fr); }
    .barbershop-card { padding: 15px; gap: 14px; }
    .booking-shell { display: flex; flex-direction: column; }
    .slots-panel, .reserve-panel { padding: 16px; }
    .barber-picker label { grid-template-columns: minmax(0, 1fr); }
    .barber-picker select, .reserve-panel input, .reserve-button { min-height: 48px; }
    .slot { min-height: 44px; }
    .month-nav h2 { font-size: 18px; }
    .reserve-panel { order: 2; }
    .step-track { gap: 6px; }
    .step-track-item { flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 9px 6px; text-align: center; }
    .step-track-item em { display: block; white-space: normal; font-size: 11px; font-weight: 700; line-height: 1.2; }
    .receipt-shell { margin: 14px; padding: 26px 18px; border-radius: 16px; }
    .receipt-details { grid-template-columns: minmax(0, 1fr); margin: 22px 0; }
    .receipt-details div { padding: 13px 16px; }
    .receipt-when { padding: 9px 18px; }
}

@media (max-width: 400px) {
    .slot-days { grid-template-columns: minmax(0, 1fr); }
    .step-track { gap: 6px; }
    .step-track-item { padding: 7px 6px; }
    .step-actions { flex-direction: column-reverse; }
    .step-actions .step-back,
    .step-actions .reserve-button { width: 100%; }
}

/* ===== Aviso de instalación de la app (PWA) ===== */
.pwa-install {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    width: min(460px, calc(100vw - 24px));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
    padding-right: 40px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
    opacity: 0;
    transform: translateX(-50%) translateY(140%);
    transition: transform .34s cubic-bezier(.22, 1, .36, 1), opacity .34s ease;
    pointer-events: none;
}

.pwa-install[hidden] { display: none; }

.pwa-install.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.pwa-install-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    background: transparent;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.pwa-install-close:hover { background: #f1f5f9; color: var(--ink); }

.pwa-install-icon {
    flex: none;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 13px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .18);
}

.pwa-install-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pwa-install-body { flex: 1 1 160px; min-width: 0; text-align: left; }
.pwa-install-body strong { display: block; font-size: 15px; font-weight: 800; color: var(--ink); }
.pwa-install-body p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }

.pwa-install-actions { flex: 1 1 100%; display: flex; gap: 8px; margin-top: 4px; }
.pwa-install-btn {
    flex: 1;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(17, 66, 133, .28);
}
.pwa-install-btn:hover { filter: brightness(1.06); }
.pwa-install-later {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--muted);
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.pwa-install-later:hover { color: var(--ink); border-color: var(--blue); }

.pwa-ios-help {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: end center;
    padding: 16px calc(16px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(15, 23, 42, .55);
}
.pwa-ios-help[hidden] { display: none; }

.pwa-ios-help-card {
    width: min(430px, 100%);
    padding: 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .35);
    text-align: left;
}
.pwa-ios-help-card strong { display: block; margin-bottom: 12px; font-size: 16px; color: var(--ink); }
.pwa-ios-help-card ol { margin: 0 0 18px; padding-left: 20px; color: var(--ink); font-size: 14px; line-height: 1.7; }
.pwa-ios-help-btn {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: var(--blue);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

@media (min-width: 700px) {
    .pwa-install { padding-right: 16px; }
    .pwa-install-actions { flex: 0 0 auto; margin-top: 0; }
    .pwa-install-btn { flex: none; }
}

/* ===== Visor de fotos del servicio (zoom) ===== */
.booking-lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 20, 40, .92);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.booking-lightbox[hidden] { display: none; }

.booking-lightbox img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.booking-lightbox-close {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.booking-lightbox-close:hover { background: rgba(255, 255, 255, .3); }

.booking-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.booking-lightbox-nav.prev { left: 14px; }
.booking-lightbox-nav.next { right: 14px; }
.booking-lightbox-nav:hover { background: rgba(255, 255, 255, .3); }
.booking-lightbox.is-single .booking-lightbox-nav { display: none; }
