/* InmoVega · estilos públicos (todo dentro de .iv para no chocar con el tema ni Elementor) */
/* Los colores se pueden cambiar en InmoVega → Ajustes (se agregan después de este archivo) */
:root { --iv-color: #ab0000; --iv-texto: #0f172a; }
.iv { --iv-gris: #64748b; --iv-borde: #e2e8f0; --iv-fondo: #f6f7f9; --iv-wa: #1faf55; --iv-r: 14px; --iv-cols: 4; color: #334155; line-height: 1.55; }
.iv *, .iv *::before, .iv *::after { box-sizing: border-box; }
.iv img { max-width: 100%; display: block; }
.iv a { text-decoration: none; }
.iv-hide { display: none !important; }
.iv-ic { flex: none; vertical-align: middle; }

/* Botones y campos */
.iv .iv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--iv-borde); background: #fff; color: var(--iv-texto); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, opacity .15s; }
.iv .iv-btn:hover { border-color: #cbd5e1; background: #f8fafc; color: var(--iv-texto); }
.iv .iv-btn-primary { background: var(--iv-color); border-color: var(--iv-color); color: #fff; }
.iv .iv-btn-primary:hover { background: var(--iv-color); color: #fff; opacity: .9; }
.iv .iv-btn-wa { background: var(--iv-wa); border-color: var(--iv-wa); color: #fff; }
.iv .iv-btn-wa:hover { background: #18934a; border-color: #18934a; color: #fff; }
/* El tema Hello pinta de rosado (#c36) todos los botones al pasar el mouse o al hacer clic: aquí se anula */
.iv .iv-btn:focus { background: #fff; border-color: var(--iv-borde); color: var(--iv-texto); text-decoration: none; }
.iv .iv-btn-primary:focus { background: var(--iv-color); border-color: var(--iv-color); color: #fff; }
.iv .iv-btn-wa:focus { background: var(--iv-wa); border-color: var(--iv-wa); color: #fff; }
.iv .iv-btn:focus-visible { outline: 2px solid var(--iv-color); outline-offset: 2px; }
.iv .iv-btn .iv-ic { color: inherit; }
.iv button { text-transform: none; letter-spacing: normal; box-shadow: none; }
.iv .iv-btn-sm { padding: 7px 11px; font-size: 13px; }
.iv .iv-btn-lg { padding: 14px 22px; font-size: 16px; }
.iv-block { display: flex; width: 100%; }
.iv select, .iv input[type=text] { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--iv-texto); font: inherit; font-size: 15px; }
.iv select:focus, .iv input[type=text]:focus { outline: none; border-color: var(--iv-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--iv-color) 18%, transparent); }
.iv-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.iv-check input { width: 18px; height: 18px; accent-color: var(--iv-color); }
.iv-seg { display: flex; width: 100%; background: #eef2f7; border-radius: 10px; padding: 3px; gap: 2px; }
.iv-seg label { flex: 1; cursor: pointer; position: relative; }
.iv-seg input { position: absolute; opacity: 0; pointer-events: none; }
.iv-seg span { display: block; text-align: center; padding: 8px 6px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--iv-gris); white-space: nowrap; }
.iv-seg input:checked + span { background: #fff; color: var(--iv-color); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.iv-seg-sm { width: auto; min-width: 170px; }

/* Buscador de portada */
.iv-buscador { background: #fff; border-radius: 18px; box-shadow: 0 10px 40px rgba(15, 23, 42, .14); max-width: 980px; margin: 0 auto; }
.iv-optabs { display: flex; gap: 2px; padding: 8px 8px 0; overflow-x: auto; scrollbar-width: none; }
.iv-optabs label { position: relative; cursor: pointer; }
.iv-optabs input { position: absolute; opacity: 0; pointer-events: none; }
.iv-optabs span { display: block; padding: 10px 15px; font-weight: 700; font-size: 14px; color: var(--iv-gris); border-bottom: 3px solid transparent; white-space: nowrap; }
.iv-optabs input:checked + span { color: var(--iv-texto); border-bottom-color: var(--iv-color); }
.iv-sb { display: grid; grid-template-columns: 1fr 1.5fr auto auto; gap: 10px; padding: 14px; border-top: 1px solid var(--iv-borde); align-items: center; }
.iv-sb .iv-btn { min-height: 44px; padding: 0 22px; }

/* Filtros del listado */
.iv-filtros { margin-bottom: 18px; }
.iv-frow { display: grid; grid-template-columns: 200px 220px 1fr auto auto; gap: 10px; }
.iv-mas { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 16px; align-items: start; margin-top: 12px; padding: 16px; background: #fff; border: 1px solid var(--iv-borde); border-radius: var(--iv-r); }
.iv-mas > * { min-width: 0; }
.iv-f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--iv-texto); }
.iv-f small { font-weight: 400; color: var(--iv-gris); }
.iv-range { display: flex; gap: 6px; }
.iv-mas-act { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.iv-reshead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; color: var(--iv-gris); }
.iv-reshead b { color: var(--iv-texto); }
.iv-tools { display: flex; gap: 8px; align-items: center; }
.iv-tools select { width: auto; min-height: 38px; font-size: 14px; }
.iv-mapa-res { height: 420px; border-radius: var(--iv-r); margin-bottom: 18px; border: 1px solid var(--iv-borde); z-index: 1; }
.iv-pop { width: 200px; font-size: 13px; color: var(--iv-texto); display: block; }
.iv-pop img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.iv-pop b { display: block; font-size: 15px; }

/* Tarjetas */
.iv-grid { display: grid; grid-template-columns: repeat(var(--iv-cols), minmax(0, 1fr)); gap: 18px; }
.iv-card { position: relative; background: #fff; border-radius: var(--iv-r); overflow: hidden; border: 1px solid var(--iv-borde); display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s; }
.iv-card:hover { box-shadow: 0 10px 34px rgba(15, 23, 42, .13); transform: translateY(-2px); }
.iv-card-link { position: absolute; inset: 0; z-index: 2; }
.iv-ph { position: relative; aspect-ratio: 4 / 3; background: #eef1f5; overflow: hidden; }
.iv-ph img { width: 100%; height: 100%; object-fit: cover; }
.iv-sinfoto { display: grid; place-items: center; height: 100%; color: #b6c2d6; }
.iv-nd .iv-ph img { filter: grayscale(.6); opacity: .8; }
.iv-badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--iv-color); display: inline-flex; align-items: center; gap: 4px; }
.iv-op-alquiler { background: #ea580c; }
.iv-op-anticresis { background: #7c3aed; }
.iv-op-traspaso { background: #0e7490; }
.iv-badge-dest { left: auto; right: 10px; background: #f59e0b; }
.iv-badge-nd { left: auto; right: 10px; background: #475569; }
.iv-nfotos { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: rgba(15, 23, 42, .65); color: #fff; font-size: 12px; font-weight: 600; }
.iv-cb { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.iv-price { font-size: 21px; font-weight: 800; color: var(--iv-texto); letter-spacing: -.02em; }
.iv-price small { font-size: 13px; font-weight: 600; color: var(--iv-gris); margin-left: 3px; }
.iv-price2 { font-size: 13px; font-weight: 700; color: var(--iv-color); margin-top: -3px; }
.iv-ctitle { font-size: 15px; font-weight: 700; margin: 4px 0 0; line-height: 1.35; color: var(--iv-texto); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.iv-loc { display: flex; align-items: center; gap: 5px; color: var(--iv-gris); font-size: 13px; }
.iv-feats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 13px; font-weight: 600; }
.iv-feats span { display: inline-flex; align-items: center; gap: 5px; }
.iv-feats .iv-ic { color: var(--iv-gris); }
.iv-cfoot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--iv-borde); font-size: 12px; color: var(--iv-gris); }
.iv-cfoot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-cfoot b { color: var(--iv-texto); flex: none; }
.iv-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 26px 0 10px; }
.iv-pager a, .iv-pager b, .iv-pager span { min-width: 40px; padding: 9px 13px; border-radius: 10px; text-align: center; font-weight: 700; font-size: 14px; }
.iv-pager a { background: #fff; border: 1px solid var(--iv-borde); color: var(--iv-texto); }
.iv-pager b { background: var(--iv-color); color: #fff; }
.iv-empty { text-align: center; padding: 40px 20px; background: #fff; border: 1px dashed #cbd5e1; border-radius: var(--iv-r); color: var(--iv-gris); }
.iv-h2 { font-size: 24px; margin: 0 0 16px; color: var(--iv-texto); }

/* Páginas */
.iv-archivo, .iv-ficha { max-width: 1200px; margin: 0 auto; padding: 24px 16px 50px; }
.iv-title { font-size: clamp(22px, 3.2vw, 32px); line-height: 1.2; margin: 0 0 12px; color: var(--iv-texto); font-weight: 800; }
.iv-intro { color: var(--iv-gris); margin: -4px 0 16px; }

/* Ficha */
.iv-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--iv-gris); margin-bottom: 12px; }
.iv-crumbs a { color: var(--iv-gris); }
.iv-gwrap { position: relative; }
.iv-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: min(480px, 56vw); border-radius: 18px; overflow: hidden; }
.iv .iv-gallery button { position: relative; padding: 0; border: 0; cursor: zoom-in; background: #eef1f5; overflow: hidden; border-radius: 0; }
.iv-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.iv .iv-gallery button:hover img { transform: scale(1.03); }
.iv-gallery .iv-g0 { grid-row: span 2; }
.iv-gallery.iv-n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.iv-gallery.iv-n2 { grid-template-rows: 1fr; }
.iv-gallery.iv-n1 .iv-g0, .iv-gallery.iv-n2 .iv-g0 { grid-row: auto; }
.iv-more { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); color: #fff; font-weight: 800; font-size: 18px; display: grid; place-items: center; }
.iv-gall { position: absolute; right: 14px; bottom: 14px; z-index: 2; }
.iv-ndbig { position: absolute; left: 14px; top: 14px; z-index: 2; background: #475569; color: #fff; font-weight: 800; padding: 8px 14px; border-radius: 10px; }
.iv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; margin-top: 24px; align-items: start; }
.iv-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.iv-tag { display: inline-flex; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; background: #eef2f7; color: #334155; }
.iv-tag.iv-op { color: #fff; background: var(--iv-color); }
.iv-tag.iv-op-alquiler { background: #ea580c; }
.iv-tag.iv-op-anticresis { background: #7c3aed; }
.iv-tag.iv-op-traspaso { background: #0e7490; }
.iv-tag-nd { background: #475569; color: #fff; }
.iv-ploc { display: flex; align-items: center; gap: 6px; color: var(--iv-gris); margin-bottom: 16px; }
.iv-pricebox { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding: 16px 18px; background: #fff; border: 1px solid var(--iv-borde); border-radius: var(--iv-r); margin-bottom: 18px; }
.iv-big { font-size: 30px; font-weight: 800; color: var(--iv-texto); letter-spacing: -.02em; }
.iv-big small { font-size: 15px; color: var(--iv-gris); font-weight: 600; }
.iv-alt { font-size: 18px; font-weight: 700; color: var(--iv-color); }
.iv-note { width: 100%; font-size: 13px; color: var(--iv-gris); }
.iv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.iv-fact { background: #fff; border: 1px solid var(--iv-borde); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.iv-fact .iv-ic { color: var(--iv-color); }
.iv-fact b { display: block; color: var(--iv-texto); font-size: 16px; line-height: 1.2; }
.iv-fact span { font-size: 12px; color: var(--iv-gris); }
.iv-pdf { margin-bottom: 18px; }
.iv-box { background: #fff; border: 1px solid var(--iv-borde); border-radius: var(--iv-r); padding: 20px 22px; margin-bottom: 18px; overflow-wrap: anywhere; }
.iv-box h2 { font-size: 18px; margin: 0 0 12px; color: var(--iv-texto); }
.iv-desc > :last-child { margin-bottom: 0; }
.iv-pre { white-space: pre-line; margin: 14px 0 0; }
.iv-near { display: flex; flex-wrap: wrap; gap: 8px; }
.iv-near span { padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--iv-color) 10%, #fff); color: var(--iv-color); font-weight: 600; font-size: 13px; }
.iv-amen { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; list-style: none; padding: 0; margin: 0; }
.iv-amen li { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.iv-amen .iv-ic { color: #16a34a; }
.iv-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.iv .iv-video iframe, .iv .iv-video button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: #000; cursor: pointer; }
.iv .iv-video button img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.iv-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 48px; border-radius: 14px; background: #f00; color: #fff; display: grid; place-items: center; }
.iv-mapa { height: 320px; border-radius: 12px; z-index: 1; }
.iv-small { font-size: 13px; color: var(--iv-gris); margin: 8px 0 0; }
.iv-side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 14px; }
.iv-card-side { background: #fff; border: 1px solid var(--iv-borde); border-radius: 18px; padding: 18px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .05); display: flex; flex-direction: column; gap: 8px; }
.iv-code { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--iv-borde); color: var(--iv-gris); font-size: 13px; }
.iv-code b { color: var(--iv-texto); font-size: 17px; letter-spacing: .04em; }
.iv-side-h { color: var(--iv-texto); }
.iv-share { display: flex; gap: 6px; flex-wrap: wrap; }
.iv-share .iv-btn { flex: 1; }
.iv-similares { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--iv-borde); }
.iv-sechead { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.iv-sechead h2 { margin: 0; font-size: 22px; color: var(--iv-texto); }
.iv-sechead p { margin: 4px 0 0; color: var(--iv-gris); }
.iv-grid4 { --iv-cols: 4; }
.iv-mobile-cta { display: none; }

/* Visor de fotos */
.iv-lightbox { position: fixed; inset: 0; z-index: 99999; background: rgba(5, 10, 25, .94); display: none; flex-direction: column; }
.iv-lightbox.iv-open { display: flex; }
.iv-lb-top { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 12px 16px; font-weight: 600; }
.iv .iv-lb-top button, .iv .iv-lb-nav { background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; }
.iv-lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; padding: 0 56px; touch-action: pan-y; }
.iv-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.iv .iv-lb-nav:hover, .iv .iv-lb-nav:focus { background: rgba(255, 255, 255, .26); color: #fff; }
.iv .iv-lb-top button:hover, .iv .iv-lb-top button:focus { background: none; color: #fff; }
.iv .iv-gallery button:hover, .iv .iv-gallery button:focus { background: #eef1f5; }
.iv .iv-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; }
.iv-lb-prev { left: 8px; }
.iv-lb-next { right: 8px; }
.iv-lb-thumbs { display: flex; gap: 6px; padding: 10px 16px 16px; overflow-x: auto; justify-content: center; }
.iv-lb-thumbs img { width: 70px; height: 52px; object-fit: cover; border-radius: 6px; opacity: .5; cursor: pointer; flex: none; }
.iv-lb-thumbs img.on { opacity: 1; outline: 2px solid #fff; }

@media (max-width: 1100px) { .iv-grid { --iv-cols: 3; } .iv-grid4 { --iv-cols: 2; } }
@media (max-width: 1024px) {
  .iv-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
  .iv-frow { grid-template-columns: 1fr 1fr; }
  .iv-frow input[name=q] { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 860px) {
  .iv-grid { --iv-cols: 2; }
  .iv-sb { grid-template-columns: 1fr 1fr; }
  .iv-sb input[name=q] { grid-column: 1 / -1; order: -1; }
  .iv-sb .iv-btn { grid-column: 1 / -1; }
  .iv-seg-sm { width: 100%; }
  .iv-layout { grid-template-columns: 1fr; }
  .iv-side { position: static; }
  .iv-gallery { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 62vw; border-radius: 14px; }
  .iv-gallery button:not(.iv-g0) { display: none; }
  .iv-gallery .iv-g0 { grid-row: auto; }
  .iv-mobile-cta { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: #fff; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--iv-borde); box-shadow: 0 -4px 20px rgba(15, 23, 42, .08); }
  .iv-mobile-cta .iv-btn { flex: 1; }
  .iv-ficha { padding-bottom: 90px; }
}
@media (max-width: 600px) {
  .iv-grid, .iv-grid4 { --iv-cols: 1; }
  .iv-frow, .iv-sb { grid-template-columns: 1fr; }
  .iv-frow .iv-btn, .iv-sb .iv-btn { width: 100%; }
  .iv-big { font-size: 26px; }
  .iv-box { padding: 16px; }
  .iv-lb-stage { padding: 0 8px; }
}
