/* =========================================================
   Reservas y carrito — Apu Sacred Journeys
   ========================================================= */

html.bk-lock { overflow: hidden; }

/* ---------- Botón carrito en el menú ---------- */
.nav__tools { display: flex; align-items: center; gap: 18px; margin-left: 22px; }
.cart-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(8,14,16,.35); border: 1px solid var(--line); color: var(--gold-soft);
  backdrop-filter: blur(8px);
  transition: border-color .3s, background .3s, transform .3s var(--ease);
}
.cart-btn:hover { border-color: var(--gold); background: rgba(212,169,79,.12); transform: translateY(-2px); }
.cart-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cart-btn__count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; display: grid; place-items: center;
  background: var(--gold); color: #1a140a; font: 500 11px/1 var(--sans);
  box-shadow: 0 0 0 2px var(--night);
}
.cart-btn__count[hidden] { display: none; }
.cart-btn__count.is-bump { animation: bump .5s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.card__book { align-self: flex-start; }

/* ---------- Base de ventanas (dialog) ---------- */
.bk-modal, .bk-drawer {
  border: 0; padding: 0; color: var(--ivory); background: transparent;
  max-width: none; max-height: none;
}
.bk-modal::backdrop, .bk-drawer::backdrop { background: rgba(4,8,10,.66); animation: fadeIn .16s ease; }
.bk-modal.is-closing::backdrop, .bk-drawer.is-closing::backdrop { animation: fadeOut .14s ease forwards; }

.bk-modal { width: min(1060px, calc(100% - 32px)); margin: auto; }
.bk-modal--checkout { width: min(980px, calc(100% - 32px)); }
.bk-modal__inner {
  position: relative; max-height: calc(100dvh - 48px); overflow-y: auto;
  background: linear-gradient(160deg, #101b1e, #0b1214 60%, #0f1a14);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.9);
  padding: clamp(24px, 3.4vw, 44px);
  animation: popIn .22s var(--ease);
  scrollbar-width: thin; scrollbar-color: rgba(212,169,79,.4) transparent;
}
.bk-modal.is-closing .bk-modal__inner { animation: popOut .14s ease forwards; }
.bk-modal__close { position: absolute; top: 16px; right: 16px; z-index: 2; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes popOut { to { opacity: 0; transform: translateY(16px) scale(.98); } }

.bk-icon {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--gold-soft); cursor: pointer;
  transition: background .3s, border-color .3s;
}
.bk-icon:hover:not(:disabled) { background: rgba(212,169,79,.14); border-color: var(--gold); }
.bk-icon:disabled { opacity: .3; cursor: default; }
.bk-icon svg, .bk-stepper svg, .bk-link svg, .bk-note svg, .bk-done__icon svg, .bk-steps svg, .btn svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.btn svg { margin-right: 8px; }

.bk-h { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; margin-bottom: 20px; padding-right: 44px; }
.bk-h3 { font-family: var(--sans); font-weight: 500; font-size: 12.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin: 26px 0 12px; }
.bk-note { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.bk-note strong { color: var(--gold-soft); font-weight: 500; }
.bk-note svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; color: var(--gold); }
.bk-note--hint { margin-top: 10px; color: var(--gold-soft); }
.bk-full { width: 100%; }
.btn:disabled { opacity: .4; pointer-events: none; }

/* ---------- Ventana de reserva ---------- */
.bk-book { display: grid; grid-template-columns: 300px 1fr; gap: clamp(24px, 3vw, 44px); }
.bk-book__side { display: flex; flex-direction: column; gap: 14px; }
.bk-book__img { aspect-ratio: 4 / 3; border-radius: 14px; background: var(--earth) center / cover; border: 1px solid var(--line); }
.bk-book__meta { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.bk-book__inc { list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.bk-book__inc li { display: flex; gap: 8px; align-items: flex-start; }
.bk-book__inc svg { width: 16px; height: 16px; flex: none; margin-top: 4px; fill: none; stroke: var(--gold); stroke-width: 2; }
.bk-book__price { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(212,169,79,.18); font-family: var(--serif); font-size: 32px; color: var(--gold); }
.bk-book__price small { font-family: var(--sans); font-size: 13px; color: var(--muted); }

.bk-field { display: flex; flex-direction: column; gap: 6px; }
.bk-field > span { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.bk-field em { text-transform: none; letter-spacing: 0; color: var(--muted); font-style: normal; }
.bk-field input, .bk-field select, .bk-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(243,236,224,.22); color: var(--ivory);
  font: 400 15px/1.4 var(--sans); outline: none; color-scheme: dark;
  transition: border-color .3s, background .3s;
}
.bk-field select { cursor: pointer; }
.bk-field select option { background: var(--night); }
.bk-field input:focus, .bk-field select:focus, .bk-field textarea:focus { border-color: var(--gold); background: rgba(212,169,79,.07); }
.bk-form.was-validated :invalid { border-color: #d9826b; }

/* Calendario */
.bk-cal { background: rgba(255,255,255,.025); border: 1px solid rgba(212,169,79,.18); border-radius: 16px; padding: 16px; }
.bk-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bk-cal__head strong { font-family: var(--serif); font-weight: 500; font-size: 22px; }
.bk-cal__week, .bk-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.bk-cal__week span { text-align: center; font-size: 11px; letter-spacing: .2em; color: var(--muted); padding-bottom: 4px; }
.bk-day {
  position: relative; aspect-ratio: 1; max-height: 52px; border-radius: 12px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--ivory);
  font: 400 14px/1 var(--sans);
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.bk-day::after { content: ""; position: absolute; left: 50%; bottom: 7px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; }
.bk-day.is-ok { background: rgba(125,154,90,.12); border-color: rgba(125,154,90,.3); }
.bk-day.is-ok::after { background: #8fb36a; }
.bk-day.is-low { background: rgba(212,169,79,.1); border-color: rgba(212,169,79,.35); }
.bk-day.is-low::after { background: var(--gold); }
.bk-day.is-full { color: rgba(243,236,224,.3); text-decoration: line-through; }
.bk-day.is-full::after { background: #b0603c; }
.bk-day.is-off { color: rgba(243,236,224,.22); cursor: default; }
.bk-day:not(:disabled):hover { transform: translateY(-2px); border-color: var(--gold); }
.bk-day.is-selected { background: var(--gold); border-color: var(--gold); color: #1a140a; font-weight: 500; box-shadow: 0 8px 22px -8px rgba(212,169,79,.8); }
.bk-day.is-selected::after { background: #1a140a; }
.bk-cal__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12px; color: var(--muted); align-items: center; }
.lg { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: -10px; }
.lg--ok { background: #8fb36a; } .lg--low { background: var(--gold); } .lg--off { background: #b0603c; }

.bk-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bk-row .bk-h3 { margin-bottom: 4px; }
.bk-stepper { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 100px; border: 1px solid var(--line); }
.bk-stepper button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 0; background: rgba(212,169,79,.1); color: var(--gold-soft); cursor: pointer; transition: background .25s; }
.bk-stepper button:hover:not(:disabled) { background: rgba(212,169,79,.25); }
.bk-stepper button:disabled { opacity: .3; cursor: default; }
.bk-stepper output { min-width: 34px; text-align: center; font-family: var(--serif); font-size: 24px; }

.bk-extras { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bk-extra, .bk-check {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center;
  padding: 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(243,236,224,.14); background: rgba(255,255,255,.025);
  transition: border-color .25s, background .25s;
}
.bk-extra input, .bk-check input, .bk-pay__opt input { position: absolute; opacity: 0; pointer-events: none; }
.bk-extra__box {
  grid-row: span 2; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  border: 1px solid var(--line); transition: background .25s, border-color .25s;
}
.bk-extra__box svg { width: 14px; height: 14px; fill: none; stroke: #1a140a; stroke-width: 2.4; opacity: 0; transition: opacity .2s; }
.bk-extra__name { font-size: 14px; line-height: 1.35; }
.bk-extra__price { font-size: 13px; color: var(--gold); }
.bk-extra__price small { color: var(--muted); }
.bk-extra:hover, .bk-check:hover { border-color: rgba(212,169,79,.45); }
.bk-extra:has(input:checked) { border-color: var(--gold); background: rgba(212,169,79,.08); }
.bk-extra input:checked ~ .bk-extra__box, .bk-check input:checked ~ .bk-extra__box { background: var(--gold); border-color: var(--gold); }
.bk-extra input:checked ~ .bk-extra__box svg, .bk-check input:checked ~ .bk-extra__box svg { opacity: 1; }
.bk-extra:has(input:focus-visible), .bk-check:has(input:focus-visible), .bk-pay__opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.bk-check { grid-template-columns: auto 1fr; font-size: 14px; color: var(--muted); margin: 18px 0; }
.bk-check .bk-extra__box { grid-row: auto; }

.bk-book__foot {
  --pad: clamp(24px, 3.4vw, 44px);
  position: sticky; bottom: calc(-1 * var(--pad)); z-index: 1;
  margin: 28px 0 calc(-1 * var(--pad));
  padding: 18px 0 var(--pad);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  background: #0b1214;
  border-top: 1px solid rgba(212,169,79,.18);
  box-shadow: 0 -24px 24px -8px #0b1214;
}
.bk-book__foot .bk-note--hint { flex-basis: 100%; margin: 0; }
.bk-total small { display: block; font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.bk-total strong { font-family: var(--serif); font-weight: 500; font-size: 36px; color: var(--gold); line-height: 1; }
.bk-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bk-actions--split { justify-content: space-between; margin-top: 6px; }
.bk-actions--center { justify-content: center; margin: 26px 0 10px; }

/* ---------- Carrito lateral ---------- */
.bk-drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; height: 100dvh; width: min(440px, 100%);
  display: none; flex-direction: column;
  background: linear-gradient(180deg, #0f1a1c, #0a1113);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 80px -20px rgba(0,0,0,.8);
  animation: slideIn .26s var(--ease);
}
.bk-drawer[open] { display: flex; }
.bk-drawer.is-closing { animation: slideOut .14s ease forwards; }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes slideOut { to { transform: translateX(100%); } }
.bk-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 26px 26px 18px; border-bottom: 1px solid rgba(212,169,79,.18); }
.bk-drawer__head h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; }
.bk-drawer__body { flex: 1; overflow-y: auto; padding: 10px 26px; scrollbar-width: thin; scrollbar-color: rgba(212,169,79,.4) transparent; }
.bk-drawer__foot { padding: 20px 26px 26px; border-top: 1px solid rgba(212,169,79,.18); display: grid; gap: 10px; }
.bk-drawer__foot:empty { display: none; }

.bk-item { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid rgba(243,236,224,.08); animation: popIn .35s var(--ease); }
.bk-item__img { width: 74px; height: 74px; border-radius: 12px; background: var(--earth) center / cover; border: 1px solid var(--line); }
.bk-item h3 { font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.2; margin-bottom: 4px; }
.bk-item p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.bk-item__extras { color: var(--gold-soft) !important; }
.bk-item__row { display: flex; gap: 16px; margin-top: 8px; }
.bk-item__total { font-family: var(--serif); font-weight: 500; font-size: 20px; color: var(--gold); }
.bk-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 500 11.5px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
}
.bk-link svg { width: 14px; height: 14px; }
.bk-link--muted { color: var(--muted); }
.bk-link:hover { color: var(--gold-soft); }
.bk-drawer__foot .bk-link { padding: 8px; }
.bk-sum { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.bk-sum--total { font-size: 15px; color: var(--ivory); padding-top: 10px; border-top: 1px solid rgba(243,236,224,.08); margin-top: 4px; }
.bk-sum--total strong { font-family: var(--serif); font-weight: 500; font-size: 28px; color: var(--gold); }

.bk-empty { text-align: center; padding: 70px 10px; color: var(--muted); }
.bk-empty svg { width: 70px; height: 70px; margin: 0 auto 18px; fill: none; stroke: var(--gold); stroke-width: 1.3; opacity: .7; }
.bk-empty p { margin-bottom: 22px; }

/* ---------- Checkout ---------- */
.bk-steps { list-style: none; display: flex; gap: 8px; margin-bottom: 28px; counter-reset: s; }
.bk-steps li { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; border-bottom: 2px solid rgba(243,236,224,.1); }
.bk-steps li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1px solid rgba(243,236,224,.25); font-size: 12px; letter-spacing: 0; }
.bk-steps li.is-current { color: var(--gold-soft); border-color: var(--gold); }
.bk-steps li.is-current span { border-color: var(--gold); color: var(--gold); }
.bk-steps li.is-done { color: var(--ivory); border-color: rgba(212,169,79,.5); }
.bk-steps li.is-done span { background: var(--gold); border-color: var(--gold); color: #1a140a; }
.bk-steps li.is-done svg { width: 14px; height: 14px; stroke-width: 2.6; }

.bk-co { display: grid; grid-template-columns: 1fr 320px; gap: 34px; align-items: start; }
.bk-form { display: grid; gap: 16px; }
.bk-form__2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bk-co__sum { padding: 22px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(212,169,79,.2); position: sticky; top: 0; }
.bk-co__sum .bk-h3 { margin-top: 0; }
.bk-co__line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(243,236,224,.07); font-size: 14px; }
.bk-co__line strong { display: block; font-weight: 400; color: var(--ivory); }
.bk-co__line small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.bk-co__line > span { color: var(--gold-soft); white-space: nowrap; }

.bk-pay { display: grid; gap: 10px; }
.bk-pay__opt {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(243,236,224,.14); background: rgba(255,255,255,.025); transition: border-color .25s, background .25s;
}
.bk-pay__opt strong { display: block; font-weight: 400; font-size: 15px; }
.bk-pay__opt small { display: block; font-size: 12.5px; color: var(--muted); }
.bk-pay__dot { width: 20px; height: 20px; border-radius: 50%; flex: none; border: 1px solid var(--line); position: relative; }
.bk-pay__dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--gold); transform: scale(0); transition: transform .25s var(--ease); }
.bk-pay__opt:has(input:checked) { border-color: var(--gold); background: rgba(212,169,79,.08); }
.bk-pay__opt input:checked + .bk-pay__dot { border-color: var(--gold); }
.bk-pay__opt input:checked + .bk-pay__dot::after { transform: scale(1); }

.bk-done { text-align: center; padding: 10px 0 30px; }
.bk-done__icon { width: 78px; height: 78px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1a140a; box-shadow: 0 0 0 10px rgba(212,169,79,.15); animation: popIn .5s var(--ease); }
.bk-done__icon svg { width: 36px; height: 36px; stroke-width: 2.4; }
.bk-done .bk-h { padding: 0; margin-bottom: 8px; }
.bk-done > p { color: var(--muted); }
.bk-done__code { font-family: var(--serif); font-size: 38px; letter-spacing: .12em; color: var(--gold) !important; margin: 4px 0 14px; }
.bk-done .bk-note { max-width: 520px; margin: 0 auto; }
#bkCoBody > .bk-co__sum { max-width: 520px; margin: 10px auto 0; position: static; }

/* ---------- Aviso flotante ---------- */
.bk-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100;
  display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 100px;
  background: rgba(16,27,30,.96); border: 1px solid var(--gold); color: var(--ivory); font-size: 14px;
  box-shadow: 0 20px 50px -15px rgba(0,0,0,.8);
  opacity: 0; transform: translate(-50%, 20px); pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.bk-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.bk-toast svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 2.2; }

/* ---------- Responsive ---------- */
@media (max-width: 1399px) {
  .nav__tools { margin-left: auto; gap: 14px; }
}
@media (max-width: 860px) {
  .bk-book, .bk-co { grid-template-columns: 1fr; }
  .bk-book__side { display: grid; grid-template-columns: 120px 1fr; gap: 12px 16px; align-items: start; }
  .bk-book__img { grid-row: span 3; aspect-ratio: 1; }
  .bk-book__inc, .bk-book__price { grid-column: 1 / -1; }
  .bk-book__inc { grid-template-columns: 1fr 1fr; }
  .bk-co__sum { position: static; order: -1; }
}
@media (max-width: 560px) {
  .bk-modal, .bk-modal--checkout { width: 100%; margin: auto 0 0; }
  .bk-modal__inner { border-radius: 22px 22px 0 0; max-height: 92dvh; padding: 22px 16px; }
  .bk-book__foot { --pad: 22px; }
  .bk-book__inc { grid-template-columns: 1fr; }
  .bk-extras, .bk-form__2 { grid-template-columns: 1fr; }
  .bk-actions { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .bk-actions .btn { flex: 1; padding: 13px 8px; font-size: 10.5px; letter-spacing: .08em; white-space: normal; }
  .bk-book__foot { gap: 10px; padding-top: 12px; margin-top: 18px; }
  .bk-total { display: flex; align-items: baseline; justify-content: space-between; width: 100%; }
  .bk-total strong { font-size: 28px; }
  .bk-book__foot .bk-note--hint { font-size: 12px; }
  .bk-steps li { font-size: 0; gap: 0; justify-content: center; }
  .bk-cal { padding: 10px; }
  .bk-cal__grid, .bk-cal__week { gap: 4px; }
  .cart-btn { width: 42px; height: 42px; }
}
