:root {
  --airbus-blue: #00205b;
  --airbus-blue-2: #005192;
  --airbus-sky: #00a1e0;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1a2233;
  --muted: #5b6472;
  --border: #e3e8ee;
  --danger: #e0143c;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }

/* ---------- LOGIN ---------- */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #00205b 0%, #005192 60%, #00a1e0 130%);
  padding: 20px;
}
.login-card {
  background: var(--card);
  border-radius: 16px;
  padding: 44px 40px 36px;
  width: 100%; max-width: 380px;
  box-shadow: 0 24px 60px rgba(0, 32, 91, .45);
  text-align: center;
}
.login-logo {
  display: flex; justify-content: center;
}
.login-logo-img {
  height: 46px; border-radius: 6px;
}
.login-sub {
  color: var(--muted); margin: 6px 0 28px; font-size: 14px;
}
.field { display: block; text-align: left; margin-bottom: 16px; }
.field span {
  display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--airbus-blue-2); }
.login-error {
  background: #fdecef; color: var(--danger);
  border-radius: 8px; padding: 10px; font-size: 13px; margin-bottom: 14px;
}

/* ---------- BUTTONS ---------- */
.btn {
  border: none; border-radius: 10px; font-weight: 600;
  padding: 12px 20px; transition: background .15s, transform .05s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--airbus-blue-2); color: #fff; }
.btn-primary:hover { background: var(--airbus-blue); }
.btn-outline {
  background: transparent; color: var(--airbus-blue);
  border: 1.5px solid var(--airbus-blue-2);
}
.btn-outline:hover { background: #eaf2f9; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- TOPBAR ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--airbus-blue);
  border-bottom: 1px solid rgba(255,255,255,.18);
  display: flex; align-items: center; gap: 18px;
  padding: 12px 24px;
}
.logo-btn { background: none; border: none; }
.logo {
  font-size: 24px; font-weight: 800; letter-spacing: 4px;
  color: #fff;
  white-space: nowrap;
}
.logo-img { height: 28px; display: block; }
.topbar-center { display: flex; gap: 4px; flex: 1; justify-content: center; }
.tab-btn {
  background: none; border: none; color: rgba(255,255,255,.78);
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.tab-btn.active { background: #fff; color: var(--airbus-blue); }
.badge {
  background: var(--danger); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 999px;
}
.badge.hidden { display: none; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-right .btn-seleccion { display: block; width: 100%; margin-top: 6px; }
.topbar-right-col { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.greeting {
  color: var(--airbus-blue); font-size: 14px; font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 900px) { .greeting { display: none; } }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; }
  .topbar-center { order: 3; width: 100%; justify-content: flex-start; }
}

/* ---------- FILTERS ---------- */
.filters {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  position: sticky; top: 61px; z-index: 999;
}
.filters-inner { display: flex; gap: 10px; align-items: center; max-width: 1280px; margin: 0 auto; flex-wrap: wrap; }
.input {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  background: #fff; outline: none;
}
.input:focus { border-color: var(--airbus-blue-2); }
#filter-search { flex: 1; min-width: 180px; }
.select { max-width: 220px; cursor: pointer; }
.results-count { color: var(--muted); font-size: 13px; margin-left: auto; }

/* ---------- GRID / CARDS ---------- */
.view { max-width: 1280px; margin: 0 auto; padding: 24px; min-height: 60vh; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow .18s, transform .18s;
  display: flex; flex-direction: column;
}
.card:hover {
  box-shadow: 0 12px 32px rgba(0, 32, 91, .14);
  transform: translateY(-3px);
}
.card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;         /* Booking style 300x300 */
  background: #dde3ea;
  overflow: hidden;
}
.card-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.card-photo .dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 5px;
}
.card-photo .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.55);
}
.card-photo .dot.on { background: #fff; }
.heart-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.92);
  border: none; border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
  transition: transform .1s;
}
.heart-btn:hover { transform: scale(1.12); }
.heart-btn svg { width: 19px; height: 19px; }
.heart-btn .heart-path { fill: none; stroke: #262626; stroke-width: 2.2; }
.heart-btn.faved { background: #fff; }
.heart-btn.faved .heart-path { fill: var(--danger); stroke: var(--danger); }
.guest-fav-chip {
  position: absolute; top: 12px; left: 12px;
  background: #fff; border-radius: 8px;
  font-size: 11px; font-weight: 700; color: #222;
  padding: 4px 8px; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-weight: 700; font-size: 15px; line-height: 1.35; }
.card-city { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card-meta { color: var(--muted); font-size: 13px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 12px;
}
.score-badge {
  background: var(--airbus-blue-2); color: #fff;
  font-weight: 700; font-size: 13px;
  padding: 4px 8px; border-radius: 8px;
}
.score-new { background: #0e8a44; }
.card-reviews { font-size: 12.5px; color: var(--muted); }
.capacity-chip {
  font-size: 12px; color: var(--airbus-blue);
  background: #eaf2f9; border-radius: 999px; padding: 2px 9px;
}
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }

/* ---------- MAP VIEW ---------- */
.global-map {
  height: calc(100vh - 200px);
  min-height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* ---------- DETAIL ---------- */
.detail-wrap { padding-bottom: 40px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--airbus-blue-2);
  font-weight: 600; font-size: 14px; padding: 6px 0; margin-bottom: 14px;
}
.back-btn:hover { text-decoration: underline; }
.detail-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-title { font-size: 26px; font-weight: 800; line-height: 1.25; flex: 1; min-width: 220px; }
.detail-sub { color: var(--muted); font-size: 15px; margin: 2px 0 10px; }
.detail-head-right { display: flex; align-items: center; gap: 14px; }
.detail-head-right .heart-btn { position: static; width: 44px; height: 44px; }
.detail-head-right .heart-btn svg { width: 22px; height: 22px; }
.detail-rating { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; }
.detail-rating .score-badge { font-size: 15px; padding: 5px 10px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 170px;
  gap: 8px;
  margin: 18px 0 26px;
}
.gallery img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
  cursor: zoom-in; background: #dde3ea;
}
.gallery img:first-child {
  grid-column: span 2; grid-row: span 2;
}
.gallery .more-overlay {
  position: relative; cursor: pointer;
}
.gallery .more-overlay img { filter: brightness(.65); }
.gallery .more-overlay span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
}
@media (max-width: 800px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.detail-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 900px) { .detail-cols { grid-template-columns: 1fr; } }
.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 20px;
}
.panel h2 { font-size: 18px; margin-bottom: 14px; color: var(--airbus-blue); }
.panel p.line { color: var(--muted); font-size: 13.5px; margin-bottom: 6px; }
.desc-text { white-space: pre-line; font-size: 14.5px; line-height: 1.65; }
.quick-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.fact { display: flex; align-items: center; gap: 10px; font-size: 14px; background: #f2f6fa; border-radius: 10px; padding: 10px 12px; }
.fact .ico { font-size: 18px; }
.fact b { font-weight: 700; }
.amenities-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 20px; }
@media (max-width: 640px) { .amenities-grid { grid-template-columns: 1fr; } }
.amenity { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 4px 0; color: #2c3450; }
.amenity .am-ico { width: 20px; text-align: center; }
.detail-map { height: 320px; border-radius: 10px; overflow: hidden; margin-top: 4px; }
.map-hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.airbnb-link {
  display: inline-block; margin-top: 12px; color: var(--airbus-blue-2);
  font-weight: 600; font-size: 14px;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(4, 12, 26, .93);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 78vh; border-radius: 10px; object-fit: contain; }
.lightbox .lb-cap { color: #cfd8e3; margin-top: 12px; font-size: 14px; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255,255,255,.12); color: #fff;
  border: none; border-radius: 50%; width: 46px; height: 46px; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; }
.lb-next { right: 14px; top: 50%; }
.lb-counter { color: #cfd8e3; margin-top: 8px; font-size: 13px; }

/* ---------- FOOTER ---------- */

/* ============ SELECCIÓN DE APARTAMENTOS ============ */
.tab-seleccion.active {
  background: #00205b;
  color: #fff;
  border-color: #00205b;
}
.sel-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; }
.sel-title { font-size: 26px; font-weight: 800; color: #10264a; margin: 0 0 6px; }
.sel-sub { color: #5b6472; margin: 0 0 22px; line-height: 1.5; }
.sel-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.sel-count { color: #5b6472; font-size: 13px; margin: 8px 2px 12px; }
.sel-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.sel-card {
  display: grid;
  grid-template-columns: 86px 1fr 34px 30px;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 2px solid #e3e8ef;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.sel-card:hover { border-color: #7aa5d8; box-shadow: 0 2px 10px rgba(0,32,91,.08); transform: translateY(-1px); }
.sel-card-on { border-color: #00205b; background: #f4f8fd; }
.sel-card img { width: 86px; height: 64px; object-fit: cover; border-radius: 8px; }
.sel-card-body { overflow: hidden; }
.sel-card-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-card-city { color: #5b6472; font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-pick {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #eef3f9; color: #00205b; font-weight: 800; font-size: 15px;
  border: 1.5px solid #d4e0ee;
}
.sel-card-on .sel-pick { background: #00205b; color: #fff; border-color: #00205b; }
.sel-q {
  display: block; width: 100%; margin-top: 5px;
  font: inherit; font-size: 12.5px; color: var(--text);
  background: #fff; border: 1px solid #c9d4e4; border-radius: 6px;
  padding: 3px 6px; cursor: pointer;
}
.sel-q:focus { outline: none; border-color: #00205b; }
.sel-q-bad { border-color: var(--danger); background: #fdeef1; }
.sel-open {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid #d9e1ea;
  background: #fff; color: #36547d; cursor: pointer; font-size: 14px;
}
.sel-open:hover { background: #eaf2f9; }
.sel-panel {
  background: #fff; border: 1px solid #e3e8ef; border-radius: 14px;
  padding: 18px; position: sticky; top: 90px; box-shadow: 0 2px 14px rgba(0,32,91,.06);
}
.sel-panel-title { font-size: 17px; font-weight: 800; color: #10264a; margin: 0 0 12px; }
.sel-chosen { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sel-item {
  display: flex; align-items: center; gap: 10px;
  background: #f4f8fd; border: 1px solid #dbe5f1; border-radius: 10px; padding: 8px 10px;
}
.sel-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: #00205b; color: #fff; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.sel-item-name { flex: 1; font-size: 13.5px; font-weight: 700; color: #10264a; overflow: hidden; }
.sel-item-name small { display: block; font-weight: 400; color: #5b6472; font-size: 12px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-item-btns { display: flex; gap: 4px; }
.sel-move {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid #d9e1ea;
  background: #fff; cursor: pointer; font-size: 13px; color: #36547d; padding: 0;
}
.sel-move:hover:not(:disabled) { background: #eaf2f9; }
.sel-move:disabled { opacity: .35; cursor: default; }
.sel-del:hover { background: #fdecec; color: #b42323; border-color: #f2c1c1; }
.sel-empty { color: #5b6472; font-size: 13.5px; line-height: 1.5; padding: 10px 2px; }
.sel-full { background: #fff7e0; border: 1px solid #f0dda1; color: #7a5d00; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.sel-actions { display: flex; gap: 8px; margin-top: 4px; }
.sel-actions .btn-primary { flex: 1; }
.sel-sent { margin-top: 14px; background: #e9f7ee; border: 1px solid #bfe6cd; border-radius: 10px; padding: 12px; }
.sel-sent p { margin: 0 0 6px; font-size: 14px; color: #1d6b3a; }
.sel-sent-sub { font-size: 12.5px; color: #456; font-weight: 400; line-height: 1.5; }
.sel-sent .btn { margin-top: 8px; }
@media (max-width: 900px) {
  .sel-layout { grid-template-columns: 1fr; }
  .sel-panel { position: static; }
}

/* cabecera azul: botones */
.topbar .btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.65);
  color: #fff;
}
.topbar .btn-outline:hover { background: rgba(255,255,255,.18); }
.topbar .tab-seleccion.active { background: #fff; color: var(--airbus-blue); border-color: #fff; }
.topbar .greeting { color: rgba(255,255,255,.88); }

/* flechas del carrusel en tarjetas */
.cnav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  border: none; cursor: pointer; padding: 0;
  background: rgba(255,255,255,.94); color: #16233a;
  font-size: 17px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
  box-shadow: 0 1px 5px rgba(0,0,0,.28);
  z-index: 6;
}
.cnav:hover { background: #fff; }
.cnav-l { left: 8px; }
.cnav-r { right: 8px; }
.card-photo:hover .cnav { opacity: 1; }
