/* Inicio: portada con video, barra de búsqueda tipo píldora y tarjetas con carrusel. */

/* ── Portada ── */
.portada { position: relative; isolation: isolate; height: clamp(360px, 52vh, 500px); overflow: hidden;
  /* --portada-img: opcional en cliente.json (colores), p. ej. "url(/assets/img/portada.webp)" con ruta absoluta */
  background: var(--portada-img, none) center / cover no-repeat var(--surface); }

.portada__velo { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgb(0 0 0 / .5) 0%, rgb(0 0 0 / .3) 45%, color-mix(in srgb, var(--bg) 70%, transparent) 78%, var(--bg) 100%); }
.portada__txt { position: absolute; left: 0; right: 0; bottom: 84px; padding: 0 20px; text-align: center; animation: subir 1.2s .2s var(--ease) both; }
.portada h1 { font-size: clamp(30px, 4vw, 54px); max-width: 28ch; margin-inline: auto; line-height: 1.08; text-wrap: balance; text-shadow: 0 4px 30px rgb(0 0 0 / .35); }
.portada h1 em { color: var(--acento, var(--blue)); }
.portada__marca { display: block; margin-bottom: 16px; font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--acento, var(--ink)); }
@keyframes subir { from { opacity: 0; transform: translateY(24px); } }

/* ── Barra de búsqueda ── */
.buscar { position: relative; z-index: 5; width: min(880px, 100% - 32px); margin: -40px auto 0; }
.barra { position: relative; display: flex; align-items: center; padding: 8px; background: var(--surface); border-radius: 999px; border: 1px solid var(--line);
  box-shadow: 0 22px 55px -14px color-mix(in srgb, var(--ink) 32%, transparent), 0 2px 8px color-mix(in srgb, var(--ink) 6%, transparent); transition: background .2s; }
.barra--activa { background: #ece8e2; }
.barra__campo { position: relative; flex: 1 1 0; min-width: 0; min-height: 60px; padding: 8px 24px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  border: 0; border-radius: 999px; background: none; text-align: left; cursor: pointer; transition: background .2s, box-shadow .2s; }
.barra__campo:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.barra__campo.activo { background: var(--surface); box-shadow: var(--shadow-sm); }
.barra__campo + .barra__campo::before { content: ""; position: absolute; left: 0; top: 25%; bottom: 25%; width: 1px; background: var(--line); }
.barra__campo:hover::before, .barra__campo:hover + .barra__campo::before,
.barra__campo.activo::before, .barra__campo.activo + .barra__campo::before { opacity: 0; }
.barra__k { font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.barra__v { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: var(--muted); }
.barra__btn { flex: none; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 26px 0 22px; border: 0; border-radius: 999px;
  background: var(--blue); color: var(--on-accent); font-weight: 700; font-size: 15px; cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.barra__btn:hover { background: var(--blue-dark); }
.barra__btn:active { transform: scale(.97); }
.barra__btn svg { stroke-width: 2.4; }

.pop { position: absolute; top: calc(100% + 12px); z-index: 30; padding: 22px 26px; background: var(--surface); border-radius: 28px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.pop { scroll-margin-top: 84px; }
.pop--fechas { left: 0; width: min(720px, 100%); }
.pop--huespedes { right: 0; width: min(380px, 100%); }
.pop__tit { margin-bottom: 6px; font-weight: 700; }
.pop__pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.pop__nota { margin-top: 12px; font-size: 13px; }
.contador { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contador__k { font-weight: 700; }
.contador .muted { font-size: 14px; }
.contador__ctl { display: flex; align-items: center; gap: 12px; }
.contador__ctl button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); font-size: 20px; line-height: 1; cursor: pointer; }
.contador__ctl button:hover:not([disabled]) { border-color: var(--ink); }
.contador__ctl button[disabled] { opacity: .3; cursor: not-allowed; }
.contador output { min-width: 20px; text-align: center; font-weight: 700; }

/* ── Secciones ── */
.sec { padding-top: clamp(56px, 8vw, 96px); }
.sec__cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; }
.sec__cab .eyebrow { margin-bottom: 10px; }
.sec__cab .muted { margin-top: 10px; }
.sec__nota { font-size: 13px; color: var(--muted); }
.resultado { min-height: 1.6em; margin: -6px 0 20px; font-weight: 600; }

/* ── Tarjetas con carrusel ── */
.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 36px 24px; }
.tarjetas--3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.hab { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hab--carga { aspect-ratio: 1 / 1.4; border-radius: 18px; background: linear-gradient(90deg, #e8e3db 25%, #f3efe9 50%, #e8e3db 75%); background-size: 200% 100%; animation: brillo 1.3s linear infinite; }
@keyframes brillo { to { background-position: -200% 0; } }

.carrusel { position: relative; aspect-ratio: 20 / 19; border-radius: 18px; overflow: hidden; background: #ddd6cc; }
.tarjetas--3 .carrusel { aspect-ratio: 4 / 3; }
.carrusel:has(.carrusel__pista:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.carrusel__pista { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: pointer; outline: none; }
.carrusel__pista::-webkit-scrollbar { display: none; }
.carrusel__pista img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; user-select: none; }
.carrusel__f { position: absolute; top: 50%; z-index: 2; translate: 0 -50%; width: 44px; height: 44px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink); box-shadow: 0 4px 14px rgb(0 0 0 / .18); cursor: pointer;
  opacity: 0; transition: opacity .2s, transform .2s var(--ease); }
.carrusel__f svg { width: 16px; height: 16px; stroke-width: 2.4; }
.carrusel__f--a { left: 10px; }
.carrusel__f--s { right: 10px; }
.carrusel__f:hover { transform: scale(1.06); }
.hab:hover .carrusel__f, .carrusel__f:focus-visible { opacity: 1; }
.carrusel__f[disabled] { visibility: hidden; }
@media (hover: none) { .carrusel__f { display: none; } }
.carrusel__puntos { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.carrusel__puntos span { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 60%, transparent); transition: background .2s, transform .2s; }
.carrusel__puntos span.on { background: var(--surface); transform: scale(1.25); }

.corazon { position: absolute; top: 8px; right: 8px; z-index: 3; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.corazon svg { width: 26px; height: 26px; fill: rgb(0 0 0 / .45); stroke: #fff; stroke-width: 2.2; transition: transform .2s var(--ease), fill .2s; }
.corazon:hover svg { transform: scale(1.1); }
.corazon[aria-pressed="true"] svg { fill: #e0435b; }
.corazon[disabled] { cursor: wait; }

.hab__info { display: grid; gap: 2px; color: var(--ink); text-decoration: none; font-size: 15px; }
.hab__info h3 { font-size: 16px; }
a.hab__info:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.hab__info .muted { font-size: 14px; }
.hab__precio { margin-top: 4px; }
.hab__total { font-size: 14px; color: var(--muted); }


.resumen-busqueda { display: none; }

/* ── Celular ── */
@media (max-width: 980px) {
  .barra__campo { padding: 8px 16px; }
  .barra__btn { width: 60px; padding: 0; justify-content: center; }
  .barra__btn span { display: none; }
}
@media (max-width: 760px) {
  .portada__txt { bottom: 64px; }
  .barra { flex-direction: column; align-items: stretch; padding: 10px; border-radius: 26px; }
  .barra__campo { flex: none; min-height: 60px; padding: 10px 16px; border-radius: 16px; }
  .barra__campo + .barra__campo::before { left: 16px; right: 16px; top: 0; bottom: auto; width: auto; height: 1px; }
  .barra__btn { width: auto; height: 54px; margin-top: 8px; justify-content: center; }
  .barra__btn span { display: inline; }
  .con-pop .whats { display: none; }
  .busqueda-hecha .portada, .busqueda-hecha .buscar { display: none; }
  .busqueda-hecha .resumen-busqueda { display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 16px auto 0; padding: 12px 14px 12px 18px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); text-align: left; cursor: pointer; }
  .resumen-busqueda svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
  .rb__txt { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
  .rb__txt strong { font-size: 15px; }
  .rb__txt small { font-size: 13px; color: var(--muted); }
  .rb__cambiar { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--bg); font-size: 14px; font-weight: 700; text-decoration: underline; }
  .busqueda-hecha #habitaciones { padding-top: 20px; }
  .pop, .pop--fechas, .pop--huespedes { left: 0; right: 0; width: auto; padding: 18px 14px; border-radius: 22px; }
}
