:root {
  /* Colores de la marca Yanuncay */
  --bg: #f6f5f4;
  --card: #ffffff;
  --text: #1a1413;
  --muted: #6e6664;
  --line: #e8e5e3;
  --primary: #7f2420;
  --primary-dark: #4a1210;
  --primary-soft: #f5e6e4;
  --naranja: #c7690c;
  --dorado: #d4a63a;
  --venta: #7f2420;
  --renta: #c7690c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(40,10,8,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--primary);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo .icono { height: 40px; width: 40px; }
.logo .nombre { height: 76px; width: auto; margin: -14px 0; } /* la imagen trae margen transparente */
.topbar .btn-ghost { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.topbar .btn-ghost:hover { background: #fff; color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 600; text-decoration: none; transition: .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* Portada */
.hero {
  padding: 40px 0 60px; text-align: center; color: #fff;
  background: linear-gradient(160deg, #8c2a25 0%, var(--primary-dark) 100%);
}
.hero-icono { width: 72px; height: 72px; margin: 0 auto 14px; }
.hero h1 {
  margin: 0 0 8px; font-family: "Marcellus", serif; font-weight: 400;
  font-size: clamp(1.8rem, 4.2vw, 2.8rem); color: #fff; letter-spacing: .01em;
}
.hero p { margin: 0 0 24px; color: rgba(255,255,255,.75); }
.tabs { display: inline-flex; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 4px; }
.hero .tab { color: rgba(255,255,255,.85); }
.hero .tab.active { background: #fff; color: var(--primary); font-weight: 600; }
main.wrap { margin-top: -30px; position: relative; }
.tab {
  border: 0; background: none; padding: 8px 20px; border-radius: 999px;
  cursor: pointer; font-weight: 500; color: var(--muted);
}
.tab.active { background: var(--primary); color: #fff; }

/* Filtros */
/* Celular primero: buscador arriba; tipo, ciudad y "Filtros" debajo */
.filtros {
  background: #fff; padding: 12px; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  position: sticky; top: 64px; z-index: 5;
  max-height: calc(100vh - 72px); overflow-y: auto;
}
.barra { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.buscador { grid-column: 1 / -1; position: relative; display: block; }
.buscador svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filtros .buscador input { padding-left: 42px; }

/* Panel de filtros */
.panel { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 14px; display: grid; gap: 16px; }
.panel[hidden] { display: none; }
.grupo-titulo { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.chips-sel { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-sel button {
  min-height: 42px; min-width: 52px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; font-weight: 500;
}
.chips-sel button.sel { background: var(--primary); border-color: var(--primary); color: #fff; }
.rango { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.panel-acciones { display: flex; gap: 8px; }
.panel-acciones .btn { flex: 1; padding: 13px; }
.filtros input, .filtros select {
  width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; min-width: 0;
  font-size: 16px; /* evita que el iPhone haga zoom al escribir */
}
.btn-filtros {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  height: 46px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; font-weight: 600;
}
.btn-filtros[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); }
.num-filtros {
  background: var(--primary); color: #fff; border-radius: 999px;
  min-width: 20px; height: 20px; font-size: .75rem; display: inline-grid; place-items: center;
}
.num-filtros[hidden] { display: none; }
.filtros input:focus, .filtros select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.contador { color: var(--muted); margin: 20px 0 12px; font-size: .95rem; }

/* Tarjetas */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); padding-bottom: 48px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); cursor: pointer; transition: .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(40,10,8,.14); }
.card-img img { transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img { overflow: hidden; }
.card-img { position: relative; aspect-ratio: 3/2; background: #eee; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: .04em;
}
.badge.venta { background: var(--venta); }
.badge.renta { background: var(--renta); }
.badge.no-disp { left: auto; right: 12px; background: #333; }
.card.agotada .card-img img { filter: grayscale(.7); opacity: .8; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.precio { font-size: 1.35rem; font-weight: 700; }
.precio small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.card h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.ubic { color: var(--muted); font-size: .9rem; margin: 0; }
.specs { display: flex; gap: 14px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.specs b { color: var(--text); font-weight: 600; }

.vacio { text-align: center; color: var(--muted); padding: 40px 0 80px; }
.link { background: none; border: 0; color: var(--primary); text-decoration: underline; cursor: pointer; }

/* Detalle */
dialog {
  width: min(920px, calc(100% - 24px)); max-height: calc(100% - 24px);
  padding: 0; border: 0; border-radius: 18px; overflow: auto;
}
dialog::backdrop { background: rgba(0,0,0,.55); }
.cerrar {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.95); font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.galeria { position: relative; background: #111; aspect-ratio: 16/9; }
.galeria img { width: 100%; height: 100%; object-fit: cover; }
.nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.prev { left: 12px; } .next { right: 12px; }
.foto-num { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 10px; border-radius: 999px; font-size: .8rem; }
.det-body { padding: 24px; }
.det-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.det-head h2 { margin: 0 0 4px; font-size: 1.5rem; }
.det-head .badge { position: static; display: inline-block; margin-bottom: 8px; }
.det-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 20px 0; }
.det-specs div { background: var(--bg); border-radius: 10px; padding: 12px; text-align: center; }
.det-specs b { display: block; font-size: 1.15rem; }
.det-specs span { font-size: .8rem; color: var(--muted); }
.avisos { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.aviso { padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.aviso.si { background: #e3f1e5; color: #276235; }
.aviso.no { background: var(--primary-soft); color: var(--primary); }
.det-precio { display: grid; gap: 6px; }
.det-titulo { margin: 22px 0 12px; font-size: 1.05rem; }
/* 2 columnas también en celular: tarjetitas con el emoji arriba y el texto abajo */
.detalles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.detalles li {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5px;
  background: var(--bg); border-radius: 12px; padding: 9px 4px 8px; text-align: center;
  font-weight: 500; font-size: .7rem; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto;
}
.detalles .ico {
  flex-shrink: 0; width: 34px; height: 34px; display: grid; place-items: center;
  background: #fff; border-radius: 50%; font-size: 1.1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
@media (min-width: 640px) {
  .detalles { gap: 10px; }
  .detalles li { font-size: .85rem; padding: 14px 10px; gap: 8px; }
  .detalles .ico { width: 42px; height: 42px; font-size: 1.3rem; }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chips li { background: var(--primary-soft); color: var(--primary); padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 500; }
.det-acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* Pie */
.footer { background: var(--primary-dark); padding: 32px 0 90px; color: rgba(255,255,255,.7); font-size: .9rem; text-align: center; }
.footer img { height: 70px; width: auto; margin: 0 auto 10px; }
.footer a { color: #fff; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 20;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

/* ---------- Teléfonos ---------- */
@media (max-width: 640px) {
  .topbar-inner { height: 56px; }
  .filtros { top: 56px; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .hero { padding: 22px 0 22px; }
  .hero-icono { width: 60px; height: 60px; margin-bottom: 10px; }
  main.wrap { margin-top: 0; }
  .logo .icono { height: 32px; width: 32px; }
  .logo .nombre { height: 68px; margin: -14px 0; }
  .topbar .btn-ghost { padding: 8px 14px; font-size: .9rem; }
  .hero p { margin-bottom: 16px; font-size: .95rem; }
  .tabs { display: flex; width: 100%; }
  .tab { flex: 1; padding: 10px 0; }
  /* 2 propiedades por fila en el celular */
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card:hover { transform: none; }
  .card-img { aspect-ratio: 4/3; }
  .card-body { padding: 10px 10px 12px; gap: 4px; }
  .precio { font-size: 1.05rem; }
  .precio small { font-size: .72rem; }
  .card h3 { font-size: .86rem; line-height: 1.25; }
  .ubic { font-size: .76rem; line-height: 1.3; }
  .specs { gap: 4px 10px; font-size: .76rem; padding-top: 8px; }
  .aviso { padding: 2px 7px; font-size: .64rem; }
  .avisos { gap: 4px; }
  .badge { top: 8px; left: 8px; padding: 3px 8px; font-size: .62rem; }
  .badge.no-disp { left: auto; right: 8px; }
  .wa-float { width: 54px; height: 54px; right: 14px; bottom: 14px; }

  /* Detalle a pantalla completa, botón de WhatsApp siempre visible abajo */
  dialog { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .galeria { aspect-ratio: 4/3; }
  .nav { width: 36px; height: 36px; font-size: 1.4rem; }
  .det-body { padding: 18px 16px 0; }
  .det-head h2 { font-size: 1.25rem; }
  .det-specs { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .det-specs div { padding: 10px 4px; }
  .det-specs b { font-size: 1rem; }
  .det-specs span { font-size: .7rem; }
  .det-acciones {
    position: sticky; bottom: 0; margin: 20px -16px 0; padding: 12px 16px;
    background: #fff; border-top: 1px solid var(--line);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .det-acciones .btn { flex: 1; padding: 14px 10px; }
}

/* ---------- Tabletas y computadoras ---------- */
@media (min-width: 900px) {
  .filtros { position: static; max-height: none; overflow: visible; }
  .barra { grid-template-columns: 3fr 1fr auto; }
  .buscador { grid-column: auto; }
  .panel { display: flex; flex-wrap: wrap; gap: 20px 40px; }
  .panel[hidden] { display: none; }
  .chips-sel { flex-wrap: nowrap; }
  .rango input { width: 130px; }
  .panel-acciones { flex-basis: 100%; justify-content: flex-end; }
  .panel-acciones .btn { flex: 0 0 auto; padding: 10px 22px; }
}

/* =========================================================
   ESTILO MODERNO: cristal, profundidad y movimiento 3D
   ========================================================= */
:root { --ease: cubic-bezier(.2,.8,.2,1); }
html { -webkit-tap-highlight-color: transparent; }
body { background: radial-gradient(1200px 600px at 50% -200px, #efe3e1 0%, var(--bg) 60%) fixed; }

/* Barra superior de cristal */
.topbar {
  background: rgba(22, 5, 4, .95);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.1);
  transition: box-shadow .3s, background .3s;
}
.topbar.compacta { background: rgba(18, 4, 4, .92); box-shadow: 0 8px 30px rgba(30,5,4,.35); }
.topbar .btn-ghost { backdrop-filter: blur(6px); }

/* Portada con luces y logo 3D flotando */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(90% 70% at 50% 25%, #4a1411 0%, #240908 55%, #120404 100%);   /* oscuro: el dorado resalta */
  border-radius: 0 0 36px 36px; padding: 44px 0 78px;
  perspective: 900px;
}
.hero-contenido { position: relative; z-index: 2; }
.orbe { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: 0; pointer-events: none; will-change: transform; }
.o1 { width: 340px; height: 340px; background: #8c2a25; top: -140px; left: -110px; opacity: .45; animation: flotar 11s ease-in-out infinite alternate; }
.o2 { width: 300px; height: 300px; background: #6b1a17; bottom: -150px; right: -80px; opacity: .5; animation: flotar 13s ease-in-out infinite alternate-reverse; }
.o3 { display: none; }
@keyframes flotar { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(40px, 30px, 0) scale(1.15); } }

/* El logo se anima solo, sin tocarlo: una coreografía de movimientos distintos que se repite */
.escena {
  width: 110px; height: 110px; padding: 14px; margin: -6px auto 0; box-sizing: content-box;
  perspective: 700px; pointer-events: none;   /* no intercepta toques: el scroll funciona normal sobre la portada */
}
.hero-icono {
  width: 100%; height: 100%; margin: 0; object-fit: contain; transform-style: preserve-3d; will-change: transform, filter;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.45)) drop-shadow(0 0 20px rgba(212,166,58,.45));
  animation: coreografia 15s cubic-bezier(.45, .05, .25, 1) infinite, brillo 3.5s ease-in-out infinite;
}
/* Siempre la misma lista de transformaciones para que se interpolen bien; 360deg == 0deg al repetirse */
@keyframes coreografia {
  0%   { transform: translateY(0)     rotateX(0)      rotateY(0)      rotateZ(0)      scale(1); }
  8%   { transform: translateY(-12px) rotateX(0)      rotateY(0)      rotateZ(0)      scale(1.04); }   /* flota */
  20%  { transform: translateY(-14px) rotateX(0)      rotateY(360deg) rotateZ(0)      scale(1.12); }   /* vuelta de lado */
  28%  { transform: translateY(0)     rotateX(0)      rotateY(360deg) rotateZ(0)      scale(1); }
  42%  { transform: translateY(-14px) rotateX(360deg) rotateY(360deg) rotateZ(0)      scale(1.1); }    /* voltereta */
  50%  { transform: translateY(0)     rotateX(360deg) rotateY(360deg) rotateZ(0)      scale(1); }
  58%  { transform: translateY(-6px)  rotateX(360deg) rotateY(395deg) rotateZ(-12deg) scale(1.03); }   /* se balancea */
  66%  { transform: translateY(-6px)  rotateX(360deg) rotateY(325deg) rotateZ(12deg)  scale(1.03); }
  74%  { transform: translateY(0)     rotateX(360deg) rotateY(360deg) rotateZ(0)      scale(1); }
  88%  { transform: translateY(-10px) rotateX(360deg) rotateY(720deg) rotateZ(360deg) scale(1.14); }   /* vuelta doble + giro */
  100% { transform: translateY(0)     rotateX(360deg) rotateY(720deg) rotateZ(360deg) scale(1); }
}
@keyframes brillo {
  0%, 100% { filter: drop-shadow(0 10px 22px rgba(0,0,0,.45)) drop-shadow(0 0 14px rgba(212,166,58,.35)); }
  50%      { filter: drop-shadow(0 14px 26px rgba(0,0,0,.5))  drop-shadow(0 0 34px rgba(255,205,90,.85)); }
}
@keyframes giro3d {
  0%   { transform: translateY(0)    rotateY(-28deg) rotateX(6deg); }
  100% { transform: translateY(-10px) rotateY(28deg)  rotateX(-4deg); }
}
.hero h1 { color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.35); }
.hero p { color: rgba(255,255,255,.78); }
.tabs { background: rgba(255,255,255,.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.hero .tab { transition: background .3s var(--ease), color .3s, transform .2s; }
.hero .tab:active { transform: scale(.96); }
.hero .tab.active { background: linear-gradient(135deg, #fff, #f6e7c2); box-shadow: 0 4px 14px rgba(0,0,0,.25); }

/* Buscador flotante de cristal */
.filtros {
  background: rgba(255,255,255,.78);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(255,255,255,.7); border-radius: 22px;
  box-shadow: 0 20px 50px -12px rgba(60,14,12,.28), 0 2px 6px rgba(60,14,12,.06);
}
.filtros input, .filtros select, .btn-filtros {
  border-radius: 14px; border-color: rgba(127,36,32,.12); background: rgba(255,255,255,.85);
  transition: box-shadow .25s, border-color .25s, transform .15s;
}
.filtros input:focus, .filtros select:focus { box-shadow: 0 0 0 4px rgba(127,36,32,.12); outline: none; border-color: var(--primary); }
.btn-filtros:active { transform: scale(.97); }
.panel { animation: desplegar .35s var(--ease); }
@keyframes desplegar { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.chips-sel button { transition: transform .15s, background .25s, box-shadow .25s; }
.chips-sel button:active { transform: scale(.94); }
.chips-sel button.sel { background: linear-gradient(135deg, #9a2e28, #6b1a17); box-shadow: 0 6px 16px rgba(127,36,32,.35); }

.btn-primary { background: linear-gradient(135deg, #9a2e28, #6b1a17); box-shadow: 0 8px 22px rgba(127,36,32,.4); transition: transform .2s var(--ease), box-shadow .2s; }
.btn-primary:hover { filter: none; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(127,36,32,.5); }
.btn:active { transform: scale(.97); }

/* Tarjetas 3D */
.grid { perspective: 1200px; }
.card {
  --rx: 0deg; --ry: 0deg; --bx: 50%; --by: 50%;
  position: relative; border: 0; border-radius: 22px; background: #fff;
  box-shadow: 0 1px 2px rgba(60,14,12,.06), 0 14px 34px -14px rgba(60,14,12,.28);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  opacity: 0; translate: 0 28px;
  transition: opacity .7s var(--ease), translate .7s var(--ease), transform .25s ease-out, box-shadow .3s;
  transition-delay: calc(var(--i, 0) * 70ms), calc(var(--i, 0) * 70ms), 0s, 0s;
}
.card.visible { opacity: 1; translate: 0 0; }
.card:hover { transform: rotateX(var(--rx)) rotateY(var(--ry)) translateZ(10px); box-shadow: 0 2px 4px rgba(60,14,12,.08), 0 34px 60px -18px rgba(60,14,12,.45); }
.card::after {                       /* brillo que sigue al mouse */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(260px circle at var(--bx) var(--by), rgba(255,255,255,.55), transparent 60%);
  transition: opacity .3s; mix-blend-mode: soft-light;
}
.card:hover::after { opacity: 1; }
.card-img { border-radius: 22px 22px 0 0; }
.card-img::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, rgba(20,4,3,.45), transparent); pointer-events: none; }
.card-img img { transition: transform .8s var(--ease); }
.card:hover .card-img img { transform: scale(1.08); }
.badge { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 12px rgba(0,0,0,.25); z-index: 1; }
.badge.venta { background: rgba(127,36,32,.88); }
.badge.renta { background: rgba(199,105,12,.9); }
.precio { letter-spacing: -.02em; }
.aviso { backdrop-filter: blur(4px); }

/* Detalle: hoja de cristal con animación */
dialog { border-radius: 26px; box-shadow: 0 40px 100px rgba(20,4,3,.55); }
dialog[open] { animation: entrar .45s var(--ease); }
dialog::backdrop { background: rgba(25,5,4,.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: velo .35s ease; }
@keyframes entrar { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes velo { from { opacity: 0; } to { opacity: 1; } }
.galeria img { transition: opacity .3s; }
.nav, .cerrar { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(255,255,255,.82); box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.nav:hover { transform: translateY(-50%) scale(1.1); }
.cerrar:hover { transform: scale(1.1); }
.det-body { background: linear-gradient(180deg, #fff, #fbf8f7); }
.detalles li {
  background: linear-gradient(145deg, #fff, #f6efed); border: 1px solid rgba(127,36,32,.07);
  box-shadow: 0 6px 16px -8px rgba(60,14,12,.25); transition: transform .25s var(--ease);
}
.detalles li:hover { transform: translateY(-3px); }
.detalles .ico { background: linear-gradient(145deg, #fff, #f1e4e1); box-shadow: 0 4px 10px -2px rgba(60,14,12,.25), inset 0 1px 0 #fff; }
.det-acciones { background: rgba(255,255,255,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

.wa-float { background: linear-gradient(135deg, #2fe07a, #17b457); box-shadow: 0 10px 28px rgba(23,180,87,.5); animation: latido 3s ease-in-out infinite; }
@keyframes latido { 0%,100% { box-shadow: 0 10px 28px rgba(23,180,87,.5), 0 0 0 0 rgba(37,211,102,.45); } 50% { box-shadow: 0 10px 28px rgba(23,180,87,.5), 0 0 0 14px rgba(37,211,102,0); } }

.footer { background: linear-gradient(180deg, #2a0a08, #120404); border-radius: 36px 36px 0 0; margin-top: 20px; }

@media (max-width: 640px) {
  .hero { padding: 26px 0 54px; border-radius: 0 0 28px 28px; }
  .escena { width: 84px; height: 84px; padding: 10px; margin-top: -4px; }
  .filtros { border-radius: 0 0 22px 22px; }
  .card { border-radius: 18px; }
  .card-img { border-radius: 18px 18px 0 0; }
  .card:active { transform: scale(.97); }
  dialog[open] { animation: subirHoja .45s var(--ease); }
  dialog { border-radius: 0; }
}
@keyframes subirHoja { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- Celular / pantallas táctiles: efectos propios, sin necesitar mouse ---------- */
@media (hover: none), (pointer: coarse) {
  /* Cristal más marcado: borde de luz y brillo interior, se nota aunque el fondo sea claro */
  .filtros {
    background: linear-gradient(160deg, rgba(255,255,255,.82), rgba(255,255,255,.55));
    -webkit-backdrop-filter: saturate(200%) blur(22px); backdrop-filter: saturate(200%) blur(22px);
    border: 1px solid rgba(255,255,255,.85);
    box-shadow: 0 18px 40px -14px rgba(60,14,12,.4), inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(127,36,32,.08);
  }
  .tabs { box-shadow: 0 10px 30px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.35); }
  .topbar { box-shadow: inset 0 -1px 0 rgba(255,255,255,.12), 0 6px 24px rgba(30,5,4,.25); }
  .det-acciones { background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.92)); }

  /* Las tarjetas se inclinan y brillan según su posición al hacer scroll (lo mueve app.js) */
  .card { transform: perspective(700px) rotateX(var(--rx)) scale(var(--sc, 1)); transition: opacity .7s var(--ease), translate .7s var(--ease), transform .12s linear, box-shadow .3s; }
  .card::after { opacity: .85; background: linear-gradient(115deg, transparent calc(var(--by) - 22%), rgba(255,255,255,.6) var(--by), transparent calc(var(--by) + 22%)); }
  .card-img img { transform: scale(1.14) translate3d(0, var(--py, 0px), 0); transition: none; }
  .card:active { --sc: .965; box-shadow: 0 6px 16px -8px rgba(60,14,12,.4); }
}

/* Animación de entrada del contenido al abrir una propiedad (se nota en celular y PC) */
.det-head, .det-titulo, .detalles li, .det-acciones .btn {
  animation: surgir .55s var(--ease) both;
}
.det-head { animation-delay: .12s; }
.det-titulo { animation-delay: .2s; }
.detalles li:nth-child(1) { animation-delay: .24s; } .detalles li:nth-child(2) { animation-delay: .29s; }
.detalles li:nth-child(3) { animation-delay: .34s; } .detalles li:nth-child(4) { animation-delay: .39s; }
.detalles li:nth-child(5) { animation-delay: .44s; } .detalles li:nth-child(6) { animation-delay: .49s; }
.detalles li:nth-child(n+7) { animation-delay: .54s; }
.det-acciones .btn { animation-delay: .5s; }
@keyframes surgir { from { opacity: 0; transform: translateY(22px) scale(.94); } to { opacity: 1; transform: none; } }
.galeria { animation: zoomFoto .8s var(--ease) both; }
@keyframes zoomFoto { from { transform: scale(1.12); } to { transform: none; } }
.galeria { overflow: hidden; }

/* ---------- Pantalla de bienvenida (con voz) ---------- */
body.bloqueado { overflow: hidden; }
#bienvenida {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; text-align: center;
  background: radial-gradient(90% 70% at 50% 30%, #4a1411 0%, #240908 55%, #120404 100%); color: #fff;
  overflow: hidden; isolation: isolate;
  transition: opacity .8s var(--ease), visibility .8s, transform .8s var(--ease);
}
#bienvenida.oculta { opacity: 0; visibility: hidden; transform: scale(1.06); pointer-events: none; }
.bv-contenido { position: relative; z-index: 2; display: grid; gap: 10px; justify-items: center; }
.bv-escena { width: 150px; height: 150px; margin: 0 auto; }
.bv-nombre { width: min(300px, 78vw); height: auto; margin-top: -26px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.5)); animation: surgir 1s var(--ease) .2s both; }
.bv-boton {
  margin-top: 10px; padding: 16px 38px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; font-size: 1.1rem; letter-spacing: .02em;
  color: #3a0d0b; background: linear-gradient(135deg, #ffe08a, #d4a63a);
  box-shadow: 0 12px 30px rgba(212,166,58,.45), inset 0 1px 0 rgba(255,255,255,.6);
  animation: surgir .9s var(--ease) .5s both, pulso 2.4s ease-in-out 1.4s infinite;
}
.bv-boton:active { transform: scale(.96); }
@keyframes pulso { 0%,100% { box-shadow: 0 12px 30px rgba(212,166,58,.45), 0 0 0 0 rgba(255,214,110,.5); } 50% { box-shadow: 0 12px 30px rgba(212,166,58,.45), 0 0 0 16px rgba(255,214,110,0); } }
.bv-ayuda { margin: 0; color: rgba(255,255,255,.6); font-size: .9rem; animation: surgir .9s var(--ease) .8s both; }

/* Botón para volver a escuchar la bienvenida */
.voz-btn {
  position: fixed; left: 14px; bottom: 14px; z-index: 20; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5);
  background: rgba(22,5,4,.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; font-size: 1.25rem; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,.35); transition: transform .2s var(--ease);
}
.voz-btn:active { transform: scale(.92); }
.voz-btn.hablando { animation: latido 1.2s ease-in-out infinite; background: linear-gradient(135deg, #9a2e28, #6b1a17); }

/* Propiedades sin precio cargado */
.consultar { font-size: .88em; font-weight: 600; color: var(--primary); }
.aviso-info { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 500; font-size: .92rem; animation: surgir .55s var(--ease) .6s both; }
@media (max-width: 640px) { .consultar { font-size: .8em; } }

/* Lista de propiedades en columnas fijas: 2 en celular, 3 en tableta, 4 en computadora (Todas, En venta y En renta) */
@media (min-width: 641px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } .card h3 { font-size: .95rem; } .precio { font-size: 1.2rem; } }

/* Celular: 3 propiedades por fila. Tarjetas compactas: foto, precio y nombre (el resto se ve al abrir la propiedad) */
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .card { border-radius: 12px; }
  .card-img { aspect-ratio: 1 / 1; border-radius: 12px 12px 0 0; }
  .card-img::after { display: none; }
  .card-body { padding: 7px 7px 9px; gap: 3px; }
  .precio { font-size: .88rem; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
  .precio small { font-size: .62rem; }
  .consultar { font-size: .7rem; line-height: 1.1; display: block; }
  .card h3 { font-size: .72rem; line-height: 1.22; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .card .specs, .card .avisos { display: none; }
  .card .ubic { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: .64rem; line-height: 1.22; margin: 0; }
  .badge { top: 5px; left: 5px; padding: 2px 6px; font-size: .56rem; letter-spacing: .02em; }
  .badge.no-disp { right: 5px; }
  .contador { margin: 14px 0 8px; }
}

/* Tipos como cuadritos junto al botón Filtros */
#tipo { display: none; }
.barra { grid-template-columns: minmax(0, 1fr) auto; }
.tipos { display: flex; gap: 6px; overflow-x: auto; min-width: 0; padding: 2px 2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tipos::-webkit-scrollbar { display: none; }
.tipo-chip {
  flex: 0 0 auto; width: 66px; height: 54px; padding: 4px 2px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(127,36,32,.14); background: rgba(255,255,255,.85); color: var(--text);
  display: grid; place-items: center; align-content: center; gap: 1px; font: inherit;
  transition: transform .15s var(--ease), background .25s, color .25s, box-shadow .25s;
}
.tipo-chip .ti { font-size: 1.15rem; line-height: 1; }
.tipo-chip .tt { font-size: .6rem; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.tipo-chip:active { transform: scale(.94); }
.tipo-chip.sel { background: linear-gradient(135deg, #9a2e28, #6b1a17); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(127,36,32,.35); }
@media (min-width: 900px) {
  .barra { grid-template-columns: minmax(180px, 1fr) auto auto; align-items: center; }
  .tipo-chip { width: 76px; height: 56px; }
  .tipo-chip .tt { font-size: .68rem; }
}

/* Celular: todos los cuadritos de tipo caben a la vista; el botón Filtros queda solo con el ícono */
@media (max-width: 640px) {
  .bf-txt { display: none; }
  .btn-filtros { padding: 0 13px; gap: 4px; }
  .tipos { overflow: visible; gap: 4px; padding: 0; }
  .tipo-chip { flex: 1 1 0; width: auto; min-width: 0; height: 52px; border-radius: 11px; }
  .tipo-chip .ti { font-size: 1.05rem; }
  .tipo-chip .tt { font-size: .54rem; letter-spacing: -.02em; }
}

/* Cuadritos de tipo: nombre corto solo cuando hay 5 en pantalla de celular */
.t-corto { display: none; }
.tipo-chip .tt { max-width: 100%; }
@media (max-width: 640px) {
  .tipos.muchos .t-largo { display: none; }
  .tipos.muchos .t-corto { display: inline; }
  .tipo-chip { overflow: hidden; }
}

/* Sin voz: la pantalla de bienvenida y el botón de sonido no aparecen ni un instante (app.js los activa con BIENVENIDA_CON_VOZ) */
body:not(.bloqueado) #bienvenida { display: none; }
body:not(.con-voz) .voz-btn { display: none; }

/* Sin recuadro azul de foco en las tarjetas al tocar o cerrar una propiedad (con teclado sí se ve un borde propio) */
.card { outline: none; -webkit-tap-highlight-color: transparent; }
.card:focus:not(:focus-visible) { outline: none; }
.card:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (hover: none), (pointer: coarse) { .card:focus, .card:focus-visible { outline: none; } }

/* Detalles: nunca se parten las palabras con guiones; los textos largos ocupan dos casillas de ancho */
.detalles { grid-auto-flow: dense; }
.detalles li { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; word-break: normal; }
.detalles li.ancho {
  grid-column: span 2; flex-direction: row; align-items: center; justify-content: flex-start;
  text-align: left; gap: 10px; padding: 9px 12px;
}
.detalles li.ancho .ico { flex: none; }

/* Detalle opción C: números grandes arriba + lista con marcas ✓ en 2 columnas */
.resumen { display: flex; gap: 8px; margin: 18px 0 4px; }
.num-tile { flex: 1 1 0; max-width: 150px; min-width: 0; background: var(--primary-soft); border-radius: 14px; padding: 12px 6px 10px; text-align: center; display: grid; justify-items: center; }
.num-tile .ico { font-size: 1.4rem; line-height: 1.1; }
.num-tile b { font: 400 1.8rem/1.1 "Marcellus", Georgia, serif; color: var(--primary); }
.num-tile .et { font-size: .74rem; color: var(--muted); font-weight: 500; }
.lista-ok { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: dense; gap: 2px 14px; }
.lista-ok li { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; font-size: .88rem; line-height: 1.3; min-width: 0; }
.lista-ok li::before { content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #e4f1e6; color: #2c6a3a; display: grid; place-items: center; font-size: .72rem; font-weight: 700; margin-top: 1px; }
.lista-ok li .t { flex: 1; min-width: 0; hyphens: manual; overflow-wrap: break-word; }
.lista-ok li.largo { grid-column: 1 / -1; }
@media (min-width: 640px) { .lista-ok { grid-template-columns: repeat(3, 1fr); } .lista-ok li { font-size: .92rem; } }
.num-tile, .lista-ok li { animation: surgir .55s var(--ease) both; }
.num-tile:nth-child(1) { animation-delay: .22s; } .num-tile:nth-child(2) { animation-delay: .28s; } .num-tile:nth-child(3) { animation-delay: .34s; }
.lista-ok li:nth-child(-n+4) { animation-delay: .4s; } .lista-ok li:nth-child(n+5) { animation-delay: .48s; }

/* Encabezado "Requisitos para alquilar" en todas las rentas */
.condiciones { margin: 16px 0 0; padding: 12px 14px 13px; border-radius: 14px; background: var(--primary-soft); border: 1px solid rgba(127,36,32,.14); display: grid; gap: 6px; animation: surgir .55s var(--ease) .18s both; }
.condiciones h4 { margin: 0 0 2px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.condiciones p { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .03em; line-height: 1.25; color: var(--primary); }
.condiciones p span { flex: none; font-size: 1.05rem; line-height: 1; }
@media (min-width: 640px) { .condiciones { display: flex; flex-wrap: wrap; gap: 6px 28px; } .condiciones h4 { flex-basis: 100%; } .condiciones p { font-size: .85rem; } }

/* Requisitos para alquilar: color suave y amigable (verde salvia), no de alerta */
.condiciones { background: #eaf4ec; border: 1px solid #cfe5d3; }
.condiciones h4 { color: #5f8a69; }
.condiciones p { color: #2f5d3a; }

/* Propiedad abierta: el scroll es solo de la propiedad (no se pasa a la página de atrás) */
html.sin-scroll, body.sin-scroll { overflow: hidden !important; overscroll-behavior: none; }
dialog { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; overflow-y: auto; touch-action: pan-y; }
.galeria { touch-action: pan-y; }

/* =========================================================
   MAPA: estilos básicos de Leaflet (incluidos aquí a propósito, la vista previa de Claude no carga hojas de estilo externas)
   ========================================================= */
.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer { position: absolute; left: 0; top: 0; }
.leaflet-container { overflow: hidden; -webkit-tap-highlight-color: transparent; background: #cfd8d3; font-family: inherit; touch-action: none; outline: 0; }
.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.leaflet-tile::selection { background: transparent; }
.leaflet-container .leaflet-overlay-pane svg { max-width: none !important; max-height: none !important; }
.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile { max-width: none !important; max-height: none !important; width: auto; padding: 0; }
.leaflet-tile { visibility: hidden; }
.leaflet-tile-loaded { visibility: inherit; }
.leaflet-zoom-box { width: 0; height: 0; box-sizing: border-box; z-index: 800; }
.leaflet-pane { z-index: 400; } .leaflet-tile-pane { z-index: 200; } .leaflet-overlay-pane { z-index: 400; } .leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; } .leaflet-tooltip-pane { z-index: 650; } .leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; } .leaflet-map-pane svg { z-index: 200; }
.leaflet-tile-container { pointer-events: none; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-zoom-anim .leaflet-zoom-animated { will-change: transform; transition: transform .25s cubic-bezier(0,0,.25,1); }
.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile { transition: none; }
.leaflet-zoom-anim .leaflet-zoom-hide { visibility: hidden; }
.leaflet-interactive { cursor: pointer; } .leaflet-grab { cursor: grab; } .leaflet-dragging .leaflet-grab { cursor: move; }
.leaflet-top,.leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; } .leaflet-right { right: 0; } .leaflet-bottom { bottom: 0; } .leaflet-left { left: 0; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; float: left; clear: both; }
.leaflet-right .leaflet-control { float: right; }
.leaflet-top .leaflet-control { margin-top: 10px; } .leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; } .leaflet-right .leaflet-control { margin-right: 10px; }
.leaflet-fade-anim .leaflet-popup { opacity: 0; transition: opacity .2s linear; }
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { opacity: 1; }
.leaflet-popup { position: absolute; text-align: center; margin-bottom: 20px; }
.leaflet-popup-content-wrapper { padding: 0; text-align: left; border-radius: 16px; background: #fff; color: var(--text); box-shadow: 0 10px 30px rgba(30,5,4,.35); overflow: hidden; }
.leaflet-popup-content { margin: 0; line-height: 1.3; min-height: 1px; }
.leaflet-popup-tip-container { width: 40px; height: 20px; position: absolute; left: 50%; margin-top: -1px; margin-left: -20px; overflow: hidden; pointer-events: none; }
.leaflet-popup-tip { width: 17px; height: 17px; padding: 1px; margin: -10px auto 0; pointer-events: auto; transform: rotate(45deg); background: #fff; box-shadow: 0 3px 10px rgba(30,5,4,.25); }
.leaflet-container a.leaflet-popup-close-button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; font: 20px/28px Arial, sans-serif; text-align: center; text-decoration: none; color: #fff; z-index: 3; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.leaflet-control-zoom { border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(30,5,4,.3); }
.leaflet-control-zoom a { display: block; width: 38px; height: 38px; line-height: 38px; text-align: center; text-decoration: none; background: rgba(255,255,255,.95); color: var(--primary-dark); font: 700 20px/38px Arial, sans-serif; }
.leaflet-control-zoom a + a { border-top: 1px solid #e6e1df; }
.leaflet-control-attribution { background: rgba(255,255,255,.85); padding: 0 6px; font-size: 10px; margin: 0 !important; border-radius: 8px 0 0 0; color: #444; }
.leaflet-control-attribution a { color: #444; }

/* ---------- Botón Lista / Mapa ---------- */
.vista { display: flex; width: max-content; margin: 16px auto 0; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(255,255,255,.9); border: 1px solid var(--line); box-shadow: var(--shadow); }
.vista button { border: 0; background: none; padding: 9px 20px; border-radius: 999px; font: 600 .9rem var(--body, Inter, sans-serif); color: var(--muted); cursor: pointer; transition: background .25s, color .25s, transform .15s; }
.vista button:active { transform: scale(.96); }
.vista button.on { background: linear-gradient(135deg, #9a2e28, #6b1a17); color: #fff; box-shadow: 0 6px 16px rgba(127,36,32,.35); }

/* ---------- Mapa ---------- */
.mapa-wrap { display: none; margin: 4px 0 40px; }
main.vista-mapa .mapa-wrap { display: block; }
main.vista-mapa #grid, main.vista-mapa #vacio { display: none; }
.mapa-caja { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #cfd8d3; isolation: isolate; }
#mapa { height: clamp(380px, 68vh, 640px); width: 100%; }
.mapa-capas { position: absolute; top: 10px; left: 10px; z-index: 1000; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.95); box-shadow: 0 4px 14px rgba(30,5,4,.3); }
.mapa-capas button { border: 0; background: none; padding: 7px 13px; border-radius: 999px; font: 600 .78rem var(--body, Inter, sans-serif); color: var(--muted); cursor: pointer; }
.mapa-capas button.on { background: var(--primary); color: #fff; }
.mapa-aviso { position: absolute; left: 10px; right: 10px; bottom: 36px; z-index: 1000; margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.96); color: var(--primary-dark); font-size: .82rem; font-weight: 500; box-shadow: 0 6px 18px rgba(30,5,4,.3); }
.mapa-aviso[hidden] { display: none; }
.mapa-nota { margin: 10px 4px 0; color: var(--muted); font-size: .82rem; text-align: center; }

/* Pines con el precio */
.pin-wrap { background: none; border: 0; }
.pin { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); white-space: nowrap; padding: 5px 10px; border-radius: 999px; font: 700 .74rem/1 var(--body, Inter, sans-serif); color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.45); border: 2px solid #fff; }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; background: inherit; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateX(-50%) rotate(45deg); z-index: -1; }
.pin.venta { background: #7f2420; } .pin.renta { background: #c7690c; } .pin.cerrada { filter: grayscale(.8); opacity: .8; }
.leaflet-marker-icon:hover .pin, .leaflet-marker-icon:focus .pin { transform: translate(-50%, -100%) scale(1.12); }

/* Ventana al tocar un pin */
.pop { width: 230px; }
.pop img { display: block; width: 100%; height: 118px; object-fit: cover; background: #eee; }
.pop-t { padding: 11px 13px 13px; display: grid; gap: 3px; }
.pop-t b { font-size: .92rem; }
.pop-p { font-weight: 700; font-size: 1.05rem; color: var(--primary); }
.pop-u { font-size: .8rem; color: var(--muted); }
.pop-ver { margin-top: 8px; border: 0; border-radius: 999px; padding: 10px 14px; font: 700 .85rem var(--body, Inter, sans-serif); color: #fff; background: linear-gradient(135deg, #9a2e28, #6b1a17); cursor: pointer; }
@media (max-width: 640px) { #mapa { height: 62vh; } .pop { width: 210px; } .vista button { padding: 9px 22px; } }
.mapa-capas .todas { color: var(--primary); border-left: 1px solid #e6e1df; border-radius: 0 999px 999px 0; margin-left: 4px; padding-left: 12px; }
.mapa-capas .todas[hidden] { display: none; }

/* Sin aro azul de foco en la X, las flechas y los botones al abrir una propiedad (con teclado sí se ve uno propio) */
dialog:focus, dialog:focus-visible { outline: none; }
.cerrar, .nav, .btn, .tipo-chip, .tab, .vista button, .btn-filtros { -webkit-tap-highlight-color: transparent; }
.cerrar:focus, .nav:focus { outline: none; }
.cerrar:focus-visible, .nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(127,36,32,.55); }
@media (hover: none), (pointer: coarse) { .cerrar:focus-visible, .nav:focus-visible, .btn:focus-visible { outline: none; box-shadow: 0 6px 18px rgba(0,0,0,.25); } }

/* Entrada y salida elegante de las tarjetas al cambiar de pestaña o de tipo */
.card {
  scale: .965;
  transition: opacity .6s var(--ease), translate .6s var(--ease), scale .6s var(--ease), transform .18s ease-out, box-shadow .3s;
  transition-delay: calc(min(var(--i, 0), 10) * 55ms), calc(min(var(--i, 0), 10) * 55ms), calc(min(var(--i, 0), 10) * 55ms), 0s, 0s;
}
.card.visible { scale: 1; }
.grid.saliendo .card { opacity: 0; translate: 0 -10px; scale: .97; transition: opacity .17s ease-in, translate .17s ease-in, scale .17s ease-in; transition-delay: 0s !important; pointer-events: none; }
.contador.cambia { animation: latidoNumero .5s var(--ease); }
@keyframes latidoNumero { 0% { opacity: .2; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }

/* Transición MÁS DRAMÁTICA de las tarjetas: entran desde abajo con giro y rebote, salen encogiéndose */
:root { --spring: cubic-bezier(.34, 1.5, .5, 1); }
.card {
  translate: 0 64px; scale: .88; rotate: -3deg;
  transition: opacity .7s var(--ease), translate .85s var(--spring), scale .85s var(--spring), rotate .85s var(--spring), transform .18s ease-out, box-shadow .3s;
  transition-delay: calc(min(var(--i, 0), 11) * 70ms), calc(min(var(--i, 0), 11) * 70ms), calc(min(var(--i, 0), 11) * 70ms), calc(min(var(--i, 0), 11) * 70ms), 0s, 0s;
}
.card:nth-child(even) { rotate: 3deg; }
.card.visible { opacity: 1; translate: 0 0; scale: 1; rotate: 0deg; }
.grid.saliendo .card { opacity: 0; translate: 0 -28px; scale: .88; rotate: -4deg; transition: opacity .22s ease-in, translate .22s ease-in, scale .22s ease-in, rotate .22s ease-in; transition-delay: 0s !important; pointer-events: none; }
.grid.saliendo .card:nth-child(even) { rotate: 4deg; }

/* Texto de respaldo en el pie de página, bajo las letras doradas */
.footer .aval {
  max-width: 34ch; margin: 4px auto 18px; padding: 14px 6px; text-wrap: balance;
  font-size: .78rem; font-weight: 600; line-height: 1.7; letter-spacing: .14em; text-align: center; color: #ecd398;
  border-top: 1px solid rgba(212,166,58,.38); border-bottom: 1px solid rgba(212,166,58,.38);
}
.footer .copy { margin: 0; }
@media (min-width: 640px) { .footer .aval { max-width: 64ch; font-size: .82rem; } }

/* Encabezado (portada) más compacto: menos espacio vacío, la lista queda más arriba */
.hero { padding: 26px 0 48px; }
.escena { width: 76px; height: 76px; padding: 8px; margin: -4px auto 0; }
.hero h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 4px; }
.hero p { margin: 0 0 14px; }
@media (max-width: 640px) {
  .hero { padding: 12px 0 30px; border-radius: 0 0 22px 22px; }
  .escena { width: 44px; height: 44px; padding: 4px; margin: 0 auto 2px; }
  .hero h1 { font-size: 1.32rem; line-height: 1.2; margin: 0 0 2px; }
  .hero p { font-size: .8rem; margin: 0 0 12px; }
  .tabs { box-shadow: 0 6px 18px rgba(0,0,0,.25); }
  .hero .tab { padding: 8px 0; font-size: .86rem; }
  main.wrap { margin-top: 0; }
  .vista { margin-top: 12px; }
}

/* Barra de secciones: solo los cuadritos de tipo (sin buscador ni botón Filtros) */
.buscador, .btn-filtros, .panel { display: none !important; }
.barra { grid-template-columns: 1fr !important; }
.filtros { padding: 10px; }
.tipos { justify-content: center; padding: 2px; }
@media (min-width: 641px) {
  .filtros { max-width: 760px; margin-inline: auto; }
  .tipos { gap: 10px; }
  .tipo-chip { width: 112px; height: 62px; }
  .tipo-chip .ti { font-size: 1.4rem; }
  .tipo-chip .tt { font-size: .78rem; }
}

/* Aviso "DESLIZA PARA VER MÁS" con flechas que caen en cascada */
.desliza {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  transform: translateX(-50%); display: grid; justify-items: center; gap: 2px;
  padding: 11px 22px 9px; border: 1px solid rgba(236,211,152,.55); border-radius: 22px; cursor: pointer;
  background: linear-gradient(160deg, rgba(120,28,24,.94), rgba(52,10,9,.96));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #f3dc9f; font: 700 .72rem/1 var(--body, Inter, sans-serif); letter-spacing: .26em; white-space: nowrap;
  box-shadow: 0 12px 30px rgba(30,5,4,.5), 0 0 0 0 rgba(236,211,152,.5);
  animation: llamada 2.4s ease-in-out infinite;
  transition: opacity .45s var(--ease), translate .45s var(--ease), visibility .45s;
}
.desliza[hidden] { display: none; }
.desliza.oculto, body.en-mapa .desliza { opacity: 0; visibility: hidden; translate: 0 20px; pointer-events: none; }
.desliza:active { scale: .96; }
.d-flechas { display: grid; justify-items: center; height: 24px; margin-top: 2px; }
.d-flechas i { display: block; width: 12px; height: 12px; margin-top: -6px; border-right: 2.5px solid #f3dc9f; border-bottom: 2.5px solid #f3dc9f; transform: rotate(45deg); opacity: 0; animation: cascada 1.5s ease-in-out infinite; }
.d-flechas i:nth-child(2) { animation-delay: .22s; } .d-flechas i:nth-child(3) { animation-delay: .44s; }
@keyframes cascada { 0% { opacity: 0; transform: translateY(-8px) rotate(45deg); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px) rotate(45deg); } }
@keyframes llamada {
  0%, 100% { transform: translateX(-50%) translateY(0); box-shadow: 0 12px 30px rgba(30,5,4,.5), 0 0 0 0 rgba(236,211,152,.45); }
  50% { transform: translateX(-50%) translateY(-6px); box-shadow: 0 16px 34px rgba(30,5,4,.55), 0 0 0 10px rgba(236,211,152,0); }
}

/* Aviso Desliza más angosto: no choca con el botón de WhatsApp */
.desliza { left: calc(50% - 26px); padding: 10px 24px 8px; gap: 0; letter-spacing: normal; }
.d-txt { display: grid; justify-items: center; gap: 4px; }
.d-txt b { font-size: 1rem; letter-spacing: .34em; padding-left: .34em; }
.d-txt small { font-size: .56rem; font-weight: 600; letter-spacing: .28em; padding-left: .28em; opacity: .9; }

/* Aviso Desliza: solo letras doradas, sin fondo, más pequeño y abajo en el centro */
.desliza {
  left: 50%; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding: 0; gap: 0;
  background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0;
  color: #eab94a; animation: flota 2.2s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.8)) drop-shadow(0 0 7px rgba(0,0,0,.5));
}
.d-txt { gap: 2px; }
.d-txt b { font-size: .78rem; letter-spacing: .32em; padding-left: .32em; }
.d-txt small { font-size: .5rem; letter-spacing: .26em; padding-left: .26em; }
.d-flechas { height: 18px; margin-top: 0; }
.d-flechas i { width: 9px; height: 9px; margin-top: -5px; border-right-width: 2px; border-bottom-width: 2px; border-color: #eab94a; }
@keyframes flota { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }

/* Aviso Desliza MÁS LLAMATIVO: dorado brillante, más grande, con resplandor que late */
.desliza {
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)); color: #ffc929;
  filter: drop-shadow(0 0 1.5px rgba(0,0,0,.95)) drop-shadow(0 0 1.5px rgba(0,0,0,.95)) drop-shadow(0 2px 3px rgba(0,0,0,.8)) drop-shadow(0 0 10px rgba(255,190,40,.8));
  animation: flota 1.8s ease-in-out infinite, fulgor 1.8s ease-in-out infinite;
}
.d-txt b { font-size: 1.08rem; font-weight: 800; letter-spacing: .3em; padding-left: .3em; }
.d-txt small { font-size: .64rem; font-weight: 800; letter-spacing: .24em; padding-left: .24em; }
.d-flechas { height: 28px; }
.d-flechas i { width: 14px; height: 14px; margin-top: -9px; border-right-width: 3.5px; border-bottom-width: 3.5px; border-color: #ffc929; }
@keyframes fulgor {
  0%, 100% { filter: drop-shadow(0 0 1.5px rgba(0,0,0,.95)) drop-shadow(0 0 1.5px rgba(0,0,0,.95)) drop-shadow(0 2px 3px rgba(0,0,0,.8)) drop-shadow(0 0 6px rgba(255,190,40,.55)); }
  50% { filter: drop-shadow(0 0 1.5px rgba(0,0,0,.95)) drop-shadow(0 0 1.5px rgba(0,0,0,.95)) drop-shadow(0 2px 3px rgba(0,0,0,.8)) drop-shadow(0 0 16px rgba(255,205,60,1)); }
}
@keyframes cascada { 0% { opacity: .15; transform: translateY(-9px) rotate(45deg); } 45% { opacity: 1; } 100% { opacity: .15; transform: translateY(9px) rotate(45deg); } }

/* Aviso Desliza DENTRO de la lista: ocupa su propio lugar debajo de la última fila cargada */
body > .desliza { display: none; }
#grid > #desliza {
  grid-column: 1 / -1; position: static; left: auto; bottom: auto; transform: none; translate: 0 0; justify-self: center;
  margin: 2px 0 14px; z-index: 1; opacity: 1; visibility: visible;
  animation: flota2 1.8s ease-in-out infinite, fulgor 1.8s ease-in-out infinite;
}
#grid > #desliza.oculto { display: none; }
@keyframes flota2 { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
/* el aviso es un elemento más de la lista: la inclinación alternada de las tarjetas se cuenta solo entre tarjetas */
.card:nth-child(even) { rotate: -3deg; } .card:nth-of-type(even) { rotate: 3deg; }
.card.visible { rotate: 0deg; }
.grid.saliendo .card:nth-child(even) { rotate: -4deg; } .grid.saliendo .card:nth-of-type(even) { rotate: 4deg; }

/* Botón "Contáctanos" llamativo: dorado sólido, ícono de WhatsApp, brillo que lo recorre y latido suave */
.topbar #contactoTop {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 7px;
  border: 0; color: #3a0d0b; font-weight: 800; letter-spacing: .01em; white-space: nowrap;
  background: linear-gradient(135deg, #ffe27d, #f2b52c 55%, #e19a15);
  box-shadow: 0 4px 16px rgba(255,190,40,.45), inset 0 1px 0 rgba(255,255,255,.65);
  animation: palpita 2.2s ease-in-out infinite;
}
.topbar #contactoTop svg { width: 18px; height: 18px; flex: none; }
.topbar #contactoTop::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.8) 50%, transparent 70%);
  transform: translateX(-130%); animation: brilloBoton 3.2s ease-in-out infinite;
}
.topbar #contactoTop:active { transform: scale(.96); }
@keyframes palpita {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(255,190,40,.45), inset 0 1px 0 rgba(255,255,255,.65), 0 0 0 0 rgba(255,205,70,.6); }
  50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255,190,40,.6), inset 0 1px 0 rgba(255,255,255,.65), 0 0 0 9px rgba(255,205,70,0); }
}
@keyframes brilloBoton { 0%, 50% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@media (max-width: 640px) { .topbar #contactoTop { padding: 9px 14px; font-size: .88rem; } .topbar #contactoTop svg { width: 17px; height: 17px; } }

/* Aviso Desliza: dorado más brillante y un poco más pequeño, con contorno café fino (se lee mejor que el halo negro) */
.desliza, #grid > #desliza {
  color: #ffd21f; -webkit-text-stroke: .6px #7a4300; paint-order: stroke fill;
  filter: drop-shadow(0 1px 1px rgba(90,45,0,.75)) drop-shadow(0 0 8px rgba(255,205,0,.9));
  animation: flota2 1.8s ease-in-out infinite, fulgor2 1.8s ease-in-out infinite;
}
.desliza .d-txt b { font-size: .92rem; letter-spacing: .3em; padding-left: .3em; }
.desliza .d-txt small { font-size: .56rem; letter-spacing: .22em; padding-left: .22em; }
.desliza .d-flechas { height: 23px; }
.desliza .d-flechas i { width: 12px; height: 12px; margin-top: -8px; border-right-width: 3px; border-bottom-width: 3px; border-color: #ffd21f; }
@keyframes fulgor2 {
  0%, 100% { filter: drop-shadow(0 1px 1px rgba(90,45,0,.75)) drop-shadow(0 0 5px rgba(255,205,0,.6)); }
  50% { filter: drop-shadow(0 1px 1px rgba(90,45,0,.75)) drop-shadow(0 0 16px rgba(255,222,45,1)); }
}
.desliza .d-flechas { margin-top: 3px; height: 26px; }
.desliza .d-flechas i:first-child { margin-top: 0; }

/* =========================================================
   MODO LIGERO en celular: sin lo que pesa al deslizar (desenfoques, 3D, sombras grandes, resplandores animados)
   ========================================================= */
@media (hover: none), (pointer: coarse) {
  /* sin desenfoques de cristal: es lo que más pesa al mover la pantalla */
  *, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .filtros { background: rgba(255,255,255,.97); }
  .tabs, .vista, .nav, .cerrar { background-color: rgba(255,255,255,.18); }
  .vista, .nav, .cerrar { background-color: rgba(255,255,255,.95); }

  /* tarjetas planas: sin 3D, sin brillo, sin foto en movimiento, sombra más chica */
  .grid { perspective: none; }
  .card { transform: none !important; transform-style: flat; box-shadow: 0 1px 2px rgba(60,14,12,.06), 0 6px 14px -8px rgba(60,14,12,.3); will-change: auto; }
  .card::after { display: none !important; }
  .card-img img { transform: none !important; transition: none; }
  .card.visible:active { scale: .97; }
  .badge { box-shadow: none; }

  /* resplandores animados fuera: se dejan estáticos (animar "filter" obliga a repintar en cada cuadro) */
  .desliza, #grid > #desliza { animation: flota2 1.8s ease-in-out infinite; filter: drop-shadow(0 1px 1px rgba(90,45,0,.75)) drop-shadow(0 0 9px rgba(255,210,30,.85)); }
  .hero-icono { animation: coreografia 15s cubic-bezier(.45, .05, .25, 1) infinite; }
  .topbar #contactoTop { animation: palpitaSuave 2.2s ease-in-out infinite; }
  .orbe { filter: blur(40px); }
}
@keyframes palpitaSuave { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* cuando la portada ya no se ve, sus animaciones se pausan (en todos los dispositivos) */
body.hero-pausado .hero *, body.hero-pausado .hero .orbe { animation-play-state: paused !important; }

/* Aviso Desliza: aparece DESPUÉS de que cargan las propiedades, debajo de la última fila, sin mover ninguna tarjeta */
#grid { position: relative; }
#grid > #desliza { position: absolute; grid-column: auto; left: 50%; transform: translateX(-50%); margin: 0; justify-self: auto; transition: opacity .5s ease, visibility .5s; }
#grid > #desliza.espera { opacity: 0; visibility: hidden; pointer-events: none; }

/* Barra de arriba: botón Contáctanos más pequeño (el logo chico de la izquierda se quitó; quedan solo las letras) */
.topbar #contactoTop { padding: 7px 14px; font-size: .84rem; gap: 6px; }
.topbar #contactoTop svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .topbar #contactoTop { padding: 6px 11px; font-size: .76rem; gap: 5px; } .topbar #contactoTop svg { width: 14px; height: 14px; } }

/* Recuadro "Requisitos para alquilar" más pequeño */
.condiciones { margin-top: 10px; padding: 7px 11px 8px; border-radius: 11px; gap: 3px; }
.condiciones h4 { font-size: .56rem; letter-spacing: .1em; margin: 0 0 1px; }
.condiciones p { font-size: .68rem; gap: 6px; letter-spacing: .02em; line-height: 1.2; }
.condiciones p span { font-size: .85rem; }
@media (min-width: 640px) { .condiciones { gap: 3px 20px; } .condiciones p { font-size: .72rem; } }

/* Encabezados de sección bien marcados dentro del detalle de la propiedad */
.sec-titulo {
  display: flex; align-items: center; gap: 9px; margin: 22px 0 8px;
  font: 800 .74rem/1 var(--body, Inter, sans-serif); letter-spacing: .15em; text-transform: uppercase; color: var(--primary);
}
.sec-titulo .si { flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--primary-soft); display: grid; place-items: center; font-size: .95rem; letter-spacing: 0; }
.sec-titulo::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(127,36,32,.4), rgba(127,36,32,0)); }
.sec-titulo + .resumen { margin-top: 0; }
.sec-titulo + .lista-ok { margin-top: 0; }
.condiciones + .sec-titulo { margin-top: 20px; }
@media (min-width: 640px) { .sec-titulo { font-size: .8rem; } }

/* Detalle: un solo botón limpio "Preguntar sobre esta propiedad", flotando abajo sobre un degradado suave (sin barra ni borde) */
.det-acciones {
  position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: center;
  margin: 14px -16px 0; padding: 26px 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(255,255,255,.98) 58%, rgba(255,255,255,0));
  border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
@media (min-width: 640px) { .det-acciones { margin: 14px -24px 0; padding-inline: 24px; } }
.btn-preguntar {
  width: 100%; max-width: 440px; display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  padding: 11px 22px 11px 12px; border-radius: 999px; text-decoration: none; cursor: pointer;
  font: 700 .98rem/1.2 var(--body, Inter, sans-serif); letter-spacing: .005em; color: #fff;
  background: linear-gradient(135deg, #a3302a, #6b1a17);
  box-shadow: 0 10px 24px -8px rgba(107,26,23,.7), inset 0 1px 0 rgba(255,255,255,.22);
  animation: surgir .6s var(--ease) .45s both; transition: transform .2s var(--ease), box-shadow .2s;
}
.btn-preguntar .bp-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.btn-preguntar .bp-ico svg { width: 20px; height: 20px; }
.btn-preguntar:active { transform: scale(.97); }
.btn-preguntar.cerrada { background: #ece6e4; color: #7a6460; box-shadow: none; padding: 14px 22px; cursor: default; }
@media (max-width: 380px) { .btn-preguntar { font-size: .9rem; gap: 9px; padding-right: 16px; } }

/* Botón "Preguntar sobre esta propiedad": más pequeño y con un titileo sutil */
.det-acciones { padding-top: 20px; }
.btn-preguntar {
  width: auto; max-width: none; gap: 8px; padding: 7px 17px 7px 8px; font-size: .82rem; letter-spacing: 0;
  box-shadow: 0 6px 16px -7px rgba(107,26,23,.7), inset 0 1px 0 rgba(255,255,255,.2);
  animation: surgir .6s var(--ease) .45s both, titilar 2.6s ease-in-out 1.2s infinite;
}
.btn-preguntar .bp-ico { width: 26px; height: 26px; }
.btn-preguntar .bp-ico svg { width: 16px; height: 16px; }
.btn-preguntar.cerrada { padding: 9px 18px; animation: surgir .6s var(--ease) .45s both; }
@keyframes titilar { 0%, 100% { opacity: 1; scale: 1; } 50% { opacity: .84; scale: 1.025; } }

/* Ventas: puntos a favor destacados (Libre de hipoteca, Crédito VIP) */
.destacados { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; animation: surgir .55s var(--ease) .18s both; }
.dest-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 7px; border-radius: 999px;
  font: 800 .76rem/1.15 var(--body, Inter, sans-serif); letter-spacing: .02em; color: #5a3600;
  background: linear-gradient(135deg, #fff4c9, #ffe28a); border: 1px solid #f0c443;
  box-shadow: 0 3px 10px -4px rgba(190,130,0,.55), inset 0 1px 0 rgba(255,255,255,.7);
}
.dest-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: .8rem; box-shadow: 0 1px 3px rgba(120,80,0,.3); }

/* Rentas: botón y recuadro de video */
.btn-video {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 14px 0 0; padding: 12px 16px;
  border-radius: 14px; border: 1.5px solid #7f2420; background: #fff; color: #7f2420; cursor: pointer;
  font: 800 .92rem/1 var(--body, Inter, sans-serif); letter-spacing: .02em; -webkit-tap-highlight-color: transparent;
}
.btn-video .bv-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #7f2420; color: #fff; font-size: .7rem; padding-left: 2px; }
.btn-video.abierto { background: #7f2420; color: #fff; }
.btn-video.abierto .bv-ico { background: #fff; color: #7f2420; }
.video-caja { margin-top: 10px; border-radius: 14px; overflow: hidden; background: #111; aspect-ratio: 16 / 9; }
.video-caja[hidden] { display: none; }
.video-caja video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.video-demo { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; background: linear-gradient(135deg, #3a1210, #7f2420); }
.video-demo .vd-play { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); border: 2px solid #fff; font-size: 1.3rem; padding-left: 4px; margin-bottom: 6px; }
.video-demo small { opacity: .75; }

/* Video: versión sutil (enlace pequeño, sin caja) */
.btn-video, .btn-video.abierto {
  display: inline-flex; width: auto; margin: 12px 0 0; padding: 4px 2px; gap: 8px; border: 0; border-radius: 0; background: none;
  color: #7f2420; font: 700 .82rem/1 var(--body, Inter, sans-serif); letter-spacing: .03em;
  border-bottom: 1px solid rgba(127,36,32,.35); padding-bottom: 3px;
}
.btn-video .bv-ico, .btn-video.abierto .bv-ico { width: 18px; height: 18px; font-size: .5rem; padding-left: 1px; background: rgba(127,36,32,.1); color: #7f2420; }
.btn-video:hover { border-bottom-color: #7f2420; }
.video-caja { border-radius: 12px; box-shadow: 0 6px 18px -10px rgba(0,0,0,.4); }
.video-demo { background: linear-gradient(135deg, #f6eeee, #ead9d8); color: #7f2420; }
.video-demo .vd-play { background: #fff; border: 0; color: #7f2420; width: 48px; height: 48px; font-size: 1rem; box-shadow: 0 4px 12px -4px rgba(127,36,32,.5); }
.video-demo small { opacity: .6; }

/* Video: centrado, justo debajo de las fotos */
.btn-video, .btn-video.abierto { display: flex; width: max-content; margin: 2px auto 14px; }
.video-caja { margin: -2px 0 16px; }

/* Pestañas deslizables: se puede mantener presionado (efecto "aplastado") y arrastrar */
.tabs { touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.tabs.pulsado { cursor: grabbing; }
.tabs .tab { transition: background .25s var(--ease), color .25s, transform .2s var(--ease); }
.tabs.pulsado .tab.active { transform: scale(.93); box-shadow: 0 1px 6px rgba(0,0,0,.28); }

/* ===== Pestañas: pastilla líquida que se desliza ===== */
.tabs { position: relative; }
.tabs .pastilla {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; z-index: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(135deg, #fff, #f6e7c2); box-shadow: 0 4px 14px rgba(0,0,0,.25);
  transition: transform .42s cubic-bezier(.34, 1.4, .5, 1), width .42s cubic-bezier(.34, 1.4, .5, 1), scale .2s var(--ease);
}
.tabs .pastilla.lista { opacity: 1; }
.tabs.pulsado .pastilla { scale: .94; }
.tabs .tab { position: relative; z-index: 1; }
.hero .tab.active, .tabs .tab.active { background: transparent !important; box-shadow: none !important; color: var(--primary); }
.tabs.pulsado .tab.active { transform: none; box-shadow: none; }

/* ===== Galería: puntos indicadores ===== */
.puntos { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: rgba(0,0,0,.35); pointer-events: none; }
.puntos[hidden] { display: none; }
.puntos i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); transition: width .25s var(--ease), background .25s; }
.puntos i.chico { width: 4px; height: 4px; }
.puntos i.on { width: 18px; border-radius: 999px; background: #fff; }
.galeria #fotoNum { display: none; }
.galeria img { will-change: transform; }
@media (hover: none), (pointer: coarse) { .galeria .nav { display: none; } }

/* ===== Barra superior de cristal esmerilado ===== */
.topbar { background: rgba(22, 5, 4, .52); -webkit-backdrop-filter: saturate(170%) blur(14px) !important; backdrop-filter: saturate(170%) blur(14px) !important; border-bottom: 1px solid rgba(255,255,255,.14); }
.topbar.compacta { background: rgba(22, 5, 4, .6); box-shadow: 0 8px 30px rgba(30,5,4,.3); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .topbar, .topbar.compacta { background: rgba(22, 5, 4, .94); } }


/* Encabezado sin caja: la marca y "Contáctanos" flotan sobre la portada (sin color distinto ni líneas) */
.topbar, .topbar.compacta {
  position: relative; top: auto; z-index: 10; background: transparent !important; border: 0 !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; margin-bottom: -64px;
}
.hero { padding-top: calc(var(--hp, 26px) + 64px); }
@media (max-width: 640px) { .topbar, .topbar.compacta { margin-bottom: -56px; } .hero { padding-top: calc(12px + 56px); } }

/* Tipos (Casa, Departamento...) fijos arriba al hacer scroll */
.filtros { position: sticky !important; top: 8px; z-index: 40; max-height: none; overflow: visible; }
@media (max-width: 640px) { .filtros { top: 0; border-radius: 0 0 18px 18px; } }

/* Barra de tipos: se queda en su lugar (no persigue el scroll) */
.filtros-hueco { display: none; }
.filtros, .filtros.fijada { position: relative !important; top: auto !important; }
/* Puntos de la galería con gracia: el activo se estira en dorado con brillo y rebote, los vecinos crecen un poco */
.puntos { gap: 5px; padding: 6px 10px; background: rgba(0,0,0,.32); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.puntos i { position: relative; overflow: hidden; transition: width .35s cubic-bezier(.34,1.56,.64,1), height .25s, background .3s, transform .3s; }
.puntos i.on + i, .puntos i:has(+ i.on) { width: 7px; height: 7px; background: rgba(255,255,255,.8); }
.puntos i.on {
  width: 24px; height: 7px; background: linear-gradient(90deg, #f6d27a, #fff3c4 50%, #e8b54a);
  box-shadow: 0 0 10px rgba(246,210,122,.85); animation: puntoPop .5s cubic-bezier(.34,1.56,.64,1);
}
.puntos i.on::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent);
  animation: puntoBrillo 1.6s ease-in-out .3s infinite;
}
@keyframes puntoPop { 0% { width: 6px; transform: scale(.6); } 60% { transform: scale(1.25, 1.35); } 100% { transform: scale(1); } }
@keyframes puntoBrillo { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* Carrusel de fotos: la siguiente entra pegada a la actual */
.galeria .foto-entrante { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; pointer-events: none; opacity: 1 !important; }
.galeria .nav, .galeria .foto-num, .galeria .puntos { z-index: 3; }
.galeria img#fotoGrande { opacity: 1; }

/* Al tocar una propiedad: rebote + onda dorada + destellos */
.card { position: relative; }
.card.tocada { animation: tarjetaToque .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes tarjetaToque { 0% { scale: 1; } 30% { scale: .93; } 65% { scale: 1.04; } 100% { scale: 1; } }
.toque-onda {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 5; transform: scale(0); opacity: .55;
  background: radial-gradient(circle, rgba(255,226,140,.75) 0%, rgba(246,196,80,.35) 40%, transparent 70%);
  animation: ondaToque .6s ease-out forwards;
}
@keyframes ondaToque { to { transform: scale(1); opacity: 0; } }
.toque-chispa {
  position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; pointer-events: none; z-index: 6;
  background: #ffd76a; box-shadow: 0 0 8px #ffcf4a; animation: chispaToque .6s cubic-bezier(.2,.8,.3,1) forwards;
}
@keyframes chispaToque { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

/* Encabezado ordenado: marca completa (sin cortarse arriba), aire alrededor y alineada con el contenido */
.topbar, .topbar.compacta { margin-bottom: -76px; }
.topbar .topbar-inner { height: 76px; max-width: 1180px; margin: 0 auto; padding: 0 24px; align-items: center; }
.topbar .logo { height: auto; display: flex; align-items: center; }
.topbar .logo img, .topbar .logo .nombre { height: 64px !important; width: auto !important; max-height: none; margin: 0; transform: none; object-fit: contain; }
.topbar #contactoTop { box-shadow: 0 4px 14px -4px rgba(232,170,40,.55) !important; }
.hero { padding-top: calc(26px + 76px); }
@media (max-width: 640px) {
  .topbar, .topbar.compacta { margin-bottom: -64px; }
  .topbar .topbar-inner { height: 64px; padding: 0 16px; }
  .topbar .logo img, .topbar .logo .nombre { height: 52px !important; }
  .hero { padding-top: calc(10px + 64px); }
}

/* Marca movida: arriba solo queda "Contáctanos" (a la derecha); las letras van centradas en la portada */
.topbar .logo { visibility: hidden; pointer-events: none; }
.hero-nombre { display: block; height: 78px; width: auto; margin: 0 auto 10px; filter: drop-shadow(0 3px 10px rgba(0,0,0,.35)); }
.hero .escena { margin-bottom: 4px; }
.hero h1 { max-width: 640px; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  .hero-nombre { height: 62px; margin-bottom: 6px; }
  .hero h1 { font-size: 1.18rem; padding: 0 8px; }
}

/* Marca de vuelta arriba a la izquierda; sin letras repetidas en la portada; sin la frase pequeña */
.topbar .logo { visibility: visible; pointer-events: auto; }
.hero-nombre { display: none !important; }
.hero p { display: none !important; }
.hero h1 { margin-bottom: 16px !important; }
@media (max-width: 640px) {
  .topbar #contactoTop { padding: 5px 10px !important; font-size: .7rem !important; gap: 4px !important; }
  .topbar #contactoTop svg { width: 12px !important; height: 12px !important; }
  .hero h1 { margin-bottom: 12px !important; }
}

/* Computadora: marca más grande */
@media (min-width: 641px) {
  .topbar, .topbar.compacta { margin-bottom: -112px; }
  .topbar .topbar-inner { height: 112px; }
  .topbar .logo img, .topbar .logo .nombre { height: 100px !important; }
  .hero { padding-top: calc(16px + 112px) !important; }
}

/* Computadora: "Contáctanos" más grande */
@media (min-width: 641px) {
  .topbar #contactoTop { padding: 12px 24px !important; font-size: 1.05rem !important; gap: 9px !important; }
  .topbar #contactoTop svg { width: 20px !important; height: 20px !important; }
}

/* Computadora: marca y "Contáctanos" pegados a las esquinas */
@media (min-width: 641px) {
  .topbar .topbar-inner { max-width: none !important; width: 100%; padding: 0 28px !important; margin: 0 !important; }
}

/* ===== Computadora: aprovechar todo el ancho (celular queda igual) ===== */
@media (min-width: 1024px) {
  main.wrap, .footer .wrap { max-width: min(1680px, 94vw) !important; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 20px !important; }
  /* portada más baja: menos espacio vacío arriba de las propiedades */
  .hero { padding-bottom: 46px !important; }
  .hero .escena { margin-bottom: 0 !important; }
  .hero .hero-icono { width: 58px !important; height: 58px !important; margin-bottom: 6px !important; }
  .hero h1 { max-width: 980px !important; margin-bottom: 14px !important; }
  /* barra de tipos y botones Lista/Mapa más compactos y anchos */
  .filtros { max-width: 980px !important; }
  .vista { margin-top: 14px !important; margin-bottom: 4px !important; }
  .contador { margin: 6px 0 14px !important; }
}
@media (min-width: 1500px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)) !important; }
}

/* Computadora: columnas según el ancho de la pantalla */
@media (min-width: 1024px) { #grid.grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (min-width: 1280px) { #grid.grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; } }
@media (min-width: 1700px) { #grid.grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }

/* Computadora: selector y tipos más grandes, ocupando el ancho de la barra */
@media (min-width: 1024px) {
  .hero .tabs { padding: 6px; }
  .hero .tab { padding: 14px 40px !important; font-size: 1.15rem !important; }
  .filtros { max-width: none !important; padding: 14px 18px !important; }
  .tipos { gap: 14px !important; justify-content: stretch !important; }
  .tipos .tipo-chip { flex: 1 1 0; min-width: 0; padding: 16px 10px !important; font-size: 1.12rem !important; gap: 6px !important; border-radius: 16px !important; }
  .tipos .tipo-chip > :first-child, .tipos .tipo-chip .t-ico, .tipos .tipo-chip .ico { font-size: 2rem !important; line-height: 1; }
}
@media (min-width: 1024px) {
  .tipos .tipo-chip { padding: 18px 10px !important; }
  .tipos .tipo-chip .ti { font-size: 2.3rem !important; line-height: 1 !important; }
  .tipos .tipo-chip .tt, .tipos .tipo-chip .tt span { font-size: 1.15rem !important; font-weight: 700; }
}

/* Computadora: tamaño intermedio (ni muy chico ni exagerado) */
@media (min-width: 1024px) {
  .hero .tab { padding: 11px 30px !important; font-size: 1.04rem !important; }
  .filtros { max-width: 1100px !important; padding: 12px 16px !important; }
  .tipos { gap: 12px !important; }
  .tipos .tipo-chip { padding: 12px 8px !important; }
  .tipos .tipo-chip .ti { font-size: 1.65rem !important; }
  .tipos .tipo-chip .tt, .tipos .tipo-chip .tt span { font-size: 1rem !important; font-weight: 600; }
}

/* Computadora: portada más baja para que ya se asomen las propiedades al entrar */
@media (min-width: 1024px) {
  .topbar, .topbar.compacta { margin-bottom: -92px !important; }
  .topbar .topbar-inner { height: 92px !important; }
  .topbar .logo img, .topbar .logo .nombre { height: 82px !important; }
  .hero { padding-top: 70px !important; padding-bottom: 34px !important; }
  .hero .hero-icono { width: 44px !important; height: 44px !important; margin-bottom: 2px !important; }
  .hero h1 { font-size: clamp(1.4rem, 2.2vw, 1.9rem) !important; margin-bottom: 12px !important; }
  .vista { margin-top: 10px !important; margin-bottom: 0 !important; }
  .contador { margin: 4px 0 10px !important; }
}

/* ===== Portada con foto de Cuenca (cúpulas de la Catedral) bajo un velo vino de la marca ===== */
.hero {
  background:
    linear-gradient(180deg, rgba(24,6,5,.78) 0%, rgba(40,10,9,.55) 38%, rgba(30,7,6,.82) 78%, rgba(18,4,4,.95) 100%),
    radial-gradient(120% 90% at 50% 40%, rgba(127,36,32,.25), transparent 70%),
    url("imagenes/marca/portada-cuenca-1920.jpg") center 32% / cover no-repeat !important;
}
.hero .orbe { display: none !important; }
.hero h1 { text-shadow: 0 2px 18px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.5) !important; }
@media (max-width: 640px) {
  .hero { background:
    linear-gradient(180deg, rgba(24,6,5,.8) 0%, rgba(40,10,9,.58) 42%, rgba(18,4,4,.92) 100%),
    url("imagenes/marca/portada-cuenca-900.jpg") 50% 30% / cover no-repeat !important; }
}
.credito-foto { margin: 6px 0 0; font-size: .66rem; opacity: .45; letter-spacing: .02em; }
@media (min-width: 641px) { .hero { background-position: center, center, center 46% !important; } }

/* Computadora: barra de tipos compacta y centrada (sin estirarse a todo el ancho) */
@media (min-width: 1024px) {
  .filtros { width: fit-content !important; max-width: 900px !important; margin-left: auto !important; margin-right: auto !important; padding: 10px 14px !important; }
  .tipos { gap: 10px !important; justify-content: center !important; }
  .tipos .tipo-chip { flex: 0 0 auto !important; min-width: 120px; padding: 10px 18px !important; }
  .tipos .tipo-chip .ti { font-size: 1.4rem !important; }
  .tipos .tipo-chip .tt, .tipos .tipo-chip .tt span { font-size: .92rem !important; }
}

/* =========================================================
   PULIDO PROFESIONAL (celular y computadora)
   ========================================================= */
:root { --oro: #c99a3a; --oro-claro: #f3d38a; --vino: #7f2420; --tinta: #1f1a19; --gris: #6f6765; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.precio, .num-tile b, .det-precio { font-variant-numeric: tabular-nums; }

/* Tarjetas: foto uniforme, sombra suave, tipografía ordenada */
.card { border: 1px solid rgba(60,20,18,.07); background: #fff; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: #eee5e3; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img::after { content: ""; position: absolute; inset: auto 0 0 0; height: 38%; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.38), transparent); }
.card .badge { font-size: .62rem !important; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; padding: 4px 9px !important;
  border-radius: 6px !important; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.card .badge.venta { background: var(--vino) !important; color: #fff !important; }
.card .badge.renta { background: #fff !important; color: var(--vino) !important; }
.n-fotos, .con-video { position: absolute; bottom: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
  color: #fff; font: 600 .7rem/1 Inter, sans-serif; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.n-fotos { right: 9px; }
.n-fotos svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.con-video { left: 9px; background: rgba(0,0,0,.45); padding: 4px 7px; border-radius: 6px; font-size: .62rem; letter-spacing: .04em; }
.card-body { padding: 14px 15px 15px; }
.card .precio { color: var(--tinta); font-weight: 800; letter-spacing: -.01em; }
.card h3 { color: var(--tinta); font-weight: 600; line-height: 1.3; margin: 4px 0 4px; }
.card .ubic { display: flex; align-items: flex-start; gap: 4px; color: var(--gris); }
.card .ubic svg { flex: none; width: 13px; height: 13px; margin-top: 2px; fill: none; stroke: var(--vino); stroke-width: 2; }
.card .specs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(60,20,18,.08); color: #4a4240; font-size: .82rem; }
.card .specs span { display: inline-flex; align-items: center; gap: 5px; }
.card .specs svg { width: 17px; height: 17px; fill: none; stroke: var(--vino); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.card .specs b { font-weight: 700; color: var(--tinta); }
@media (hover: hover) and (pointer: fine) {
  .card { transition: box-shadow .3s, transform .3s, border-color .3s; }
  .card:hover { box-shadow: 0 18px 40px -16px rgba(60,14,12,.35); border-color: rgba(201,154,58,.45); }
  .card:hover .card-img img { transform: scale(1.05); }
}

/* Celular: tarjetas chicas, solo lo esencial y bien alineado */
@media (max-width: 640px) {
  .card-body { padding: 8px 8px 9px; }
  .card h3 { font-size: .7rem !important; font-weight: 600; margin: 2px 0 3px; }
  .card .ubic { font-size: .62rem !important; gap: 2px; }
  .card .ubic svg { width: 10px; height: 10px; margin-top: 1px; }
  .card .badge { font-size: .5rem !important; padding: 3px 6px !important; }
  .n-fotos { font-size: .6rem; bottom: 6px; right: 6px; }
  .n-fotos svg { width: 11px; height: 11px; }
  .con-video { font-size: .5rem; padding: 3px 5px; bottom: 6px; left: 6px; }
}

/* Encabezado de la lista */
.contador { font-family: Marcellus, serif; font-size: 1.05rem !important; color: var(--tinta) !important; letter-spacing: .01em; }
.contador::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--oro); vertical-align: middle; margin-right: 10px; border-radius: 2px; }

/* Pie de página profesional */
.footer { padding: 34px 0 26px !important; text-align: center; }
.pie-datos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 14px 0 6px; font-size: .84rem; color: rgba(255,255,255,.72); }
.pie-datos span + span::before, .pie-datos a + span::before { content: "·"; margin-right: 22px; opacity: .5; }
.pie-wa { color: var(--oro-claro); font-weight: 600; text-decoration: none; }
.pie-wa:hover { text-decoration: underline; }
@media (max-width: 640px) { .pie-datos { flex-direction: column; gap: 4px; } .pie-datos span + span::before, .pie-datos a + span::before { content: none; } }
.credito-foto { margin-top: 12px !important; }
/* datos de la tarjeta siempre alineados abajo, aunque los títulos tengan distinto largo */
.card { display: flex; flex-direction: column; }
.card-body { flex: 1; display: flex; flex-direction: column; }
.card .specs { margin-top: auto; }
.card .ubic { margin-bottom: 10px; }
@media (max-width: 640px) { .card .ubic { margin-bottom: 0; } }
@media (max-width: 640px) { .card .specs { display: none !important; } .card-img { aspect-ratio: 1 / 1; } }

/* =========================================================
   EFECTOS EN TODA LA PÁGINA (elegantes y livianos: solo transform/opacity)
   ========================================================= */

/* 1. Portada: la foto de Cuenca se acerca lentamente (efecto cine) */
.hero { background: transparent !important; }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.hero::before { z-index: -2; background: url("imagenes/marca/portada-cuenca-1920.jpg") center 46% / cover no-repeat;
  animation: kenBurns 26s ease-in-out infinite alternate; will-change: transform; }
.hero::after { z-index: -1;
  background: linear-gradient(180deg, rgba(24,6,5,.8) 0%, rgba(40,10,9,.55) 40%, rgba(30,7,6,.84) 80%, rgba(18,4,4,.96) 100%),
              radial-gradient(120% 90% at 50% 40%, rgba(127,36,32,.28), transparent 70%); }
@media (max-width: 640px) { .hero::before { background-image: url("imagenes/marca/portada-cuenca-900.jpg"); background-position: 50% 30%; } }
@keyframes kenBurns { from { transform: scale(1.02) translate3d(0,0,0); } to { transform: scale(1.14) translate3d(-1.5%, -2%, 0); } }

/* 2. Frase de portada: palabras que suben una tras otra + línea dorada que se dibuja */
.hero h1 .pal { display: inline-block; opacity: 0; transform: translateY(14px); filter: blur(4px);
  animation: palabra .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.15s + var(--p) * .07s); }
@keyframes palabra { to { opacity: 1; transform: none; filter: none; } }
.hero h1::after { content: ""; display: block; width: 90px; height: 2px; margin: 12px auto 0; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--oro-claro), var(--oro), transparent); transform: scaleX(0);
  animation: lineaOro 1s cubic-bezier(.2,.8,.2,1) 1.1s forwards, brilloLinea 3.5s ease-in-out 2.2s infinite; }
@keyframes lineaOro { to { transform: scaleX(1); } }
@keyframes brilloLinea { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* 3. Marca, botón, selector y tipos entran escalonados */
.topbar .logo { animation: entraIzq .8s cubic-bezier(.2,.8,.2,1) both; }
.topbar #contactoTop { animation: entraDer .8s cubic-bezier(.2,.8,.2,1) .1s both, palpitaSuave 2.6s ease-in-out 1.4s infinite !important; }
@keyframes entraIzq { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes entraDer { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.hero .tabs { animation: subeSuave .8s cubic-bezier(.2,.8,.2,1) .7s both; }
.filtros { animation: subeSuave .8s cubic-bezier(.2,.8,.2,1) .85s both; }
.tipos .tipo-chip { animation: chipEntra .55s cubic-bezier(.34,1.56,.64,1) both; }
.tipos .tipo-chip:nth-child(1) { animation-delay: 1s; } .tipos .tipo-chip:nth-child(2) { animation-delay: 1.07s; }
.tipos .tipo-chip:nth-child(3) { animation-delay: 1.14s; } .tipos .tipo-chip:nth-child(4) { animation-delay: 1.21s; }
.tipos .tipo-chip:nth-child(5) { animation-delay: 1.28s; } .tipos .tipo-chip:nth-child(6) { animation-delay: 1.35s; }
@keyframes subeSuave { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes chipEntra { from { opacity: 0; transform: translateY(12px) scale(.9); } to { opacity: 1; transform: none; } }

/* 4. Tipos: al pasar/tocar se elevan con brillo dorado y el ícono rebota */
.tipos .tipo-chip { transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s, border-color .25s; }
.tipos .tipo-chip:active { transform: scale(.94); }
.tipos .tipo-chip .ti { display: inline-block; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
@media (hover: hover) and (pointer: fine) {
  .tipos .tipo-chip:hover { transform: translateY(-3px); box-shadow: 0 10px 22px -10px rgba(201,154,58,.7); border-color: rgba(201,154,58,.6); }
  .tipos .tipo-chip:hover .ti { transform: translateY(-3px) scale(1.15) rotate(-6deg); }
}

/* 5. Tarjetas: destello de luz que cruza la foto al aparecer (y al pasar el mouse) */
.card-img::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.38) 50%, transparent 65%); transform: translateX(-120%); }
.card.visible .card-img::before { animation: destello 1.1s ease-out calc(.25s + var(--i, 0) * .08s) 1; }
@media (hover: hover) and (pointer: fine) { .card:hover .card-img::before { animation: destello .9s ease-out 1; } }
@keyframes destello { to { transform: translateX(120%); } }
.card .badge.venta, .card .badge.renta { position: relative; overflow: hidden; }
.card .badge.venta::after, .card .badge.renta::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%); transform: translateX(-120%);
  animation: destello 1.2s ease-in-out 3s infinite; animation-delay: calc(2s + var(--i, 0) * .3s); }
.card .precio { transition: color .3s; }
@media (hover: hover) and (pointer: fine) { .card:hover .precio { color: var(--vino); } .card:hover .specs svg { transform: translateY(-2px); } .card .specs svg { transition: transform .3s; } }

/* 6. Encabezado de la lista: la línea dorada crece */
.contador::before { transform-origin: left; animation: lineaOro .8s cubic-bezier(.2,.8,.2,1) .4s both; }

/* 7. Elementos que aparecen al bajar (pie de página, etc.) */
.aparece { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); }
.aparece.visto { opacity: 1; transform: none; }
.footer img { transition: transform .6s cubic-bezier(.34,1.56,.64,1); }
.footer .visto img { animation: logoPie 1.2s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes logoPie { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* 8. Barra dorada de progreso al hacer scroll */
#progreso { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--vino), var(--oro), var(--oro-claro)); box-shadow: 0 0 10px rgba(201,154,58,.6); }

/* 9. Ficha de la propiedad: todo entra escalonado */
#detalle[open] .det-head { animation: subeSuave .55s cubic-bezier(.2,.8,.2,1) .1s both; }
#detalle[open] .sec-titulo { animation: subeSuave .55s cubic-bezier(.2,.8,.2,1) .2s both; }
#detalle[open] .num-tile { animation: chipEntra .55s cubic-bezier(.34,1.56,.64,1) both; }
#detalle[open] .num-tile:nth-child(1) { animation-delay: .25s; } #detalle[open] .num-tile:nth-child(2) { animation-delay: .33s; } #detalle[open] .num-tile:nth-child(3) { animation-delay: .41s; }
#detalle[open] .lista-ok li { animation: subeSuave .45s cubic-bezier(.2,.8,.2,1) both; }
#detalle[open] .lista-ok li:nth-child(1) { animation-delay: .3s; } #detalle[open] .lista-ok li:nth-child(2) { animation-delay: .35s; }
#detalle[open] .lista-ok li:nth-child(3) { animation-delay: .4s; } #detalle[open] .lista-ok li:nth-child(4) { animation-delay: .45s; }
#detalle[open] .lista-ok li:nth-child(5) { animation-delay: .5s; } #detalle[open] .lista-ok li:nth-child(n+6) { animation-delay: .55s; }
#detalle[open] .condiciones, #detalle[open] .destacados { animation: subeSuave .55s cubic-bezier(.2,.8,.2,1) .18s both; }
#detalle[open] .sec-titulo::after { transform-origin: left; animation: lineaOro .9s cubic-bezier(.2,.8,.2,1) .35s both; }

/* 10. Botones: brillo al pasar y "hundido" al tocar */
.vista button, .btn-video, .pie-wa, .btn-preguntar { transition: transform .2s cubic-bezier(.34,1.56,.64,1), filter .2s; }
.vista button:active, .btn-video:active, .btn-preguntar:active { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) { .vista button:hover, .btn-preguntar:hover { filter: brightness(1.08); transform: translateY(-1px); } }
.wa-float { animation: entraDer .8s cubic-bezier(.2,.8,.2,1) 1.4s both, latidoWa 2.8s ease-in-out 2.5s infinite; }
@keyframes latidoWa { 0%,100% { box-shadow: 0 6px 18px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.45); } 50% { box-shadow: 0 6px 18px rgba(37,211,102,.45), 0 0 0 12px rgba(37,211,102,0); } }

/* Quien tiene activado "reducir movimiento" en su teléfono ve todo quieto */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero h1 .pal, .aparece { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero h1::after { transform: none !important; }
}

/* Aviso de bajar: solo las flechas (sin el texto "DESLIZA PARA VER MÁS") */
.desliza .d-txt { display: none !important; }
.desliza .d-flechas { margin-top: 0 !important; }

/* Tarjetas: aparición más rápida al bajar (máximo ~0.3 s de espera) y con fundido también en computadora */
.card {
  transition: opacity .45s var(--ease), translate .6s var(--spring), scale .6s var(--spring), rotate .6s var(--spring), transform .18s ease-out, box-shadow .3s, border-color .3s !important;
  transition-delay: calc(min(var(--i, 0), 6) * 50ms), calc(min(var(--i, 0), 6) * 50ms), calc(min(var(--i, 0), 6) * 50ms), calc(min(var(--i, 0), 6) * 50ms), 0s, 0s, 0s !important;
}
.grid.saliendo .card { transition: opacity .2s ease-in, translate .2s ease-in, scale .2s ease-in, rotate .2s ease-in !important; transition-delay: 0s !important; }
.card.visible .card-img::before { animation-delay: calc(.2s + min(var(--i, 0), 6) * .05s) !important; }

/* Tipos y selector: entrada rápida (casi sin espera), también cuando se cambia de Todas / Venta / Renta */
.hero .tabs { animation-delay: .2s !important; animation-duration: .5s !important; }
.filtros { animation-delay: .25s !important; animation-duration: .5s !important; }
.tipos .tipo-chip { animation-duration: .4s !important; animation-delay: calc(.05s * var(--n, 0)) !important; }
.tipos .tipo-chip:nth-child(1) { --n: 0; } .tipos .tipo-chip:nth-child(2) { --n: 1; } .tipos .tipo-chip:nth-child(3) { --n: 2; }
.tipos .tipo-chip:nth-child(4) { --n: 3; } .tipos .tipo-chip:nth-child(5) { --n: 4; } .tipos .tipo-chip:nth-child(6) { --n: 5; }

/* Flecha "hay más abajo": fija abajo al centro, sin saltos */
#desliza.desliza { position: fixed !important; top: auto !important; left: 50% !important; bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%) !important; z-index: 30; padding: 6px 10px !important; background: none !important; border: 0 !important;
  transition: opacity .35s ease, visibility .35s; }
#desliza.desliza.oculto { opacity: 0 !important; visibility: hidden; pointer-events: none; }
#desliza.desliza.espera { opacity: 1; }
body > #desliza.desliza { display: flex !important; flex-direction: column; align-items: center; translate: none !important; }
body > #desliza.desliza.oculto { display: flex !important; }
/* Flecha más discreta */
body > #desliza.desliza:not(.oculto) { opacity: .55 !important; filter: drop-shadow(0 1px 1px rgba(90,45,0,.4)) drop-shadow(0 0 4px rgba(255,210,30,.35)) !important; }

/* ===== Portada animada: fotos de Cuenca que cambian con fundido y acercamiento lento ===== */
.hero::before { display: none !important; }
.hero-fondo { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: #1a0605; pointer-events: none; }
.hero-fondo .diap { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; opacity: 0;
  transform: scale(1.02); transition: opacity 1.6s ease-in-out; will-change: opacity, transform; }
.hero-fondo .diap.on { opacity: 1; animation: acercar 9s ease-out forwards; }
@keyframes acercar { from { transform: scale(1.02) translate3d(0,0,0); } to { transform: scale(1.13) translate3d(-1.2%, -1.5%, 0); } }
.credito-foto { font-size: .6rem !important; line-height: 1.5; max-width: 760px; margin-left: auto !important; margin-right: auto !important; }
@media (prefers-reduced-motion: reduce) { .hero-fondo .diap.on { animation: none !important; } }

/* ===== Portada de la catedral con mucha vida ===== */
.hero-fondo { will-change: transform; }
.hero-fondo .diap.on { animation: catedralVida 16s ease-in-out infinite alternate !important; transform-origin: 50% 70%; }
@keyframes catedralVida {
  0%   { transform: scale(1.03) translate3d(0, 0, 0); }
  50%  { transform: scale(1.16) translate3d(-1.8%, -2.2%, 0); }
  100% { transform: scale(1.26) translate3d(1.6%, -3.4%, 0); }
}
/* brillo dorado que "respira" sobre las cúpulas */
.hero-brillo { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(38% 46% at 50% 38%, rgba(255,214,120,.38), transparent 70%),
              radial-gradient(22% 30% at 18% 44%, rgba(255,200,110,.24), transparent 70%),
              radial-gradient(22% 30% at 84% 52%, rgba(255,200,110,.22), transparent 70%);
  animation: respira 5.5s ease-in-out infinite; }
@keyframes respira { 0%,100% { opacity: .25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
/* rayo de luz que cruza la portada cada cierto tiempo */
.hero-rayo { position: absolute; top: -20%; bottom: -20%; width: 34%; left: -45%; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(100deg, transparent 0%, rgba(255,236,190,.0) 20%, rgba(255,236,190,.34) 50%, rgba(255,236,190,0) 80%, transparent 100%);
  transform: skewX(-18deg); animation: rayoCruza 9s ease-in-out infinite 1.5s; }
@keyframes rayoCruza { 0% { left: -45%; opacity: 0; } 12% { opacity: 1; } 55% { left: 115%; opacity: 1; } 56%, 100% { left: 115%; opacity: 0; } }
/* polvo dorado que sube y titila */
.hero-polvo { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-polvo i { position: absolute; bottom: -12px; width: var(--t); height: var(--t); border-radius: 50%;
  background: radial-gradient(circle, #ffe9a8 0%, rgba(255,205,100,.85) 45%, transparent 72%);
  opacity: 0; animation: sube var(--d) linear var(--r) infinite; will-change: transform, opacity; }
@keyframes sube { 0% { transform: translate3d(0,0,0) scale(.6); opacity: 0; } 12% { opacity: var(--o); } 50% { transform: translate3d(calc(var(--x) * .5), -160px, 0) scale(1); }
  85% { opacity: calc(var(--o) * .6); } 100% { transform: translate3d(var(--x), -340px, 0) scale(.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-brillo, .hero-rayo, .hero-polvo { display: none !important; } }

/* Computadora: portada menos recortada (foto más baja y con menos acercamiento, enfocada en las cúpulas) */
@media (min-width: 1024px) {
  .hero { padding-bottom: 96px !important; }
  .hero-fondo .diap { background-position: 50% 30% !important; }
  .hero-fondo .diap.on { animation: catedralVidaPC 18s ease-in-out infinite alternate !important; transform-origin: 50% 40%; }
  @keyframes catedralVidaPC {
    0%   { transform: scale(1) translate3d(0, 0, 0); }
    100% { transform: scale(1.07) translate3d(-0.8%, -1%, 0); }
  }
}

/* Computadora: portada más grande y foto nítida (se ve la catedral completa, sin recorte exagerado) */
@media (min-width: 1024px) {
  .hero { display: flex !important; align-items: center; justify-content: center; min-height: clamp(450px, 31vw, 560px) !important; padding: 96px 0 56px !important; }
  .hero .hero-contenido { width: 100%; }
  .hero-fondo .diap { background-position: 50% 36% !important; }
  .hero-fondo .diap.on { animation: catedralVidaPC2 20s ease-in-out infinite alternate !important; transform-origin: 50% 45%; }
  @keyframes catedralVidaPC2 { 0% { transform: scale(1) translate3d(0,0,0); } 100% { transform: scale(1.045) translate3d(-.5%, -.6%, 0); } }
  .hero .hero-icono { width: 54px !important; height: 54px !important; }
}

/* ===== Computadora: portada baja (como en el celular), texto a la izquierda y la catedral completa a la derecha ===== */
@media (min-width: 1024px) {
  .hero { min-height: clamp(330px, 36vh, 390px) !important; padding: 96px 0 44px !important; background: #1a0605 !important; display: flex !important; align-items: center; }
  .hero::after { background: linear-gradient(90deg, rgba(26,6,5,.96) 0%, rgba(26,6,5,.55) 40%, rgba(26,6,5,.15) 70%, rgba(26,6,5,.3) 100%) !important; }
  .hero-fondo { left: 34% !important; right: 0; background: transparent !important;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32%); mask-image: linear-gradient(90deg, transparent 0, #000 32%); }
  .hero-fondo .diap { background-position: 50% 32% !important; }
  .hero .hero-contenido { display: block !important; text-align: left !important; padding-left: 6vw !important; padding-right: 0 !important; max-width: none !important; margin: 0 !important; }
  .hero .escena { display: none !important; }
  .hero h1 { text-align: left !important; max-width: 600px !important; margin: 0 0 20px !important; font-size: clamp(1.7rem, 2.3vw, 2.3rem) !important; line-height: 1.22 !important; }
  .hero h1::after { margin: 14px 0 0 !important; }
  .hero .tabs { margin: 0 !important; }
  .hero-polvo, .hero-brillo, .hero-rayo { left: 0; }
}

/* Computadora: vuelve el velo vino sobre toda la foto (mismo ambiente oscuro y cálido del celular) */
@media (min-width: 1024px) {
  .hero::after {
    background:
      linear-gradient(90deg, rgba(26,6,5,.97) 0%, rgba(26,6,5,.72) 32%, rgba(26,6,5,.18) 70%, rgba(26,6,5,.12) 100%),
      linear-gradient(180deg, rgba(40,10,9,.62) 0%, rgba(110,30,26,.34) 45%, rgba(24,6,5,.82) 100%),
      radial-gradient(90% 120% at 70% 40%, rgba(127,36,32,.30), transparent 70%) !important;
  }
}

/* Computadora: frase y selector otra vez en el CENTRO; la foto ocupa todo el ancho de la portada baja */
@media (min-width: 1024px) {
  .hero-fondo { left: 0 !important; -webkit-mask-image: none !important; mask-image: none !important; }
  .hero-fondo .diap { background-position: 50% 28% !important; }
  .hero .hero-contenido { text-align: center !important; padding-left: 0 !important; margin: 0 auto !important; display: flex !important; flex-direction: column; align-items: center; }
  .hero h1 { text-align: center !important; max-width: 900px !important; margin: 0 auto 18px !important; }
  .hero h1::after { margin: 14px auto 0 !important; }
  .hero .tabs { margin: 0 auto !important; }
  .hero::after {
    background:
      radial-gradient(60% 90% at 50% 50%, rgba(22,5,4,.78) 0%, rgba(22,5,4,.45) 55%, rgba(22,5,4,.1) 100%),
      linear-gradient(180deg, rgba(40,10,9,.55) 0%, rgba(110,30,26,.3) 45%, rgba(24,6,5,.82) 100%) !important;
  }
}

/* Computadora: el logo dorado vuelve al centro, sobre la frase */
@media (min-width: 1024px) {
  .hero .escena { display: block !important; margin: 0 auto 6px !important; }
  .hero .hero-icono { width: 48px !important; height: 48px !important; margin: 0 auto !important; }
  .hero { padding-top: 88px !important; padding-bottom: 40px !important; min-height: clamp(360px, 40vh, 430px) !important; }
}

/* Computadora: foto con sus colores naturales (sin el velo café); solo una sombra muy suave para poder leer */
@media (min-width: 1024px) {
  .hero::after {
    background:
      radial-gradient(55% 80% at 50% 52%, rgba(0,0,0,.34) 0%, rgba(0,0,0,.14) 60%, rgba(0,0,0,0) 100%),
      linear-gradient(180deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.18) 100%) !important;
  }
  .hero h1 { text-shadow: 0 2px 14px rgba(0,0,0,.7), 0 1px 3px rgba(0,0,0,.6) !important; }
}

/* Celular: foto con sus colores naturales (sin velo café), con sombra suave para leer */
@media (max-width: 1023px) {
  .hero::after {
    background:
      radial-gradient(75% 70% at 50% 55%, rgba(0,0,0,.34) 0%, rgba(0,0,0,.14) 65%, rgba(0,0,0,0) 100%),
      linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 32%, rgba(0,0,0,.2) 100%) !important;
  }
  .hero h1 { text-shadow: 0 2px 14px rgba(0,0,0,.7), 0 1px 3px rgba(0,0,0,.6) !important; }
}

/* Que el selector y las letras de arriba se lean bien sobre la foto clara */
.hero .tabs { background: rgba(20,6,5,.55) !important; border-color: rgba(255,255,255,.28) !important; }
.hero .tab:not(.active) { color: #fff !important; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.topbar .logo img { filter: drop-shadow(0 2px 6px rgba(0,0,0,.65)); }

/* Letras y logo dorados con más brillo y más oro */
.topbar .logo img {
  filter: brightness(1.45) saturate(1.45) contrast(1.08) drop-shadow(0 0 7px rgba(255,200,70,.65)) drop-shadow(0 2px 5px rgba(0,0,0,.7)) !important;
}
.hero .hero-icono {
  filter: brightness(1.5) saturate(1.5) contrast(1.1) drop-shadow(0 0 10px rgba(255,200,70,.75)) drop-shadow(0 2px 5px rgba(0,0,0,.6)) !important;
}

@media (min-width: 1024px) { .hero-fondo .diap { background-position: 50% 52% !important; } }

@media (max-width: 1023px) { .hero-fondo .diap { background-position: 50% 38% !important; } }
