/* Tarjeta digital pública. Diseñada primero para celular; en computadora se ve como una tarjeta centrada. */
body {
  background: var(--navy);
  background-image: radial-gradient(circle at 20% 0%, #24427E 0, transparent 45%), radial-gradient(circle at 100% 100%, #0E1D3D 0, transparent 50%);
  min-height: 100vh;
  padding: 0;
}
@media (min-width: 560px) {
  body { padding: 28px 16px; }
}
.card {
  max-width: 480px; margin: 0 auto; background: var(--bg); min-height: 100vh; overflow: hidden;
}
@media (min-width: 560px) {
  .card { min-height: 0; border-radius: 28px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }
}
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }

/* ---------- Encabezado: foto sin fondo sobre arco azul ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: end; background: linear-gradient(180deg, #fff 0, #fff 78%, var(--bg) 100%); color: var(--fg); padding: 18px 0 0 0; min-height: 300px; }
.hero-photo { position: relative; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; min-height: 280px; }
.hero-photo::before { content: ""; position: absolute; left: 10%; right: 4%; bottom: 0; top: 34px; background: var(--navy); border-radius: 999px 999px 0 0; }
.hero-photo::after { content: ""; position: absolute; left: 50%; top: 14px; width: 54px; height: 27px; translate: -40% 0; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50'%3E%3Cpolygon fill='%23FDD100' points='50,0 100,46 76,46 50,22 24,46 0,46'/%3E%3C/svg%3E"); }
.hero-photo img { position: relative; z-index: 1; width: 100%; max-height: 300px; object-fit: contain; object-position: bottom; }
.hero-info { padding: 0 18px 22px 8px; display: flex; flex-direction: column; gap: 6px; justify-content: flex-end; }
.hero-logo { width: 104px; margin-bottom: 8px; }
.hero-info small { font-size: 10.5px; letter-spacing: .2em; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.hero-info h1 { font-size: 27px; font-weight: 800; color: var(--navy); line-height: 1.05; }
.hero-info .biz { font-size: 13px; color: var(--muted); line-height: 1.3; }
.socials { display: flex; gap: 8px; margin-top: 8px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; color: #fff; }
.socials a:hover { background: var(--navy-2); }
.socials svg { width: 18px; height: 18px; }

/* ---------- Bloques ---------- */
.block { padding: 22px 18px 6px; display: grid; gap: 12px; }
.frase { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.15; }
.frase em { font-style: normal; color: var(--navy); background: linear-gradient(transparent 62%, var(--sun) 62% 92%, transparent 92%); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--sun); color: var(--sun-ink); font-weight: 800; font-size: 13px; border-radius: 999px; padding: 5px 12px; }
.badge.soft { background: var(--navy-soft); color: var(--navy); }
.badge svg { width: 15px; height: 15px; }

.actions { display: grid; gap: 10px; }
.action { display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; border-radius: 18px; padding: 10px 16px 10px 10px; text-decoration: none; min-height: 64px; }
.action .tile { width: 44px; height: 44px; border-radius: 13px; background: #fff; color: var(--navy); display: grid; place-items: center; flex: none; }
.action .tile svg { width: 22px; height: 22px; }
.action b { display: block; font-size: 16px; }
.action span { font-size: 13px; opacity: .8; }
.action.wa .tile { color: var(--wa); }
.action.light { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line); }
.action.light .tile { background: var(--navy-soft); }
.action .go { margin-left: auto; opacity: .7; }

.sec-title { text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .3em; color: var(--muted); text-transform: uppercase; padding-top: 10px; }
.sec-sub { text-align: center; font-size: 14px; color: var(--muted); margin-top: -6px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 18px 4px; margin: 0 -18px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }

/* ---------- Propiedades ---------- */
.props { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 18px 10px; margin: 0 -18px; scrollbar-width: none; }
.props::-webkit-scrollbar { display: none; }
.prop { flex: 0 0 82%; scroll-snap-align: center; background: var(--surface); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); text-align: left; border: 0; padding: 0; cursor: pointer; display: grid; }
.props.single .prop { flex-basis: 100%; }
.prop-img { position: relative; aspect-ratio: 4 / 3; background: var(--navy-soft); }
.prop-img img { width: 100%; height: 100%; object-fit: cover; }
.prop-img .sello { position: absolute; top: 12px; left: 12px; }
.prop-img .price { position: absolute; right: 12px; bottom: 12px; background: var(--navy); color: #fff; font-weight: 800; border-radius: 999px; padding: 5px 12px; font-size: 15px; }
.prop-img .price small, .big-price small { font-size: .62em; font-weight: 700; opacity: .85; margin-right: 3px; }
.no-foto { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: linear-gradient(160deg, var(--navy) 0, var(--navy-2) 100%); color: #fff; font-weight: 700; font-size: 14px; }
.no-foto svg { width: 64px; height: 32px; display: block; margin: 0 auto 8px; }
.prop-img .count { position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; border-radius: 999px; padding: 2px 9px; }
.prop.vendida .prop-img img { filter: grayscale(.6); }
.prop-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.prop-body h3 { font-size: 17px; }
.prop-body .meta { font-size: 13.5px; color: var(--muted); }
.specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.spec { font-size: 12.5px; font-weight: 600; background: var(--bg); border-radius: 999px; padding: 3px 10px; }
.spec.y { background: var(--sun-soft); }
.empty { background: var(--surface); border-radius: 18px; padding: 22px; text-align: center; color: var(--muted); }

/* Detalle de propiedad */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; scrollbar-width: none; background: var(--navy-soft); }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; object-fit: cover; }
.gal-wrap { position: relative; }
.gal-nav { position: absolute; top: 50%; translate: 0 -50%; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--navy); display: grid; place-items: center; cursor: pointer; }
.gal-nav.l { left: 8px; } .gal-nav.r { right: 8px; }
.gal-nav svg { width: 18px; height: 18px; }
.gal-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; border-radius: 999px; padding: 2px 9px; }
.detail { display: grid; gap: 12px; margin-top: 14px; }
.detail .big-price { font-size: 28px; font-weight: 800; color: var(--navy); }
.detail .desc { color: var(--fg); white-space: pre-line; }
.feat { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.feat li { display: flex; gap: 9px; align-items: start; font-size: 14.5px; }
.feat li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23152850' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.feat.two { grid-template-columns: 1fr 1fr; column-gap: 12px; }
.subt { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Servicios ---------- */
.lines { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.line { background: var(--surface); border-radius: 16px; padding: 14px; display: grid; gap: 4px; align-content: start; text-align: left; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line); }
.line b { font-size: 14.5px; line-height: 1.25; color: var(--navy); }
.line span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.line .ask { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: var(--wa); }
.tramites { display: grid; gap: 8px; }
.tram { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; padding: 12px 14px; border: 0; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line); }
.tram div { flex: 1; min-width: 0; }
.tram b { font-size: 14.5px; display: block; line-height: 1.3; }
.tram small { font-size: 12.5px; color: var(--muted); display: block; }
.tram .p { background: var(--sun); color: var(--sun-ink); font-weight: 800; border-radius: 999px; padding: 4px 11px; font-size: 14px; white-space: nowrap; }
.aviso { background: var(--sun-soft); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--navy); text-align: center; }

/* ---------- Confianza, QR, pie ---------- */
.trust { background: var(--navy); color: #fff; border-radius: 20px; padding: 16px; display: grid; gap: 10px; font-size: 14px; }
.trust div { display: flex; gap: 10px; align-items: start; }
.trust svg { width: 20px; height: 20px; color: var(--sun); flex: none; margin-top: 1px; }
.trust b { display: block; }
.trust span { color: #C9D2E6; }
.qr-box { background: var(--surface); border-radius: 20px; padding: 18px; display: grid; gap: 12px; justify-items: center; text-align: center; }
#qr { width: 168px; height: 168px; padding: 10px; background: #fff; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
#qr img, #qr canvas { width: 100% !important; height: 100% !important; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.foot { padding: 22px 18px 34px; display: grid; gap: 6px; text-align: center; font-size: 13px; color: var(--muted); }
.foot b { color: var(--navy); }
.foot a { color: var(--navy); }
.demo-flag { background: var(--sun); color: var(--sun-ink); text-align: center; font-size: 12.5px; font-weight: 700; padding: 6px 12px; }


/* ---------- Computadora: la tarjeta se abre a lo ancho ---------- */
.tram.top { box-shadow: inset 0 0 0 2px var(--sun); }
.tram .tag { display: inline-block; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--navy); color: #fff; border-radius: 6px; padding: 2px 7px; margin-bottom: 4px; }
.tram .p.q { background: var(--navy-soft); color: var(--navy); }
.action u { text-decoration: underline; text-underline-offset: 2px; }
.link-wa { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--wa); padding: 6px; }
.link-wa svg { width: 18px; height: 18px; }
/* Vende tu casa */
.vende { display: grid; gap: 12px; }
.vende-card { display: grid; gap: 6px; background: var(--navy); color: #fff; border-radius: 20px; padding: 18px; text-decoration: none; position: relative; overflow: hidden; }
.vende-card::after { content: ""; position: absolute; right: -18px; top: -10px; width: 110px; height: 55px; background: var(--sun); clip-path: polygon(50% 0, 100% 92%, 76% 92%, 50% 44%, 24% 92%, 0 92%); opacity: .18; }
.vende-card b { font-size: 18px; line-height: 1.25; padding-right: 40px; }
.vende-card .nota { color: var(--sun); font-weight: 800; font-size: 14px; }
.vende-card span { font-size: 14px; color: #D3DAEA; }
.vende-card .btn { justify-self: start; margin-top: 6px; color: var(--sun-ink); font-size: 15px; }
@media (min-width: 960px) {
  body { padding: 36px 24px; }
  .card { max-width: 1140px; display: grid; grid-template-columns: 1fr 1fr; align-items: start; border-radius: 32px; }
  .card > * { grid-column: 1 / -1; }
  .card > .sec-trust { grid-column: 1; }
  .card > .sec-share { grid-column: 2; }
  .demo-flag { border-radius: 32px 32px 0 0; }

  .hero { grid-template-columns: 420px 1fr; min-height: 420px; padding-top: 28px; background: linear-gradient(180deg, #fff 0, #fff 82%, var(--bg) 100%); }
  .hero-photo { min-height: 400px; }
  .hero-photo::before { left: 14%; right: 6%; top: 52px; }
  .hero-photo::after { top: 18px; width: 72px; height: 36px; }
  .hero-photo img { max-height: 420px; }
  .hero-info { padding: 0 56px 56px 40px; gap: 10px; }
  .hero-logo { width: 150px; margin-bottom: 14px; }
  .hero-info small { font-size: 12px; }
  .hero-info h1 { font-size: 48px; }
  .hero-info .biz { font-size: 17px; }
  .socials a { width: 44px; height: 44px; }

  .block { padding: 36px 56px 8px; gap: 16px; }
  .sec-intro { grid-template-columns: 1fr; }
  .frase { font-size: 34px; text-align: center; }
  .badges { justify-content: center; }
  .actions { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .action { min-height: 76px; }

  .sec-title { font-size: 13px; }
  .filters { margin: 0; padding: 2px 0 4px; justify-content: center; flex-wrap: wrap; overflow: visible; }

  .props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; overflow: visible; margin: 0; padding: 4px 0 12px; scroll-snap-type: none; }
  .prop, .props.single .prop { flex: none; max-width: none; transition: transform .15s, box-shadow .15s; }
  .prop:hover { transform: translateY(-3px); box-shadow: 0 26px 50px -26px rgba(21, 40, 80, .55); }
  .props.single { grid-template-columns: minmax(0, 420px); justify-content: center; }

  .lines { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .line { padding: 18px; }
  .line:hover, .tram:hover { box-shadow: inset 0 0 0 2px var(--navy); }
  .tramites { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .vende { grid-template-columns: 1fr 1fr; gap: 16px; }
  .vende-card { padding: 24px; }
  .vende-card:hover { transform: translateY(-2px); }
  .aviso { max-width: 520px; margin: 0 auto; }

  .sec-trust, .sec-share { padding-top: 36px; }
  .sec-trust { padding-right: 12px; }
  .sec-share { padding-left: 12px; }
  .trust, .qr-box { height: 100%; }
  .trust { padding: 24px; align-content: center; }
  .foot { padding: 30px 56px 40px; }

  /* Ficha de casa: fotos a la izquierda, datos a la derecha */
  .modal { max-width: 640px; padding: 24px; }
  .modal.prop-modal { max-width: 1080px; display: grid; grid-template-columns: 1.25fr 1fr; column-gap: 28px; align-items: start; }
  .prop-modal .modal-head { grid-column: 1 / -1; }
  .prop-modal .gal-wrap, .prop-modal > .prop-img { position: sticky; top: 0; }
  .prop-modal .detail { margin-top: 0; }
  .prop-modal .feat.two { grid-template-columns: 1fr; }
}
@media (min-width: 1200px) {
  .prop-modal .feat.two { grid-template-columns: 1fr 1fr; }
}

/* Botón para regresar al panel (solo cuando Claudia viene de su panel) */
.volver-panel { position: fixed; z-index: 90; left: 50%; translate: -50% 0; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 6px; background: var(--navy); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none; padding: 12px 20px; border-radius: 999px; box-shadow: 0 12px 30px -8px rgba(12,20,40,.55); white-space: nowrap; }
.volver-panel svg { width: 18px; height: 18px; }

.foot .credito { margin-top: 10px; font-size: 12px; opacity: .65; text-decoration: none; color: inherit; }
.foot .credito:hover { opacity: 1; text-decoration: underline; }
