/* =========================================================
   Horizonte Ambateño · Página de lotes
   ========================================================= */
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #fff; color: var(--forest); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, color .2s, box-shadow .2s; }
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--forest); }
.chip[aria-pressed="true"] { background: var(--forest); color: var(--cream); box-shadow: none; }
.chip i, .chip svg { width: 15px; height: 15px; display: inline-grid; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Cabecera ---------- */
.lp-hero { position: relative; overflow: hidden; padding: calc(var(--header-h) + 50px) 0 36px; background: var(--cream); }
.lp-hero::after { content: ''; position: absolute; right: -140px; top: -220px; width: 520px; height: 520px; border-radius: 50%; border: 32px solid rgba(240, 168, 30, .1); pointer-events: none; }
.lp-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.lp-hero .display { color: var(--forest); margin: 12px 0 8px; }
.lp-hero .display .script { font-size: 1.25em; }
.lp-hero .lead { margin: 0; }
.lp-kpis { display: grid; grid-template-columns: repeat(3, auto); gap: 14px 34px; padding: 22px 26px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.kpi strong { display: flex; align-items: baseline; font-family: var(--f-serif); font-size: 50px; line-height: 1; font-weight: 700; color: var(--forest); }
.kpi strong small { font-family: var(--f-sans); font-size: 16px; font-weight: 700; }
.kpi > span { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.kpi--ok strong { color: var(--ok); }
.kpi--sold strong { color: var(--sold); }
.kpi-bar { grid-column: 1 / -1; }
.kpi-bar small { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
.kpi-bar b { color: var(--sold); }
.bar { height: 8px; border-radius: 99px; background: #f1d2cc; overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--p, 68%); border-radius: inherit; background: linear-gradient(90deg, #2f8f3c, #6fae3c); animation: barIn 1.6s var(--ease) both .4s; }
@keyframes barIn { from { width: 0; } }

/* ---------- Mapa + panel ---------- */
.lp-main { background: var(--cream); padding: 16px 0 80px; }
.lp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
.lp-map-col { position: sticky; top: 76px; }
.lp-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 5px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); }
.seg button { padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); transition: background .25s, color .25s; }
.seg button[aria-pressed="true"] { background: var(--forest); color: var(--cream); }
.search { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 18px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); }
.search input { width: 84px; border: 0; outline: 0; background: transparent; font-weight: 700; font-size: 14px; }
.search button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-2); color: var(--forest); }
.search svg { width: 18px; height: 18px; }
.lp-map { height: calc(100vh - 200px); min-height: 520px; max-height: 940px; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.lp-map.is-full { position: fixed; inset: 0; z-index: 95; height: 100%; max-height: none; border-radius: 0; }
.lp-map-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.lp-map-foot .map-legend { font-size: 12px; color: var(--forest); }
.lp-hint { font-size: 12px; color: var(--muted); }

.lp-panel { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; overscroll-behavior: contain; padding: 28px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); scrollbar-width: thin; }
.panel-empty { text-align: center; }
.pe-art svg { width: 110px; margin: 4px auto 12px; }
.pe-dot { animation: bob 1.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.panel-empty h2 { margin: 0; font-family: var(--f-serif); font-size: 34px; font-weight: 600; color: var(--forest); }
.panel-empty > p { margin: 6px auto 0; max-width: 32ch; font-size: 14px; color: var(--muted); }
.pe-block { margin-top: 26px; text-align: left; }
.pe-block h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-3); }
.picks { display: grid; gap: 8px; }
.pick { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 14px; background: var(--paper); text-align: left; transition: background .2s, transform .2s; }
.pick:hover { background: #f1ece0; transform: translateX(3px); }
.pick .lot-shape-mini { width: 50px; height: 44px; }
.pick small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-3); }
.pick b { font-size: 15px; color: var(--forest); }
.pick em { font-style: normal; font-weight: 800; color: var(--forest); font-size: 14px; }
.pe-perks { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--forest-3); }
.pe-perks span { display: inline-flex; align-items: center; gap: 6px; }
.pe-perks i { width: 18px; height: 18px; color: var(--gold-3); display: inline-grid; }

/* ---------- Ficha del lote ---------- */
.pd { animation: pdIn .45s var(--ease); }
@keyframes pdIn { from { opacity: 0; transform: translateY(12px); } }
.pd-top { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; }
.pd-title { text-align: center; }
.pd-title small { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-3); }
.pd-title h2 { margin: 0; font-family: var(--f-serif); font-size: 52px; font-weight: 700; line-height: 1; color: var(--forest); }
.pd-nav, .pd-close { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--forest); transition: background .2s; }
.pd-nav:hover, .pd-close:hover { background: #f1ece0; }
.pd-nav svg, .pd-close svg { width: 18px; height: 18px; }
.pd-status { display: flex; justify-content: center; gap: 8px; margin: 12px 0 18px; flex-wrap: wrap; }
.pd-hot { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: linear-gradient(120deg, #d9b86b, #f1dca2); color: var(--forest); }
.pd-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-visual figure { margin: 0; padding: 14px; border-radius: 16px; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pd-visual svg { height: 130px; width: 100%; }
.pd-visual figcaption { margin-top: 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pd-shape svg path { stroke-width: 2.5; }
.pd-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.pd-facts > div { padding: 14px 16px; border-radius: 16px; background: var(--paper); }
.pd-facts small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pd-facts b { font-size: 20px; color: var(--forest); }
.pd-price { grid-column: 1 / -1; background: var(--forest) !important; color: var(--cream); display: flex; justify-content: space-between; align-items: center; }
.pd-price small { color: var(--gold-2); }
.pd-price b { font-size: 32px; color: #fff; letter-spacing: -.02em; }
.is-sold .pd-price { background: var(--sold) !important; }
.pd-feats { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 10px; }
.pd-feats li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--forest); }
.pd-feats svg { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: #f1ece0; color: var(--gold-3); flex: none; }
.pd-actions { display: grid; gap: 10px; }
.pd-actions-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pd-actions-row .btn { padding: 10px 8px; font-size: 12px; box-shadow: inset 0 0 0 1.5px var(--line); }
.pd-actions-row .btn svg { width: 16px; height: 16px; }
.pd-fav.is-fav { color: var(--sold); }
.pd-fav.is-fav svg { fill: currentColor; }
.pd-note { margin: 14px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; }
.pd-soldbox { margin-top: 14px; padding: 16px; border-radius: 16px; background: #fbeeec; }
.pd-soldbox p { margin: 0 0 10px; font-size: 14px; color: #6b2a23; }
.alt { display: grid; gap: 8px; }
.alt-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px; background: #fff; text-align: left; transition: transform .2s; }
.alt-card:hover { transform: translateX(4px); }
.alt-card .lot-shape-mini { width: 44px; height: 38px; }
.alt-card small { display: block; font-size: 12px; color: var(--muted); }
.alt-card svg:last-child { width: 18px; height: 18px; color: var(--gold-3); }

/* Hoja inferior (móvil) */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; max-height: 72vh; overflow: auto; overscroll-behavior: contain; padding: 4px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #fff; box-shadow: 0 -24px 60px -10px rgba(0, 0, 0, .35); transform: translateY(110%); transition: transform .45s var(--ease); }
.sheet.is-open { transform: none; }
.sheet-handle { position: sticky; top: 0; z-index: 1; padding: 10px 0 12px; margin: 0 -20px; background: #fff; touch-action: none; cursor: grab; }
.sheet-handle::before { content: ''; display: block; width: 46px; height: 5px; margin: 0 auto; border-radius: 3px; background: #d8d2c4; }
.sheet .pd-title h2 { font-size: 42px; }
.sheet .pd-visual svg { height: 96px; }
.sheet-backdrop { display: none; }

/* ---------- Listado ---------- */
.lp-list { padding: 90px 0 110px; background: var(--paper); }
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.list-head .display { color: var(--forest); margin-top: 12px; }
.list-filters { display: grid; gap: 10px; justify-items: end; }
.list-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.select select { appearance: none; -webkit-appearance: none; padding: 9px 38px 9px 16px; border-radius: 999px; border: 0; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e3322' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; color: var(--forest); cursor: pointer; }
.chip--fav b { min-width: 20px; padding: 1px 6px; border-radius: 99px; background: rgba(184, 50, 39, .12); color: var(--sold); font-size: 11px; }
.chip--fav[aria-pressed="true"] b { background: rgba(255, 255, 255, .2); color: #fff; }
.list-count { margin: 0 0 22px; font-size: 13px; color: var(--muted); }
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.lot-card { position: relative; padding: 18px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; outline: none; border: 1.5px solid transparent; transition: transform .35s var(--ease), box-shadow .35s, border-color .25s; animation: cardIn .5s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } }
.lot-card:hover, .lot-card:focus-visible { transform: translateY(-5px); box-shadow: var(--shadow); }
.lot-card.is-current { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 164, 92, .2), var(--shadow); }
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 34px; }
.lc-n { font-family: var(--f-serif); font-size: 40px; font-weight: 700; line-height: 1; color: var(--forest); }
.lc-fav { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #b9b2a2; background: var(--paper); transition: color .2s, transform .2s; }
.lc-fav:hover { transform: scale(1.12); color: var(--sold); }
.lc-fav svg { width: 17px; height: 17px; }
.lc-fav.is-fav { color: var(--sold); }
.lc-fav.is-fav svg { fill: currentColor; }
.lc-shape { height: 78px; margin: 12px 0; display: grid; place-items: center; }
.lc-shape svg { height: 78px; width: 100%; }
.lc-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lc-meta span { font-size: 14px; font-weight: 600; color: var(--muted); }
.lc-meta b { font-size: 19px; color: var(--forest); }
.lc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; min-height: 22px; }
.lc-tags span { padding: 3px 8px; border-radius: 99px; background: #f1ece0; font-size: 10.5px; font-weight: 700; color: var(--forest-3); }
.lot-card.is-sold { background: #f8f5ef; }
.lot-card.is-sold .lc-shape, .lot-card.is-sold .lc-n, .lot-card.is-sold .lc-meta { opacity: .55; }
.lot-card.is-sold::after { content: 'VENDIDO'; position: absolute; top: 52%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); padding: 5px 14px; border: 2.5px solid var(--sold); border-radius: 8px; color: var(--sold); font-weight: 800; font-size: 15px; letter-spacing: .2em; background: rgba(255, 255, 255, .8); }
.list-empty { grid-column: 1 / -1; padding: 50px 20px; text-align: center; color: var(--muted); }
.fav-bar { position: fixed; left: 50%; bottom: 20px; z-index: 45; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 22px; border-radius: 999px; background: var(--forest); color: var(--cream); box-shadow: var(--shadow-lg); font-size: 14px; white-space: nowrap; animation: toastIn .4s var(--ease); }
.fav-bar b { color: var(--gold-2); }

/* ---------- CTA ---------- */
.lp-cta { padding: 80px 0; background: var(--forest); color: var(--cream); position: relative; overflow: hidden; }
.lp-cta::before { content: ''; position: absolute; left: -120px; top: -260px; width: 520px; height: 520px; border-radius: 50%; border: 30px solid rgba(240, 168, 30, .1); }
.lp-cta-inner { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.lp-cta h2 { margin: 0; font-family: var(--f-serif); font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 600; line-height: 1.05; }
.lp-cta h2 .script { color: var(--gold-2); font-size: 1.2em; }
.lp-cta p { margin: 10px 0 0; max-width: 52ch; color: rgba(247, 243, 234, .8); }
.lp-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .lp-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 960px) {
  .lp-hero-inner { grid-template-columns: 1fr; }
  .lp-kpis { justify-self: stretch; grid-template-columns: repeat(3, 1fr); }
  .lp-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-map-col, .lp-panel { position: static; max-height: none; }
  .lp-map { height: min(80vh, calc((100vw - 40px) * 1.587)); min-height: 0; }
  .list-filters { justify-items: start; }
}
@media (max-width: 560px) {
  .lp-hero { padding-top: calc(var(--header-h) + 26px); }
  .lp-kpis { padding: 16px; gap: 10px 14px; }
  .kpi strong { font-size: 36px; }
  .kpi > span { font-size: 9.5px; letter-spacing: .1em; }
  .lp-toolbar { gap: 8px; }
  .seg button { padding: 8px 11px; font-size: 12px; }
  .search input { width: 56px; }
  .lp-hint { display: none; }
  .lp-panel { padding: 22px 18px; }
  .lot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lot-card { padding: 14px; }
  .lc-top { padding-right: 30px; }
  .lc-top .pill { display: none; }
  .lot-card.is-sold::after { font-size: 12px; padding: 4px 10px; }
  .fav-bar { left: 16px; right: 16px; transform: none; justify-content: space-between; }
  .lc-n { font-size: 32px; }
  .lc-shape, .lc-shape svg { height: 60px; }
  .lc-meta { flex-direction: column; gap: 0; }
  .lc-tags { display: none; }
  .list-head { margin-bottom: 10px; }
}
