/* ══════════════════════════════════════════════════════════════
   PROPIEDADES CATÁLOGO — from propiedades-catalogo.html
   ══════════════════════════════════════════════════════════════ */

/* ── LAYOUT ── */
.page-wrap { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 126px); }

/* ── SIDEBAR ── */
.sidebar { background: white; border-right: 1px solid var(--line); padding: 28px 24px; position: sticky; top: 68px; height: calc(100vh - 68px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line); }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sidebar-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; color: var(--ink); }
.clear-all { font-size: 12px; color: var(--accent2); cursor: pointer; font-weight: 500; background: none; border: none; font-family: 'Outfit', sans-serif; letter-spacing: .3px; }
.clear-all:hover { text-decoration: underline; }

.filter-block { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.filter-block:last-child { border-bottom: none; margin-bottom: 0; }
.filter-label { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }

/* Toggle group */
.toggle-group { display: flex; flex-wrap: wrap; gap: 7px; }
.tog { padding: 7px 14px; font-size: 12.5px; font-weight: 500; border: 1px solid var(--line); color: var(--mid); background: white; cursor: pointer; font-family: 'Outfit', sans-serif; transition: all .2s; letter-spacing: .2px; }
.tog.on { background: var(--accent); color: white; border-color: var(--accent); }
.tog:hover:not(.on) { border-color: var(--accent2); color: var(--accent2); }

/* Price slider */
.price-display { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 13px; }
.price-val { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 600; color: var(--ink); }
.price-sub { font-size: 11px; color: var(--muted); }
.slider-wrap { position: relative; height: 4px; background: var(--line); margin: 8px 0 20px; }
.slider-fill { position: absolute; left: 0; width: 60%; height: 100%; background: var(--accent); }
.range-input { position: absolute; width: 100%; height: 4px; appearance: none; background: transparent; outline: none; top: 0; cursor: pointer; }
.range-input::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: white; border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(27,79,114,.2); cursor: pointer; }

/* Number select */
.num-select { display: flex; gap: 6px; }
.ns { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--mid); cursor: pointer; transition: all .2s; background: white; font-family: 'Outfit', sans-serif; }
.ns.on { background: var(--accent); color: white; border-color: var(--accent); }
.ns:hover:not(.on) { border-color: var(--accent2); color: var(--accent2); }
.ns-any { width: auto; padding: 0 10px; font-size: 12px; }

/* Select */
.f-select { width: 100%; padding: 10px 14px; border: 1px solid var(--line); color: var(--ink); font-family: 'Outfit', sans-serif; font-size: 14px; background: white; outline: none; cursor: pointer; transition: border-color .2s; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238f9faf' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.f-select:focus { border-color: var(--accent); }

/* Checkbox */
.check-list { display: flex; flex-direction: column; gap: 10px; }
.check-item { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--mid); transition: color .2s; }
.check-item:hover { color: var(--ink); }
.check-item input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.check-item span { flex: 1; }
.check-item em { font-style: normal; font-size: 12px; color: var(--muted); }
.apply-btn { width: 100%; padding: 13px; background: var(--accent); color: white; border: none; font-size: 14px; font-weight: 600; font-family: 'Outfit', sans-serif; cursor: pointer; letter-spacing: .5px; margin-top: 8px; transition: background .2s; }
.apply-btn:hover { background: #154360; }

/* ── MAIN CONTENT ── */
.main { padding: 28px 32px; }

/* Toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; background: white; padding: 16px 20px; border: 1px solid var(--line); }
.result-count { font-size: 14px; color: var(--mid); }
.result-count strong { color: var(--ink); font-size: 16px; }
.toolbar-right { display: flex; align-items: center; gap: 14px; }
.sort-sel { padding: 8px 14px; border: 1px solid var(--line); color: var(--mid); font-family: 'Outfit', sans-serif; font-size: 13px; background: white; outline: none; cursor: pointer; appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238f9faf' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.view-toggle { display: flex; gap: 0; border: 1px solid var(--line); }
.vt-btn { width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; border: none; background: white; color: var(--muted); font-size: 16px; transition: all .2s; }
.vt-btn.on { background: var(--accent); color: white; }
.vt-btn:hover:not(.on) { background: var(--tag); color: var(--accent); }
.map-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--accent); cursor: pointer; padding: 8px 14px; border: 1px solid var(--accent); background: white; font-family: 'Outfit', sans-serif; transition: all .2s; }
.map-toggle:hover, .map-toggle.on { background: var(--accent); color: white; }
.map-toggle svg { width: 15px; height: 15px; transition: fill .2s; }

/* Active filters */
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.af-tag { display: flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--tag); border: 1px solid #b0cfe8; font-size: 12.5px; font-weight: 500; color: var(--accent); }
.af-tag button { background: none; border: none; color: var(--accent2); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }

/* Map panel */
.map-panel { display: none; height: 400px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 24px; position: relative; overflow: hidden; border-radius: 2px; }
.map-panel.open { display: block; }
.map-panel #leafletMap { width: 100%; height: 100%; z-index: 1; }
.map-close { position: absolute; top: 12px; right: 12px; z-index: 10; background: white; border: 1px solid var(--line); padding: 7px 14px; font-size: 12px; font-weight: 600; color: var(--mid); cursor: pointer; font-family: 'Outfit', sans-serif; transition: all .2s; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.map-close:hover { color: var(--accent); border-color: var(--accent); }
/* Leaflet popup custom */
.leaflet-popup-content-wrapper { border-radius: 2px !important; box-shadow: 0 4px 20px rgba(0,0,0,.12) !important; padding: 0 !important; }
.leaflet-popup-content { margin: 0 !important; font-family: 'Outfit', sans-serif !important; }
.leaflet-popup-tip { box-shadow: 0 4px 20px rgba(0,0,0,.12) !important; }
.map-popup { padding: 14px 16px; min-width: 200px; }
.map-popup-title { font-family: 'Cormorant Garamond', serif; font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px; line-height: 1.25; }
.map-popup-loc { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.map-popup-price { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.map-popup-link { font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; border: 1px solid var(--accent); padding: 5px 12px; display: inline-block; transition: all .2s; }
.map-popup-link:hover { background: var(--accent); color: white; }
/* Spec icon alignment */
.spec i, .card-loc i, .cl-loc i { margin-right: 2px; color: var(--accent2); font-size: 12px; }
.card-loc i, .cl-loc i { font-size: 11px; }
.badge i { margin-right: 3px; font-size: 9px; }

/* Grid */
.prop-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.prop-grid.two-col { grid-template-columns: repeat(2,1fr); }

/* List view */
.prop-list-view { display: flex; flex-direction: column; gap: 16px; }

/* Card grid */
.card { background: white; border: 1px solid var(--line); overflow: hidden; transition: all .3s; cursor: pointer; }
.card:hover { border-color: #b0c4d8; transform: translateY(-3px); box-shadow: 0 12px 40px rgba(27,79,114,.09); }
.card-img-wrap { position: relative; overflow: hidden; height: 200px; background: var(--bg); }
.card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.card:hover .card-img { transform: scale(1.05); }
.card-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 5px; }
.badge { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; background: white; color: var(--accent); border: 1px solid var(--line); }
.badge.feat { background: var(--accent); color: white; border-color: var(--accent); }
.badge.disc { background: #c0392b; color: white; border-color: #c0392b; }
.badge.sold { background: var(--mid); color: white; border-color: var(--mid); }
.card-save { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; background: white; border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; font-size: 14px; transition: all .2s; }
.card-save:hover { background: var(--tag); border-color: var(--accent2); }
.card-body { padding: 20px; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-type { font-size: 10.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent2); }
.card-code { font-size: 11px; color: var(--muted); font-family: monospace; }
.card-title { font-family: 'Cormorant Garamond', serif; font-size: 19px; font-weight: 600; line-height: 1.25; color: var(--ink); margin-bottom: 6px; }
.card-loc { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.card-specs { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.spec { font-size: 12px; color: var(--mid); display: flex; align-items: center; gap: 4px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.card-price { font-family: 'Cormorant Garamond', serif; font-size: 23px; font-weight: 700; color: var(--ink); }
.card-price small { font-size: 13px; font-family: 'Outfit', sans-serif; color: var(--muted); font-weight: 400; }
.card-btn { font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; letter-spacing: .5px; padding: 7px 16px; border: 1.5px solid var(--accent); transition: all .2s; }
.card-btn:hover { background: var(--accent); color: white; }

/* List card */
.card-list { display: grid; grid-template-columns: 280px 1fr auto; background: white; border: 1px solid var(--line); overflow: hidden; transition: all .3s; cursor: pointer; }
.card-list:hover { border-color: #b0c4d8; box-shadow: 0 6px 24px rgba(27,79,114,.08); }
.cl-img { position: relative; overflow: hidden; }
.cl-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card-list:hover .cl-img img { transform: scale(1.04); }
.cl-body { padding: 24px 28px; display: flex; flex-direction: column; justify-content: space-between; }
.cl-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.cl-loc { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.cl-desc { font-size: 13.5px; color: var(--mid); line-height: 1.6; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-specs { display: flex; gap: 20px; flex-wrap: wrap; }
.cl-right { padding: 24px 28px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; border-left: 1px solid var(--line); min-width: 180px; }
.cl-price { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 700; color: var(--ink); text-align: right; }
.cl-price small { display: block; font-size: 12px; font-family: 'Outfit', sans-serif; color: var(--muted); font-weight: 400; }
.cl-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.pg { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 14px; color: var(--mid); cursor: pointer; background: white; font-family: 'Outfit', sans-serif; font-weight: 500; transition: all .2s; }
.pg.on { background: var(--accent); color: white; border-color: var(--accent); }
.pg:hover:not(.on) { border-color: var(--accent); color: var(--accent); }
.pg-dots { color: var(--muted); font-size: 16px; }
.pg-arrow { font-size: 18px; color: var(--mid); }
