/* Estilos propios (reserva + accesibilidad). Tailwind compilado va en tailwind.css. */
:root { --gold: #F5B800; --gold-2: #FFD000; --ok: #22c55e; --err: #f87171; --ink: #050a15; }

/* Accesibilidad: foco visible para teclado, y menos movimiento si el usuario lo pide */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Reserva ─────────────────────────────────────────────── */
.bk { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: 1.25rem; padding: 1.25rem; }
.bk-title { font-size: 1.15rem; font-weight: 800; color: #fff; margin: 0 0 1rem; }
.bk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.bk-step { display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; align-items: start; }
.bk-num { width: 2rem; height: 2rem; border-radius: 999px; background: var(--gold); color: #000; font-weight: 900; display: grid; place-items: center; font-size: .9rem; }
.bk-body { min-width: 0; }
.bk-label { font-weight: 700; color: #fff; margin: .25rem 0 .6rem; font-size: 1rem; }
.bk-hint { color: rgba(255,255,255,.65); font-size: .9rem; margin: .4rem 0 0; }
.bk-count { color: rgba(255,255,255,.6); font-weight: 600; }
.bk-count-ok { color: var(--ok); }

.bk-stepper { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.06); border-radius: 999px; padding: .25rem; }
.bk-stepper button { width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.4rem; font-weight: 800; cursor: pointer; }
.bk-stepper button:hover:not(:disabled) { background: var(--gold); color: #000; }
.bk-stepper button:disabled { opacity: .35; cursor: not-allowed; }
.bk-people { min-width: 2.5rem; text-align: center; font-size: 1.25rem; font-weight: 900; color: #fff; }

.bk-legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .82rem; color: rgba(255,255,255,.75); margin-bottom: .6rem; }
.bk-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.bk-dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1.5px solid rgba(255,255,255,.3); }
.bk-dot-free { background: rgba(255,255,255,.07); }
.bk-dot-pick { background: var(--gold); border-color: var(--gold-2); }
.bk-dot-busy { background: rgba(239,68,68,.2); border-color: #ef4444; }
.bk-map [data-pick]:hover { transform: scale(1.08); }

.bk-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.bk-fields label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: rgba(255,255,255,.8); font-weight: 600; }
.bk-full { grid-column: 1 / -1; }
.bk-in { min-height: 44px; padding: .6rem .8rem; border-radius: .7rem; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: #fff; font-size: 1rem; }
.bk-in:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(245,184,0,.3); }
@media (max-width: 520px) { .bk-fields { grid-template-columns: 1fr; } }

.bk-dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 .6rem; color: #fff; font-size: .95rem; }
.bk-dl dt { color: rgba(255,255,255,.6); }
.bk-dl dd { margin: 0; text-align: right; font-weight: 600; }
.bk-total { font-size: 1.15rem; font-weight: 900 !important; color: var(--gold) !important; border-top: 1px solid rgba(255,255,255,.12); padding-top: .4rem; }
.bk-fx { font-size: .85rem; color: rgba(255,255,255,.75); line-height: 1.5; margin: 0 0 .9rem; }
.bk-paypal { background: #fff; border-radius: .9rem; padding: .75rem; }
.bk-secure { font-size: .8rem; color: rgba(255,255,255,.65); margin: .6rem 0; }
.bk-soon { background: rgba(245,184,0,.1); border: 1px dashed rgba(245,184,0,.5); color: #fde68a; border-radius: .9rem; padding: .9rem; font-size: .9rem; margin-bottom: .75rem; }
.bk-wa { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: .8rem; background: #22c55e; color: #fff; font-weight: 800; text-decoration: none; margin-top: .5rem; }
.bk-wa:hover { background: #16a34a; }
.bk-msg { min-height: 1.2em; margin: .6rem 0 0; color: var(--err); font-size: .9rem; font-weight: 600; }
.bk-msg.bk-ok { color: var(--ok); }
.bk-err { color: var(--err); font-weight: 600; }
.bk-success { background: rgba(34,197,94,.12); border: 1px solid var(--ok); color: #bbf7d0; border-radius: .9rem; padding: 1rem; line-height: 1.6; }
.bk-soldout { color: #fecaca; margin: 0; }

/* Panel admin: efectos hover (antes eran atributos onmouseenter en línea, bloqueados por la CSP) */
.adm-back:hover { color: var(--gold) !important; }
#btn-new:hover { border-color: var(--gold) !important; color: var(--gold) !important; }
[data-ri]:hover, [data-ri]:focus-visible { opacity: 1 !important; }

/* ══ Ficha de salida (modal) — v6: 2 columnas en PC, panel de reserva fijo ══ */
.sm-overlay { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  padding: clamp(0px, 2.5vw, 32px); background: rgba(3,6,14,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: sm-fade .2s ease; }
.sm-overlay.hidden { display: none; }
@keyframes sm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sm-rise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

.sm-dialog { width: min(1240px, 100%); height: min(860px, 100%); display: flex; flex-direction: column;
  background: linear-gradient(160deg, #0b1424 0%, #070d1b 60%, #060b16 100%); color: #fff;
  border: 1px solid rgba(255,255,255,.09); border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(245,184,0,.05); animation: sm-rise .25s cubic-bezier(.2,.8,.2,1); }

.sm-head { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(5,10,21,.6); flex-shrink: 0; }
.sm-back { min-height: 40px; padding: 0 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: transparent;
  color: rgba(255,255,255,.85); font-weight: 700; font-size: .85rem; cursor: pointer; transition: background .15s, border-color .15s; }
.sm-back:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }
.sm-chips { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1; justify-content: center; }
.sm-chip { font-size: .8rem; font-weight: 700; padding: .35rem .8rem; border-radius: 999px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.85); }
.sm-chip.sa-location { color: var(--gold); background: rgba(245,184,0,.1); }
.sm-close { width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 1.6rem;
  line-height: 1; cursor: pointer; transition: background .15s, transform .15s; flex-shrink: 0; }
.sm-close:hover { background: rgba(255,255,255,.2); transform: rotate(90deg); }

.sm-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.sm-main { overflow-y: auto; padding: 1.5rem 1.75rem 2.5rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.sm-side { overflow-y: auto; border-left: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.025);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.sm-side-inner { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }

/* Galería */
.sm-gallery { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 16 / 10; }
.sm-carousel { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; }
.sm-carousel > div { scroll-snap-align: center; }
.sm-carousel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px; border: 0;
  background: rgba(0,0,0,.55); color: #fff; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(6px); transition: background .15s, transform .15s; z-index: 2; }
.sm-nav:hover { background: rgba(0,0,0,.8); transform: translateY(-50%) scale(1.06); }
.sm-nav.hidden { display: none; }
.sm-prev { left: 14px; } .sm-next { right: 14px; }
.sm-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.sm-thumbs { display: flex; gap: .6rem; overflow-x: auto; padding: .75rem 0 .25rem; }
.sm-thumb { flex: 0 0 88px; height: 60px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer;
  opacity: .55; transition: opacity .15s, border-color .15s; background: #000; }
.sm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-thumb:hover { opacity: .9; }
.sm-thumb.is-active { opacity: 1; border-color: var(--gold); }

/* Texto */
.sm-title { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 2.6vw, 2.6rem); font-weight: 800; line-height: 1.1; margin: 1.25rem 0 1rem; }
.sm-section { margin-top: 1.5rem; }
.sm-h3 { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 .6rem; }
.sm-desc { white-space: pre-line; color: rgba(255,255,255,.78); font-size: 1rem; line-height: 1.7; max-width: 68ch; margin: 0; }
.sm-social { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }

/* Panel lateral */
.sm-price { border-radius: 16px; padding: 1rem 1.25rem; background: linear-gradient(120deg, #F5B800, #FFD000); color: #000;
  font-weight: 900; font-size: 1.6rem; box-shadow: 0 12px 30px -12px rgba(245,184,0,.55); }
.sm-price::before { content: 'Precio por persona'; display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; opacity: .65; margin-bottom: .15rem; }
.sm-side .bk { background: transparent; border: 0; padding: 0; }
.sm-side .bk-title { font-size: 1.05rem; }
.sm-form { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.85); font-weight: 700; font-size: .9rem; text-decoration: none; transition: background .15s; }
.sm-form:hover { background: rgba(255,255,255,.08); }

/* Tablet y móvil: una columna, pantalla completa */
@media (max-width: 1023px) {
  .sm-overlay { padding: 0; align-items: stretch; }
  .sm-dialog { height: 100%; width: 100%; border-radius: 0; border: 0; }
  .sm-body { display: block; overflow-y: auto; }
  .sm-main, .sm-side { overflow: visible; }
  .sm-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
  .sm-main { padding: 1rem 1rem 1.5rem; }
  .sm-back { display: none; }
  .sm-chips { justify-content: flex-start; }
  .sm-gallery { aspect-ratio: 4 / 3; border-radius: 14px; }
}
@media (min-width: 1440px) { .sm-body { grid-template-columns: minmax(0, 1fr) 460px; } }
/* Ajustes del panel de reserva dentro de la columna lateral */
.bk-step { grid-template-columns: 2rem minmax(0, 1fr); }
.bk-in { width: 100%; min-width: 0; box-sizing: border-box; }
.sm-side .bk-fields { grid-template-columns: 1fr; }
.sm-side .bk-map { overflow-x: auto; }

/* ══ v7: animaciones suaves, esqueleto y botón X ══════════════════════════ */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in: cubic-bezier(.4, 0, 1, 1); }

/* Modal: transición de entrada y salida (estado .is-open) */
.sm-overlay { animation: none; opacity: 0; transition: opacity .22s var(--ease-in); }
.sm-overlay.is-open { opacity: 1; transition: opacity .28s var(--ease-out); }
.sm-dialog { animation: none; opacity: 0; transform: translateY(18px) scale(.97);
  transition: transform .22s var(--ease-in), opacity .18s var(--ease-in); will-change: transform, opacity; }
.sm-overlay.is-open .sm-dialog { opacity: 1; transform: none;
  transition: transform .42s var(--ease-out), opacity .3s var(--ease-out); }
@media (max-width: 1023px) {
  .sm-dialog { transform: translateY(40px); }
}

/* Botón X: el botón no se mueve; solo gira el ícono, y solo con mouse real */
.sm-close { display: grid; place-items: center; padding: 0; transform: none !important;
  transition: background-color .2s ease, box-shadow .2s ease; -webkit-tap-highlight-color: transparent; }
.sm-close svg { transition: transform .35s var(--ease-out); pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .sm-close:hover { background: rgba(255,255,255,.18); }
  .sm-close:hover svg { transform: rotate(90deg); }
}
.sm-close:active { background: rgba(255,255,255,.25); }
.sm-close:active svg { transform: scale(.88); }
.sm-close:focus-visible { box-shadow: 0 0 0 3px var(--gold); outline: none; }

/* Botones del modal: respuesta inmediata al toque */
.sm-nav, .sm-back, .sm-thumb, .bk-stepper button, .bk-wa, .sm-form { -webkit-tap-highlight-color: transparent; }
.sm-nav:active { transform: translateY(-50%) scale(.94); }
.bk-stepper button { transition: background-color .15s ease, color .15s ease, transform .12s ease; }
.bk-stepper button:active:not(:disabled) { transform: scale(.92); }

/* Tarjetas: entrada escalonada y hover suave (antes saltaban 16px en 0.5s) */
.sa-enter { opacity: 0; transform: translateY(14px); animation: sa-in .6s var(--ease-out) forwards; }
.sa-enter:nth-child(2) { animation-delay: .06s; } .sa-enter:nth-child(3) { animation-delay: .12s; }
.sa-enter:nth-child(4) { animation-delay: .18s; } .sa-enter:nth-child(5) { animation-delay: .24s; }
.sa-enter:nth-child(n+6) { animation-delay: .3s; }
@keyframes sa-in { to { opacity: 1; transform: none; } }
.sa-card { transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out); will-change: transform; }
@media (hover: hover) and (pointer: fine) { .sa-card:hover { transform: translateY(-6px); } }
.sa-card:active { transform: scale(.99); transition-duration: .15s; }

/* Fotos: fundido al cargar, con fondo de esqueleto mientras tanto */
.sa-card img, .sm-carousel img, .sm-thumb img { opacity: 0; transition: opacity .45s ease; }
.sa-card img.is-loaded, .sm-carousel img.is-loaded, .sm-thumb img.is-loaded { opacity: 1; }
.sm-carousel > div, .sm-thumb { background: linear-gradient(100deg, #0f1a2c 30%, #18263d 50%, #0f1a2c 70%) 0 0 / 300% 100%; animation: sk-shine 1.4s linear infinite; }

/* Esqueleto de tarjetas */
.sk-card { border-radius: 3rem; overflow: hidden; background: #0c1526; border: 1px solid rgba(255,255,255,.05); }
.sk { background: linear-gradient(100deg, #121e33 30%, #1c2b45 50%, #121e33 70%) 0 0 / 300% 100%; animation: sk-shine 1.4s linear infinite; border-radius: 10px; }
.sk-img { height: 320px; border-radius: 0; }
.sk-body { padding: 1.75rem 2rem 2rem; display: grid; gap: .8rem; }
.sk-line { height: 14px; }
.sk-title { height: 30px; width: 65%; margin: .25rem 0 .4rem; }
.sk-row { display: flex; gap: .75rem; margin-top: .6rem; }
.sk-pill { height: 46px; flex: 1; border-radius: 14px; }
@keyframes sk-shine { from { background-position: 100% 0; } to { background-position: -50% 0; } }

@media (prefers-reduced-motion: reduce) {
  .sa-enter { opacity: 1; transform: none; }
  .sm-dialog, .sm-overlay.is-open .sm-dialog { transform: none; }
}
