:root {
  --green: #1f7a4d;
  --green-dark: #155c39;
  --ink: #16201b;
  --muted: #6b7770;
  --line: #e4e9e5;
  --bg: #f6f8f6;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 50, 35, 0.08);
  --max: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -0.5px; }
.logo .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--green); color: #fff;
  display: grid; place-items: center; font-size: 17px; font-weight: 800;
}
.logo .name { color: var(--ink); }
.logo .name b { color: var(--green); }
.header-cta {
  font-size: 14px; font-weight: 600; color: var(--green);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #1f7a4d 0%, #155c39 100%);
  color: #fff; padding: 56px 0 48px;
}
.hero h1 { font-size: 34px; line-height: 1.2; letter-spacing: -0.5px; max-width: 620px; }
.hero p { margin-top: 12px; opacity: 0.92; max-width: 520px; font-size: 16px; }

/* Search bar */
.search {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.search .field { display: flex; flex-direction: column; gap: 6px; }
.search label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.search select, .search input {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; font-size: 14px; background: #fff; color: var(--ink);
  width: 100%;
}
.btn {
  background: var(--green); color: #fff; border: none;
  border-radius: 10px; padding: 12px 22px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background 0.15s ease;
  height: 44px; white-space: nowrap;
}
.btn:hover { background: var(--green-dark); }
.btn.block { width: 100%; }

/* Toggle venta/arriendo */
.toggle { display: inline-flex; background: rgba(255,255,255,0.15); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.toggle button {
  border: none; background: transparent; color: #fff; font-weight: 600;
  padding: 8px 18px; border-radius: 7px; cursor: pointer; font-size: 14px;
}
.toggle button.active { background: #fff; color: var(--green); }

/* Listing section */
.listing { padding: 40px 0 64px; }
.listing-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.listing-head h2 { font-size: 20px; }
.count { color: var(--muted); font-size: 14px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* Card */
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(20,50,35,0.14); }
.card .photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #dde4df; }
.card .photo.vert { aspect-ratio: 3 / 4; }
.card .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--green); color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 11px; border-radius: 20px; text-transform: capitalize;
}
.badge.star { right: 12px; left: auto; background: #f0a500; }
.card .body { padding: 15px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .price { font-size: 19px; font-weight: 800; color: var(--green-dark); }
.card .title { font-size: 15px; font-weight: 600; }
.card .zone { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.card .specs { display: flex; gap: 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }
.card .specs span { display: flex; align-items: center; gap: 4px; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* Footer */
.site-footer { background: var(--ink); color: #cdd6d0; padding: 36px 0; font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-footer a:hover { color: #fff; }

/* Property detail page */
.detail { padding: 28px 0 64px; }
.back { color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; border-radius: var(--radius); overflow: hidden; }
.gallery .main { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #dde4df; }
.gallery .main.vert { aspect-ratio: 3 / 4; }
.gallery .main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery .thumbs { display: grid; gap: 10px; }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; cursor: pointer; border-radius: 8px; }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; margin-top: 26px; align-items: start; }
.detail h1 { font-size: 26px; letter-spacing: -0.5px; }
.detail .zone { color: var(--muted); margin-top: 6px; }
.detail .price-big { font-size: 30px; font-weight: 800; color: var(--green-dark); margin: 18px 0; }
.detail .specs-row { display: flex; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 20px; }
.detail .specs-row .item { display: flex; flex-direction: column; }
.detail .specs-row .item b { font-size: 18px; }
.detail .specs-row .item small { color: var(--muted); font-size: 13px; }
.detail .desc { white-space: pre-line; color: #2c3a32; }
.contact-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: sticky; top: 84px; }
.contact-card p { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.wa-btn { background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px; border-radius: 10px; font-weight: 700; font-size: 15px; }
.wa-btn:hover { background: #1da851; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: none; place-items: center; z-index: 100; padding: 20px; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 8px; }
.lightbox .close { position: absolute; top: 20px; right: 26px; color: #fff; font-size: 34px; cursor: pointer; }

/* Auth / header nav */
.auth-slot { display: flex; align-items: center; gap: 8px; }
.nav-link { font-size: 14px; font-weight: 600; color: var(--ink); padding: 6px 10px; border-radius: 8px; }
.nav-link:hover { background: var(--bg); color: var(--green); }
.btn-google {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; color: #3c4043; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 15px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-google:hover { background: #f7f9f7; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.user-menu { position: relative; display: flex; align-items: center; gap: 6px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--green); color: #fff; font-weight: 700; cursor: pointer; overflow: hidden;
  display: grid; place-items: center; padding: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.dropdown {
  position: absolute; top: 48px; right: 0; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); min-width: 200px; padding: 8px; display: none; z-index: 60;
}
.dropdown.open { display: block; }
.dropdown .dd-name { font-size: 13px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 9px 10px; font-size: 14px; border-radius: 8px; cursor: pointer; color: var(--ink);
}
.dropdown a:hover, .dropdown button:hover { background: var(--bg); }

/* Favorito en tarjeta */
.card-wrap { position: relative; }
.fav {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.92); color: #c0c7c2; font-size: 18px; line-height: 1;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.fav:hover { color: #e2557b; }
.fav.on { color: #e2557b; }

/* Form pages */
.form-page { padding: 28px 0 64px; }
.wrap-narrow { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.form-page h1 { font-size: 26px; letter-spacing: -0.5px; margin-bottom: 6px; }
.lead { color: var(--muted); margin-bottom: 22px; }
.gate { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); }
form .row { margin-bottom: 16px; }
form .row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form .row.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
form .field { display: flex; flex-direction: column; gap: 6px; }
form label { font-size: 13px; font-weight: 600; color: var(--ink); }
form input, form select, form textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--ink); width: 100%;
}
form select, .search select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f7a4d' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
form input:focus, form select:focus, form textarea:focus,
.search input:focus, .search select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,122,77,0.12); }
/* inputs con buscador (datalist) */
input[list] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7770' stroke-width='2.5'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4-4'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
form small { color: var(--muted); font-size: 12px; }
.msg { margin-top: 14px; font-size: 14px; }
.msg.ok { color: var(--green); font-weight: 600; }
.msg.err { color: #c0392b; }
.mod-actions { display: flex; gap: 8px; margin-top: 8px; }
.btn.ok { background: var(--green); padding: 8px 14px; height: auto; font-size: 13px; }
.btn.ghost { background: #fff; color: var(--muted); border: 1px solid var(--line); padding: 8px 14px; height: auto; font-size: 13px; }
.badge.estado-pendiente { background: #f0a500; }
.badge.estado-aprobada { background: var(--green); }
.badge.estado-rechazada { background: #c0392b; }

.btn-google.block { width: 100%; justify-content: center; }
.login-btn { height: 40px; padding: 0 16px; font-size: 14px; }
.login-btn .lb-short { display: none; }
@media (max-width: 560px) {
  .login-btn { font-size: 13px; padding: 0 14px; }
  .login-btn .lb-full { display: none; }
  .login-btn .lb-short { display: inline; }
}

/* Login modal */
.login-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: grid; place-items: center; z-index: 200; padding: 20px; }
.login-modal[hidden] { display: none; }
.login-box { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 380px; position: relative; box-shadow: var(--shadow); }
.login-box h3 { font-size: 20px; margin-bottom: 4px; }
.login-box > p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.login-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; }
.login-or { display: flex; align-items: center; text-align: center; color: var(--muted); font-size: 13px; margin: 16px 0; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-or span { padding: 0 12px; }
#email-form { display: flex; flex-direction: column; gap: 10px; }
#email-input { border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 14px; }
.login-msg { font-size: 13px; margin-top: 12px; }
.login-msg.ok { color: var(--green); }
.login-msg.err { color: #c0392b; }

/* Chat */
.chat-page { padding: 20px 0 40px; }
.chat-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; height: calc(100vh - 130px); }
.conv-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-y: auto; }
.conv-empty { padding: 24px; color: var(--muted); font-size: 14px; text-align: center; }
.conv-item { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); padding: 12px 14px; cursor: pointer; }
.conv-item:hover { background: var(--bg); }
.conv-item.active { background: #eaf3ee; }
.conv-item img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #dde4df; flex-shrink: 0; }
.conv-info { min-width: 0; }
.conv-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-view { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.chat-empty { margin: auto; color: var(--muted); padding: 40px; text-align: center; }
.chat-active { display: flex; flex-direction: column; height: 100%; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.chat-head a { font-weight: 700; color: var(--green-dark); }
.chat-head span { font-size: 12px; color: var(--muted); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 70%; padding: 9px 13px; border-radius: 14px; font-size: 14px; word-wrap: break-word; }
.msg.mine { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; background: var(--bg); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font-size: 14px; }

/* Galería de fotos del formulario publicar */
.add-fotos {
  background: var(--bg); color: var(--green-dark); border: 1.5px dashed var(--green);
  border-radius: 10px; padding: 12px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  width: 100%; transition: background 0.15s;
}
.add-fotos:hover { background: #eaf3ee; }
.add-fotos:disabled { opacity: 0.5; cursor: not-allowed; }
.fotos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 4px; }
.fotos-grid:empty { margin: 0; }
.foto-cell {
  position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden;
  background: #dde4df; cursor: grab; border: 1px solid var(--line);
}
.foto-cell.dragging { opacity: 0.4; }
.foto-cell img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.foto-portada {
  position: absolute; top: 6px; left: 6px; background: var(--green); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 12px;
}
.foto-x {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.6); color: #fff; font-size: 16px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.foto-x:hover { background: #c0392b; }
.foto-mov { position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.foto-arrow {
  width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(255,255,255,0.92);
  color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.foto-arrow:disabled { opacity: 0.3; cursor: default; }
.foto-cell.foto-subiendo img { opacity: 0.5; }
.foto-spin {
  position: absolute; top: 50%; left: 50%; width: 26px; height: 26px; margin: -13px;
  border: 3px solid rgba(255,255,255,0.5); border-top-color: var(--green); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.foto-err { position: absolute; bottom: 6px; left: 6px; right: 6px; background: #c0392b; color: #fff; font-size: 11px; padding: 3px; border-radius: 6px; text-align: center; }
.card .photo.vert, .gallery .main.vert { aspect-ratio: 3 / 4; }

/* Compartir */
.share-block { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.share-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.share-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.share-btn { flex: 1; min-width: 90px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink); line-height: 1; }
.share-btn svg { flex-shrink: 0; }
.share-btn.wa { background: #25d366; color: #fff; border: none; }
.share-btn.fb { background: #1877f2; color: #fff; border: none; }
.share-btn.copy { color: var(--ink); }
.share-btn.copy:hover { background: var(--bg); }
.publicado { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* Tarjeta del vendedor (en contact-card) */
.vendor { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.vendor-pic { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.vendor-pic.inicial { background: var(--green); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.vendor-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.vendor-rating { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.vendor-rating .rating-txt { font-size: 12px; color: var(--muted); }

/* Estrellas */
.stars { color: #d6dbd7; font-size: 14px; letter-spacing: 1px; line-height: 1; }
.stars.big { font-size: 20px; }
.stars .star.on { color: #f5a623; }
.star { color: #d6dbd7; }
.star.on { color: #f5a623; }

/* Sección de reseñas */
.resenas { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 24px; }
.resenas-titulo { font-size: 18px; margin-bottom: 14px; }
.resenas-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.resenas-head b { font-size: 22px; color: var(--ink); }
.resenas-head .rating-txt { font-size: 14px; color: var(--muted); }
.resenas-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.resena { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.r-top { display: flex; align-items: center; gap: 10px; }
.r-pic { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.r-pic.inicial { background: var(--green); color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.r-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.r-stars { font-size: 13px; letter-spacing: 1px; }
.r-date { margin-left: auto; font-size: 12px; color: var(--muted); }
.r-text { margin-top: 10px; font-size: 14px; color: var(--ink); line-height: 1.5; }

/* Formulario de reseña */
.resena-form { background: var(--bg); border-radius: 12px; padding: 16px; }
.resena-form .form-title { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.star-pick { display: flex; gap: 4px; margin-bottom: 12px; }
.star-pick .sp { background: none; border: none; cursor: pointer; font-size: 28px; line-height: 1; color: #d6dbd7; padding: 0; }
.star-pick .sp.on { color: #f5a623; }
.resena-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 14px; font-family: inherit; color: var(--ink); background: #fff; min-height: 80px; resize: vertical; margin-bottom: 12px; }
.btn.ghost { background: #fff; color: var(--green-dark); border: 1px solid var(--green); width: 100%; }
.btn.ghost:hover { background: var(--bg); }
.resena-form .msg { font-size: 13px; margin-top: 8px; color: var(--muted); }
.resena-form .msg.err { color: #c0392b; }

/* Acciones en Mis propiedades */
.card-acciones { display: flex; gap: 8px; padding: 0 16px 14px; }
.card-acciones a, .card-acciones button { flex: 1; text-align: center; font-size: 13px; font-weight: 600; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
.card-acciones .editar { color: var(--green-dark); border-color: var(--green); }
.card-acciones .borrar { color: #c0392b; border-color: #e8c4c0; }

/* Nav con iconos */
.nav-ico { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.nav-ico .ico { font-size: 18px; }
.nav-ico:hover { background: var(--bg); color: var(--green); }

/* Perfil */
.perfil-foto-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 10px 0 22px; }
.perfil-foto { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 36px; font-weight: 700; overflow: hidden; }
.perfil-foto img { width: 100%; height: 100%; object-fit: cover; }

/* Mapa de ubicación (Leaflet) */
.map-pick { height: 280px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.map-view { height: 320px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; z-index: 0; margin-bottom: 8px; }
.map-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.map-clear { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: #c0392b; cursor: pointer; flex-shrink: 0; }
.map-clear:hover { background: var(--bg); }
.leaflet-container { font: inherit; }

/* Stepper numérico (− valor +) */
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.stepper .step-btn { flex-shrink: 0; width: 40px; border: none; background: var(--bg); color: var(--green-dark); font-size: 20px; font-weight: 700; cursor: pointer; line-height: 1; display: grid; place-items: center; }
.stepper .step-btn:hover { background: #eaf1ec; }
.stepper .step-btn:active { background: #dfeae2; }
.stepper input { border: none; text-align: center; width: 100%; min-width: 0; padding: 11px 4px; font-size: 15px; font-weight: 600; color: var(--ink); background: #fff; }
.stepper input:focus { outline: none; }
/* sin spinners nativos */
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.login-legal { font-size: 12px; color: var(--muted); text-align: center; margin-top: 14px; line-height: 1.5; }
.login-legal a { color: var(--green-dark); text-decoration: underline; }

/* Páginas legales */
.legal { max-width: 780px; margin: 0 auto; padding: 10px 0 40px; }
.legal h1 { font-size: 30px; margin-bottom: 6px; }
.legal .actualizado { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.legal h2 { font-size: 19px; margin: 30px 0 10px; }
.legal p, .legal li { font-size: 15px; line-height: 1.65; color: var(--ink); }
.legal p { margin-bottom: 12px; }
.legal ul { margin: 0 0 14px 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--green-dark); text-decoration: underline; }
.legal .intro { font-size: 16px; color: var(--muted); margin-bottom: 24px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: #cdd6d0; text-decoration: underline; }
.footer-links a:hover { color: #fff; }

/* Responsive */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .search { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .contact-card { position: static; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 26px; }
  .grid { grid-template-columns: 1fr; }
  .search { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .thumbs { grid-template-columns: repeat(3, 1fr); }
  form .row.four { grid-template-columns: 1fr 1fr; }
  .nav-link { display: none; }
  .nav-ico.ocultable { display: none; }
  .nav-ico { padding: 4px 6px; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .conv-list { max-height: 240px; }
  .chat-msgs { min-height: 300px; max-height: 50vh; }
  /* Inputs a 16px en celular: evita el zoom automático de iOS al enfocar un campo */
  form input, form select, form textarea,
  .search input, .search select, .resena-form textarea { font-size: 16px; }
  /* Mapas un poco más bajos en pantallas chicas */
  .map-pick { height: 240px; }
  .map-view { height: 260px; }
  /* Reseñas: cabecera y botones de estrellas cómodos al tocar */
  .resenas-head { flex-wrap: wrap; }
  .star-pick .sp { font-size: 32px; padding: 2px 4px; }
  /* Detalle: títulos y precio más contenidos */
  .detail h1 { font-size: 22px; }
  .detail .price-big { font-size: 26px; }
  .legal h1 { font-size: 24px; }
}
