/* =====================================================================
   InmoVista - Sistema visual
   Paleta: petróleo (tinta) · verde mar (marca) · amarillo guayacán (acción)
   sobre neutros fríos. El amarillo se reserva para la acción principal de
   cada pantalla; todo lo demás es marca o neutro.
   ===================================================================== */
:root {
    /* Tinta: textos, pie y superficies oscuras */
    --iv-ink: #10292c;
    --iv-ink-2: #1c3b3f;
    /* Marca */
    --iv-brand: #0f766e;
    --iv-brand-700: #0b5c56;
    --iv-brand-rgb: 15,118,110;
    --iv-brand-soft: #e3f1ef;
    /* Acción principal */
    --iv-sun: #f5b82e;
    --iv-sun-700: #e2a416;
    /* Estados */
    --iv-leaf: #2f855a;
    --iv-leaf-700: #256b48;
    --iv-amber: #b45309;
    /* Neutros */
    --iv-bg: #f4f7f6;
    --iv-surface: #ffffff;
    --iv-border: #dde6e4;
    --iv-muted: #5a6d6e;
    /* Forma: tres radios según jerarquía (contenedor, control, etiqueta) */
    --iv-radius: 16px;
    --iv-radius-sm: 10px;
    --iv-radius-xs: 6px;
    --iv-shadow: 0 1px 2px rgba(16,41,44,.05), 0 8px 24px -12px rgba(16,41,44,.16);
    --iv-shadow-lg: 0 18px 44px -18px rgba(16,41,44,.32);
    --iv-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
    --iv-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Nombres anteriores: se conservan porque las vistas los usan. */
    --iv-blue: var(--iv-brand);
    --iv-blue-700: var(--iv-brand-700);
    --iv-blue-900: var(--iv-ink);
    --iv-olive: var(--iv-leaf);
    --iv-olive-700: var(--iv-leaf-700);
    --iv-cta: var(--iv-brand);
    --iv-cta-700: var(--iv-brand-700);

    --bs-primary: var(--iv-brand);
    --bs-primary-rgb: var(--iv-brand-rgb);
    --bs-body-color: var(--iv-ink);
    --bs-body-bg: var(--iv-bg);
    --bs-body-font-family: var(--iv-text);
    --bs-border-color: var(--iv-border);
    --bs-link-color: var(--iv-brand);
    --bs-link-color-rgb: var(--iv-brand-rgb);
    --bs-link-hover-color: var(--iv-brand-700);
    --bs-link-hover-color-rgb: 11,92,86;
    --bs-secondary-color: var(--iv-muted);
    --bs-focus-ring-color: rgba(var(--iv-brand-rgb), .28);
}

/* ---------- Base ---------- */
body {
    display: flex; flex-direction: column; min-height: 100vh;
    background: var(--iv-bg); color: var(--iv-ink);
    font-family: var(--iv-text);
    font-size: 1rem; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, .navbar-brand, .display-5 {
    font-family: var(--iv-display);
    font-weight: 700; letter-spacing: -.02em; line-height: 1.15;
}
h6, .fw-bold, .fw-semibold { letter-spacing: -.005em; }
a { text-decoration: none; }
.text-muted { color: var(--iv-muted) !important; }
::selection { background: var(--iv-sun); color: var(--iv-ink); }
:focus-visible { outline: 2px solid var(--iv-brand); outline-offset: 2px; }

/* ---------- Navbar: clara, la marca la llevan el logotipo y el botón ---------- */
.iv-navbar {
    background: rgba(255,255,255,.86);
    backdrop-filter: saturate(170%) blur(14px);
    -webkit-backdrop-filter: saturate(170%) blur(14px);
    border-bottom: 1px solid var(--iv-border);
    padding-top: .7rem; padding-bottom: .7rem;
}
.iv-navbar .navbar-brand, .iv-brand {
    display: inline-flex; align-items: center;
    font-family: var(--iv-display); font-weight: 800; font-size: 1.4rem;
    letter-spacing: -.035em; color: var(--iv-ink);
}
.iv-brand:hover { color: var(--iv-ink); }
.iv-brand .bi { color: var(--iv-brand); font-size: 1.15rem; }
.iv-navbar .nav-link, .iv-nav-links .nav-link {
    color: var(--iv-ink-2) !important; font-weight: 500; font-size: .95rem;
    border-radius: 999px; padding: .42rem .85rem !important;
    transition: background .15s, color .15s;
}
.iv-navbar .nav-link:hover, .iv-navbar .nav-link.show { color: var(--iv-brand-700) !important; background: var(--iv-brand-soft); }
.iv-navbar .navbar-toggler { border: 1px solid var(--iv-border); border-radius: var(--iv-radius-sm); }
.iv-navbar .dropdown-menu {
    border: 1px solid var(--iv-border); border-radius: 14px; padding: .4rem;
    box-shadow: var(--iv-shadow-lg); margin-top: .5rem;
}
.iv-navbar .dropdown-item { border-radius: 8px; padding: .5rem .7rem; font-size: .93rem; }
.iv-navbar .dropdown-item:hover, .iv-navbar .dropdown-item:focus { background: var(--iv-brand-soft); color: var(--iv-brand-700); }
.iv-navbar .dropdown-item .bi { color: var(--iv-brand); }

/* ---------- Pie ---------- */
.iv-footer { background: var(--iv-ink); margin-top: 3rem !important; }

/* ---------- Portada: una foto real del catálogo detrás del titular ---------- */
.iv-hero {
    position: relative; isolation: isolate; overflow: hidden;
    background-color: var(--iv-ink);
    background-image: var(--iv-hero-foto, none);
    background-size: cover; background-position: center 55%;
    color: #fff;
    padding: clamp(2.6rem, 6vw, 4.6rem) 0 clamp(4.4rem, 8vw, 6.2rem);
}
/* Velo petróleo: denso a la izquierda, donde va el texto. */
.iv-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(16,41,44,.94) 0%, rgba(16,41,44,.82) 42%, rgba(16,41,44,.38) 100%),
        linear-gradient(0deg, rgba(16,41,44,.55), transparent 55%);
}
.iv-hero-titulo {
    font-family: var(--iv-display); font-weight: 800;
    font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.04; letter-spacing: -.035em;
    max-width: 16ch; margin: 0 0 .9rem; text-wrap: balance; color: #fff;
}
.iv-hero-texto { font-size: clamp(1rem, 1.5vw, 1.15rem); max-width: 46ch; color: rgba(255,255,255,.84); margin: 0; }
.iv-hero-datos { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; padding: 0; list-style: none; }
.iv-hero-datos li {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .88rem; font-weight: 500; color: #fff;
    padding: .38rem .8rem; border-radius: 999px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(6px);
}
.iv-hero-datos .bi { color: var(--iv-sun); }

/* ---------- Botones ---------- */
.btn {
    --bs-btn-border-radius: var(--iv-radius-sm);
    --bs-btn-font-weight: 600;
    --bs-btn-padding-x: 1rem;
}
.btn-sm { --bs-btn-border-radius: 8px; --bs-btn-padding-x: .7rem; }
.btn-lg { --bs-btn-border-radius: 12px; }
.btn-primary {
    --bs-btn-bg: var(--iv-brand); --bs-btn-border-color: var(--iv-brand);
    --bs-btn-hover-bg: var(--iv-brand-700); --bs-btn-hover-border-color: var(--iv-brand-700);
    --bs-btn-active-bg: #094a45; --bs-btn-active-border-color: #094a45;
    --bs-btn-disabled-bg: var(--iv-brand); --bs-btn-disabled-border-color: var(--iv-brand);
    --bs-btn-focus-shadow-rgb: var(--iv-brand-rgb);
}
.btn-outline-primary {
    --bs-btn-color: var(--iv-brand-700); --bs-btn-border-color: rgba(var(--iv-brand-rgb), .45);
    --bs-btn-hover-bg: var(--iv-brand); --bs-btn-hover-border-color: var(--iv-brand); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--iv-brand-700); --bs-btn-active-border-color: var(--iv-brand-700);
    --bs-btn-focus-shadow-rgb: var(--iv-brand-rgb);
}
.btn-success {
    --bs-btn-bg: var(--iv-leaf); --bs-btn-border-color: var(--iv-leaf);
    --bs-btn-hover-bg: var(--iv-leaf-700); --bs-btn-hover-border-color: var(--iv-leaf-700);
    --bs-btn-active-bg: var(--iv-leaf-700); --bs-btn-active-border-color: var(--iv-leaf-700);
    --bs-btn-disabled-bg: var(--iv-leaf); --bs-btn-disabled-border-color: var(--iv-leaf);
}
.btn-outline-success {
    --bs-btn-color: var(--iv-leaf-700); --bs-btn-border-color: var(--iv-leaf);
    --bs-btn-hover-bg: var(--iv-leaf); --bs-btn-hover-border-color: var(--iv-leaf);
}
/* "warning" es la acción de pago y de subasta: amarillo con texto tinta. */
.btn-warning, .iv-btn-cta {
    --bs-btn-color: var(--iv-ink); --bs-btn-bg: var(--iv-sun); --bs-btn-border-color: var(--iv-sun);
    --bs-btn-hover-color: var(--iv-ink); --bs-btn-hover-bg: var(--iv-sun-700); --bs-btn-hover-border-color: var(--iv-sun-700);
    --bs-btn-active-color: var(--iv-ink); --bs-btn-active-bg: #cf950f; --bs-btn-active-border-color: #cf950f;
    --bs-btn-disabled-color: var(--iv-ink); --bs-btn-disabled-bg: var(--iv-sun); --bs-btn-disabled-border-color: var(--iv-sun);
    --bs-btn-focus-shadow-rgb: 245,184,46;
}
.iv-btn-cta { --bs-btn-font-weight: 700; --bs-btn-padding-x: 1.15rem; box-shadow: 0 6px 16px -8px rgba(226,164,22,.9); }
.btn-outline-secondary {
    --bs-btn-color: var(--iv-ink-2); --bs-btn-border-color: var(--iv-border); --bs-btn-bg: var(--iv-surface);
    --bs-btn-hover-color: var(--iv-ink); --bs-btn-hover-bg: var(--iv-bg); --bs-btn-hover-border-color: #c3d1ce;
    --bs-btn-active-color: var(--iv-ink); --bs-btn-active-bg: #e6eeec; --bs-btn-active-border-color: #c3d1ce;
}
.btn-outline-dark { --bs-btn-color: var(--iv-ink); --bs-btn-border-color: var(--iv-ink); --bs-btn-hover-bg: var(--iv-ink); --bs-btn-hover-border-color: var(--iv-ink); }

/* ---------- Colores utilitarios (tema) ---------- */
.text-primary { color: var(--iv-brand) !important; }
.text-success { color: var(--iv-leaf-700) !important; }
.bg-primary { background-color: var(--iv-brand) !important; }
.bg-success { background-color: var(--iv-leaf) !important; }
.bg-dark { background-color: var(--iv-ink) !important; }
.link-primary, a { color: var(--iv-brand); }
a:hover { color: var(--iv-brand-700); }
.badge { font-weight: 600; letter-spacing: 0; padding: .42em .7em; border-radius: var(--iv-radius-xs); }
.badge.bg-primary { background-color: var(--iv-brand) !important; }
.badge.bg-success { background-color: var(--iv-leaf) !important; }
.badge.bg-light { background-color: var(--iv-bg) !important; }

/* ---------- Tarjetas ---------- */
/* Bootstrap pinta tarjetas, modales y menús con el fondo de la página: aquí van en blanco. */
.card { --bs-card-bg: var(--iv-surface); --bs-card-cap-bg: var(--iv-bg); --bs-card-border-radius: var(--iv-radius); --bs-card-inner-border-radius: calc(var(--iv-radius) - 1px); --bs-card-border-color: var(--iv-border); }
.card.shadow-sm { box-shadow: var(--iv-shadow) !important; }
.card.border-0 { background: var(--iv-surface); border: 1px solid rgba(16,41,44,.05) !important; }
.iv-card { transition: transform .18s ease, box-shadow .18s ease; overflow: hidden; border-radius: var(--iv-radius); }
.iv-card:hover { transform: translateY(-3px); box-shadow: var(--iv-shadow-lg) !important; }
.iv-card-img { height: 210px; background-size: cover; background-position: center; position: relative; }
.iv-card-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(16,41,44,.4)); }
.iv-badge-op { position: absolute; top: 12px; left: 12px; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
/* Indicadores de medios en la foto de la tarjeta (360° y 3D), arriba a la derecha. */
.iv-badges-medios { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.iv-badge-medio {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .6rem; border-radius: 999px;
    background: rgba(16,41,44,.82); color: #fff; backdrop-filter: blur(6px);
    font-size: .76rem; font-weight: 600; line-height: 1; white-space: nowrap;
}
.iv-badge-medio .bi { color: var(--iv-sun); }
.iv-badge-3d { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(16,41,44,.82) !important; backdrop-filter: blur(6px); }
.iv-badge-desc { position: absolute; bottom: 12px; right: 12px; z-index: 2; font-size: .9rem; }

/* ---------- Detalle ---------- */
.iv-photo { height: 470px; background-size: cover; background-position: center; }
.iv-carousel { overflow: hidden; border-radius: var(--iv-radius); }
.iv-sticky { position: sticky; top: 88px; }
.iv-avatar {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--iv-brand-soft); color: var(--iv-brand-700);
    display: flex; align-items: center; justify-content: center; flex: none;
    font-family: var(--iv-display); font-weight: 700; text-transform: uppercase;
}
.iv-splat-hint { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 5; color: #fff; background: rgba(16,41,44,.6); padding: 3px 14px; border-radius: 20px; font-size: .8rem; }
.iv-watermark { position: absolute; inset: 0; z-index: 4; pointer-events: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.iv-watermark::before { content: "InmoVista · InmoVista · InmoVista · InmoVista"; position: absolute; width: 200%; text-align: center; color: rgba(255,255,255,.28); font-family: var(--iv-display); font-weight: 800; font-size: 2rem; letter-spacing: 4px; transform: rotate(-24deg); line-height: 3.2; text-shadow: 0 1px 2px rgba(0,0,0,.25); white-space: normal; }
.iv-splat-error { color: #fff; text-align: center; padding: 2rem; }

/* ---------- Pills / Tabs ---------- */
.nav-pills .nav-link { color: var(--iv-ink-2); border-radius: 999px; font-weight: 600; }
.nav-pills .nav-link:hover { background: var(--iv-brand-soft); color: var(--iv-brand-700); }
.nav-pills .nav-link.active { background-color: var(--iv-ink); color: #fff; }
.nav-tabs { border-bottom-color: var(--iv-border); }
.nav-tabs .nav-link { color: var(--iv-muted); font-weight: 600; border: none; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link:hover { color: var(--iv-ink); }
.nav-tabs .nav-link.active { color: var(--iv-brand-700); background: transparent; border-bottom: 2px solid var(--iv-brand); }

/* ---------- Formularios ---------- */
.form-control, .form-select { border-radius: var(--iv-radius-sm); border-color: var(--iv-border); padding: .55rem .85rem; color: var(--iv-ink); background-color: var(--iv-surface); }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: var(--iv-bg); }
.form-control-sm, .form-select-sm { border-radius: 8px; padding: .3rem .65rem; }
.form-select-sm { padding-right: 2rem; }
.form-control::placeholder { color: #8a9a9a; }
.form-control:focus, .form-select:focus { border-color: var(--iv-brand); box-shadow: 0 0 0 .2rem rgba(var(--iv-brand-rgb), .16); }
.form-label { font-weight: 600; font-size: .9rem; color: var(--iv-ink-2); margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--iv-brand); border-color: var(--iv-brand); }
.form-check-input:focus { border-color: var(--iv-brand); box-shadow: 0 0 0 .2rem rgba(var(--iv-brand-rgb), .16); }
.input-group-text { border-color: var(--iv-border); background: var(--iv-bg); color: var(--iv-muted); border-radius: var(--iv-radius-sm); }

/* ---------- Tablas ---------- */
.table { --bs-table-bg: transparent; --bs-table-border-color: var(--iv-border); --bs-table-hover-bg: rgba(var(--iv-brand-rgb), .04); }
.table > :not(caption) > * > * { padding: .85rem .8rem; }
.table thead th, .table thead.table-light th { background: var(--iv-bg); color: var(--iv-muted); font-weight: 600; font-size: .84rem; border-bottom: 1px solid var(--iv-border); }
.table.bg-white { border-radius: var(--iv-radius); overflow: hidden; }

/* ---------- Alertas ---------- */
.alert { border: none; border-radius: 12px; border-left: 4px solid transparent; }
.alert-success { background: #e6f3ec; color: #1f5a3c; border-left-color: var(--iv-leaf); }
.alert-info { background: var(--iv-brand-soft); color: var(--iv-brand-700); border-left-color: var(--iv-brand); }
.alert-warning { background: #fdf3d7; color: #6f4d05; border-left-color: var(--iv-sun); }
.alert-danger { background: #fbe9e7; color: #9b2c2c; border-left-color: #d64545; }

/* ---------- Calificación estrellas ---------- */
.iv-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.iv-stars input { display: none; }
.iv-stars label { color: #d3dcda; cursor: pointer; padding: 0 2px; }
.iv-stars input:checked ~ label,
.iv-stars label:hover,
.iv-stars label:hover ~ label { color: var(--iv-sun); }

/* ---------- Utilidades varias ---------- */
.iv-thumb { width: 64px; height: 48px; border-radius: 8px; background-size: cover; background-position: center; }
.iv-fototile { height: 110px; background-size: cover; background-position: center; border-radius: 10px; position: relative; box-shadow: var(--iv-shadow); }
.iv-fp { position: absolute; top: 6px; left: 6px; }
.iv-fotoactions { position: absolute; bottom: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: .15s; }
.iv-fototile:hover .iv-fotoactions { opacity: 1; }
.modal { --bs-modal-bg: var(--iv-surface); }
.dropdown-menu { --bs-dropdown-bg: var(--iv-surface); }
.list-group { --bs-list-group-bg: var(--iv-surface); --bs-list-group-border-color: var(--iv-border); }
.modal-content { border: none; border-radius: 20px; box-shadow: var(--iv-shadow-lg); }
.modal-header, .modal-footer { border-color: var(--iv-border); }
.modal-title { font-family: var(--iv-display); font-weight: 700; letter-spacing: -.02em; }
.pagination { --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(var(--iv-brand-rgb), .16); }
.pagination .page-link { color: var(--iv-ink-2); border-radius: 8px; margin: 0 3px; border-color: var(--iv-border); min-width: 2.4rem; text-align: center; }
.pagination .page-link:hover { background: var(--iv-brand-soft); color: var(--iv-brand-700); }
.pagination .page-item.active .page-link { background: var(--iv-ink); border-color: var(--iv-ink); color: #fff; }

/* ---------- Buscador: tarjeta que monta sobre la portada ---------- */
.iv-searchbar { position: relative; z-index: 3; margin-top: -2.6rem; background: transparent; }
.iv-searchbar > .container > form {
    background: var(--iv-surface); border: 1px solid rgba(16,41,44,.06);
    border-radius: 20px; box-shadow: var(--iv-shadow-lg); padding: .35rem 1.1rem;
}
.iv-searchbar .form-control, .iv-searchbar .form-select { height: 48px; }
.iv-searchbar .btn { height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.iv-searchbar .input-group-text { border-color: var(--iv-border); }

/* Migas y título */
.iv-breadcrumb a { color: var(--iv-brand); }
.iv-page-title { font-family: var(--iv-display); font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.6rem, 3vw, 2.1rem); }

/* Toggle lista/cuadrícula */
.iv-view-toggle { display: inline-flex; padding: 3px; background: #e7eeec; border-radius: 12px; }
.iv-view-toggle .btn { border: 0; color: var(--iv-muted); border-radius: 9px; padding: .35rem .7rem; }
.iv-view-toggle .btn.active { color: var(--iv-ink); background: var(--iv-surface); box-shadow: 0 1px 3px rgba(16,41,44,.16); }

/* ---------- Tarjeta de propiedad ---------- */
.iv-prop-card { overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.iv-prop-card:hover { box-shadow: var(--iv-shadow-lg) !important; transform: translateY(-2px); }
.iv-prop-row { display: flex; }
.iv-prop-img { position: relative; flex: 0 0 340px; min-height: 250px; background-size: cover; background-position: center; display: block; }
.iv-prop-body { flex: 1; display: flex; flex-direction: column; padding: 1.2rem 1.4rem; min-width: 0; }
/* Las vistas escriben el estado en mayúsculas: aquí se muestra en frase. */
.iv-badge-estado {
    display: inline-block; text-transform: lowercase;
    background: var(--iv-brand-soft); color: var(--iv-brand-700);
    font-size: .78rem; font-weight: 600; padding: .28em .75em; border-radius: 999px;
}
.iv-badge-estado::first-letter, .iv-prop-tipo::first-letter { text-transform: uppercase; }
.iv-precio { font-family: var(--iv-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -.03em; color: var(--iv-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.iv-prop-titulo { display: block; font-family: var(--iv-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; color: var(--iv-ink); margin: .5rem 0 .15rem; text-decoration: none; }
.iv-prop-titulo:hover { color: var(--iv-brand); }
.iv-prop-specs { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--iv-ink-2); font-size: .92rem; font-weight: 500; margin-bottom: .5rem; font-variant-numeric: tabular-nums; }
.iv-prop-specs i { color: var(--iv-brand); margin-right: 4px; }
.iv-prop-tipo { display: inline-block; text-transform: lowercase; font-size: .84rem; color: var(--iv-muted); margin-bottom: .2rem; }

/* Vista cuadrícula */
.iv-listado.iv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.iv-listado.iv-grid .iv-prop-card { margin-bottom: 0 !important; }
.iv-listado.iv-grid .iv-prop-row { flex-direction: column; height: 100%; }
.iv-listado.iv-grid .iv-prop-img { flex: none; height: 200px; min-height: 0; }
.iv-listado.iv-grid .iv-prop-specs { gap: .3rem .8rem; font-size: .84rem; }

/* Contenedor ancho (barra superior y página de inicio): aprovecha la pantalla
   hasta 1680 px en lugar de los 1320 px de Bootstrap. Para cambiarlo, ajusta
   --iv-ancho-max. */
.container.iv-ancho { --iv-ancho-max: 1680px; max-width: var(--iv-ancho-max); }
@media (min-width: 1200px) {
    .container.iv-ancho { padding-left: 2rem; padding-right: 2rem; }
}

/* Barra lateral: destacadas */
.iv-mini-img { position: relative; height: 190px; background-size: cover; background-position: center; border-radius: 12px !important; }
.iv-mini-precio { position: absolute; bottom: 8px; left: 8px; background: rgba(16,41,44,.84); backdrop-filter: blur(6px); color: #fff; font-family: var(--iv-display); font-weight: 700; font-size: .88rem; padding: 3px 10px; border-radius: 8px; }

@media (max-width: 767px) {
    .iv-prop-row { flex-direction: column; }
    .iv-prop-img { flex: none; height: 210px; min-height: 0; }
    .iv-searchbar { margin-top: -2rem; }
    .iv-searchbar > .container > form { padding: .2rem .8rem; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .iv-card, .iv-prop-card { transition: none; }
    .iv-card:hover, .iv-prop-card:hover { transform: none; }
}

/* ---- Flechas de navegación del recorrido 360 (hot spots de Pannellum) ----
   Pannellum siempre aplica .pnlm-hotspot-base (que ya posiciona el elemento);
   .iv-hs solo le da la apariencia. El tooltip con el nombre del ambiente lo
   arma Pannellum a partir de "text", escapado por la propia librería. */
.iv-hs {
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .88);
    border: 2px solid rgba(15, 118, 110, .9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
    cursor: pointer;
    transition: transform .12s ease, background .12s ease;
}

.iv-hs:hover {
    background: #fff;
    transform: scale(1.12);
}

/* Chevron que indica "seguir hacia allá" */
.iv-hs::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    margin: -7px 0 0 -9px;
    border-right: 3px solid var(--iv-brand);
    border-bottom: 3px solid var(--iv-brand);
    transform: rotate(-45deg);
}

/* =====================================================================
   Espacio de trabajo de medios (panel del publicador)
   Mesa de luz: el lienzo es grafito y las imágenes son el único color.
   El verde mar marca selección; el verde hoja marca "ya conectado".
   ===================================================================== */
:root {
    --ws-canvas: #12262a;
    --ws-canvas-2: #1b3539;
    --ws-hair: rgba(255,255,255,.09);
    --ws-dim: #94aaa9;
}

.ws-shell { max-width: 1560px; margin-inline: auto; padding-inline: clamp(14px, 3vw, 30px); }

/* ---------- Cabecera ---------- */
.ws-back { color: var(--iv-muted); font-size: .86rem; }
.ws-back:hover { color: var(--iv-blue); }
.ws-title { font-family: var(--iv-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.5px; margin: .15rem 0 0; }
.ws-sub { color: var(--iv-muted); font-size: .86rem; }

/* Pestañas: subrayado, no píldoras */
.ws-tabs { display: flex; gap: 1.6rem; border-bottom: 1px solid var(--iv-border); margin: 1rem 0 1.25rem; }
.ws-tab { padding: .55rem 0 .7rem; color: var(--iv-muted); font-weight: 600; font-size: .94rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ws-tab:hover { color: var(--iv-ink); }
.ws-tab.is-on { color: var(--iv-blue); border-bottom-color: var(--iv-blue); }
.ws-tab .badge { font-weight: 600; }

/* ---------- Marco: rail + lienzo en una sola pieza ---------- */
.ws-frame {
    display: grid; grid-template-columns: 274px minmax(0, 1fr);
    border: 1px solid var(--iv-border); border-radius: var(--iv-radius);
    overflow: hidden; background: #fff; box-shadow: var(--iv-shadow);
}

.ws-rail { border-right: 1px solid var(--iv-border); padding: 1rem .9rem; background: #fff; }
.ws-rail h6 { font-size: .8rem; font-weight: 700; color: var(--iv-muted); margin: 0 0 .6rem; }
.ws-rail-grupo { font-size: .74rem; font-weight: 700; color: var(--iv-muted); margin: 1rem .35rem .35rem; }
.ws-rail-grupo:first-of-type { margin-top: .25rem; }

.ws-amb {
    display: flex; align-items: center; gap: .55rem; width: 100%;
    padding: .46rem .55rem; border-radius: 9px; border: 0; background: transparent;
    color: var(--iv-ink); font-size: .9rem; text-align: left; transition: background .12s;
}
.ws-amb:hover { background: var(--iv-bg); }
.ws-amb.is-on { background: rgba(var(--iv-brand-rgb), .1); color: var(--iv-blue); font-weight: 600; }
.ws-amb-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-amb-num { font-size: .78rem; color: var(--iv-muted); font-variant-numeric: tabular-nums; }
/* Punto de estado: oliva = tiene salida en el recorrido */
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--iv-border); flex: none; }
.ws-dot.is-ok { background: var(--iv-olive); }
.ws-dot.is-pano { background: var(--iv-cta); }

/* ---------- Lienzo ---------- */
.ws-canvas { background: var(--ws-canvas); padding: 1.1rem; min-height: 540px; position: relative; }
.ws-canvas-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; color: #fff; }
.ws-canvas-bar h6 { margin: 0; font-size: .95rem; font-weight: 700; color: #fff; }
.ws-canvas-bar .ws-sub { color: var(--ws-dim); }

.ws-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 1rem; }

.ws-tile { position: relative; }
.ws-tile-img {
    position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 9px;
    background-color: var(--ws-canvas-2); background-size: cover; background-position: center;
    outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .12s;
}
.ws-tile.is-sel .ws-tile-img { outline-color: var(--iv-cta); }
.ws-tile-nom { display: block; margin-top: .45rem; font-size: .84rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-tile-nom.is-vacio { color: var(--ws-dim); font-style: italic; }

/* Casilla de selección sobre la miniatura */
.ws-check { position: absolute; top: .45rem; left: .45rem; margin: 0; width: 20px; height: 20px; cursor: pointer; }
.ws-check:not(:checked) { background-color: rgba(255,255,255,.75); border-color: rgba(0,0,0,.25); }

.ws-tag { position: absolute; top: .45rem; right: .45rem; font-size: .68rem; font-weight: 700; padding: .18rem .42rem; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; }
.ws-tile-acc { position: absolute; left: .45rem; right: .45rem; bottom: .45rem; display: flex; gap: .3rem; justify-content: flex-end; opacity: 0; transition: opacity .12s; }
.ws-tile-img:hover .ws-tile-acc, .ws-tile:focus-within .ws-tile-acc { opacity: 1; }

/* ---------- Barra de selección: aparece al seleccionar ---------- */
.ws-bulk {
    position: sticky; bottom: 1rem; margin-top: 1.1rem;
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .55rem .7rem; border-radius: 12px;
    background: rgba(255,255,255,.97); border: 1px solid var(--iv-border);
    box-shadow: var(--iv-shadow-lg);
    transform: translateY(8px); opacity: 0; pointer-events: none; transition: transform .16s ease, opacity .16s ease;
}
.ws-bulk.is-on { transform: translateY(0); opacity: 1; pointer-events: auto; }
.ws-bulk-num { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Estados vacíos ---------- */
.ws-empty { color: var(--ws-dim); text-align: center; padding: 3.2rem 1rem; }
.ws-empty-t { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: .3rem; }

/* ---------- Visor del recorrido ---------- */
.ws-pano { position: relative; border-radius: 10px; overflow: hidden; background: #0a181a; min-height: 520px; height: 60vh; }
.ws-fab {
    position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%);
    width: 56px; height: 56px; border-radius: 50%; border: 0;
    background: #fff; color: var(--iv-ink); font-size: 1.5rem; line-height: 1;
    box-shadow: 0 6px 22px rgba(0,0,0,.45); cursor: pointer; z-index: 3;
    transition: background .14s, color .14s, transform .14s;
}
.ws-fab:hover { transform: translateX(-50%) scale(1.06); }
.ws-fab.is-on { background: var(--iv-cta); color: #fff; }
.ws-pano-hint {
    position: absolute; left: 50%; bottom: 5rem; transform: translateX(-50%); z-index: 3;
    background: rgba(10,24,26,.92); color: #fff; font-size: .84rem;
    padding: .5rem .8rem; border-radius: 9px; max-width: min(90%, 460px); text-align: center;
}

@media (max-width: 991px) {
    .ws-frame { grid-template-columns: 1fr; }
    .ws-rail { border-right: 0; border-bottom: 1px solid var(--iv-border); }
    .ws-pano { height: 56vh; min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
    .ws-bulk, .ws-fab, .ws-tile-img, .ws-tile-acc { transition: none; }
}

/* ---- Encabezado de sección plegable ----
   Un botón que ocupa toda la fila: el área de clic es el encabezado entero,
   no solo un enlace pequeño al costado. */
.iv-seccion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: .75rem;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    color: inherit;
}
.iv-seccion:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 3px; border-radius: 4px; }
.iv-seccion h6 { font-weight: 600; }
.iv-seccion .bi-chevron-down {
    flex: 0 0 auto;
    font-size: .8rem;
    color: var(--iv-muted);
    transition: transform .18s ease;
}
/* Bootstrap deja aria-expanded="true" mientras la sección está abierta. */
.iv-seccion[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }

/* ---- Subasta en la vitrina ----
   Un inmueble puede estar en venta Y en subasta a la vez: son dos cosas
   distintas y la tarjeta tiene que decir las dos. El ámbar las separa del
   azul de "en venta" sin competir con el rojo del descuento. */
.iv-badge-subasta {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: var(--iv-amber);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .6px;
    padding: .35em .7em;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.iv-badge-estado-subasta { background: #fdebd3; color: #92400e; }
.iv-subasta-cierre {
    color: #92400e;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    padding: .3rem .55rem;
    margin-bottom: .5rem;
}

/* ---- Accesos a los documentos de la subasta ----
   Filas con área de clic completa, no botones apretados. */
.iv-docs { display: flex; flex-direction: column; gap: 2px; }
.iv-doc {
    display: flex;
    align-items: center;
    gap: .7rem;
    width: 100%;
    padding: .6rem .5rem;
    border: 0;
    border-radius: 8px;
    background: none;
    text-align: left;
    color: inherit;
    transition: background .14s ease;
}
.iv-doc:hover { background: var(--iv-bg); }
.iv-doc:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.iv-doc > .bi:first-child { font-size: 1.15rem; color: var(--iv-blue-900); flex: 0 0 auto; }
.iv-doc > span { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.iv-doc strong { font-size: .88rem; font-weight: 600; line-height: 1.25; }
.iv-doc small { font-size: .76rem; color: var(--iv-muted); line-height: 1.3; }
.iv-doc-ir { font-size: .75rem; color: #adb5bd; flex: 0 0 auto; }

/* ---- Cuerpo de los modales informativos ---- */
.iv-modal-doc { font-size: .93rem; line-height: 1.6; color: var(--iv-ink-2); }
.iv-modal-doc h6 {
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--iv-blue-900);
    margin: 1.4rem 0 .4rem;
}
.iv-modal-doc h6:first-child { margin-top: 0; }
.iv-modal-doc p { margin-bottom: .6rem; }
/* Respeta los saltos de línea de un texto escrito a mano, sin perder el ancho. */
.iv-texto-legal { white-space: pre-line; }
.iv-texto-legal::first-line { font-weight: 500; }

/* Ficha de datos duros: etiqueta a la izquierda, valor a la derecha. */
.iv-ficha { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 .5rem; }
.iv-ficha dt { font-weight: 600; color: var(--iv-muted); font-size: .85rem; }
.iv-ficha dd { margin: 0; font-size: .9rem; }

.iv-lista-alcance { list-style: none; padding: 0; margin: 0; }
.iv-lista-alcance li { position: relative; padding-left: 1.4rem; margin-bottom: .4rem; }
.iv-lista-alcance li::before { position: absolute; left: 0; font-family: "bootstrap-icons"; }
.iv-lista-alcance.iv-si li::before { content: "\f26e"; color: #198754; }
.iv-lista-alcance.iv-no li::before { content: "\f62a"; color: #dc3545; }

@media (max-width: 575.98px) {
    .iv-ficha { grid-template-columns: 1fr; gap: 0 0; }
    .iv-ficha dd { margin-bottom: .5rem; }
}

/* ---- Invitación a instalar la aplicación ---- */
.iv-instalar {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 0 0 1.25rem;
    padding: .85rem 1.1rem;
    background: var(--iv-surface, #fff);
    border: 1px solid var(--iv-border);
    border-left: 4px solid var(--iv-blue);
    border-radius: var(--iv-radius-sm, 10px);
    box-shadow: var(--iv-shadow);
}
.iv-instalar > .bi:first-child { font-size: 1.5rem; color: var(--iv-blue); flex: 0 0 auto; }
.iv-instalar > div { display: flex; flex-direction: column; min-width: 0; }
.iv-instalar strong { font-size: .92rem; font-weight: 600; }
.iv-instalar small { font-size: .8rem; color: var(--iv-muted); line-height: 1.45; }
