/* ====================================================
   propiedades.css
   Estilos específicos para la página de propiedades.
   Se aplican sobre styles.css, mejorando la estética
   y forzando que, hasta encontrar una propiedad, 
   los contenedores principales permanezcan ocultos.
======================================================= */

/* ----------------------------------------------------
   Ocultación inicial de elementos (hasta que se encuentre
   una propiedad) – se usará la clase .visible para mostrarlos.
------------------------------------------------------ */
#property-results,
#property-analysis,
#property-description-section,
.property-main-details {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Clase para forzar que se muestren */
.visible {
  display: block;
  opacity: 1;
}

#property-grid {
  background-color: #fff;
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: 0 0.5rem 1.563rem rgba(0, 0, 0, 0.12);
  margin: 137.5rem auto;
  max-width: 137.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
  gap: 1.875rem;
  transition: all 0.3s ease;
  border: 0.063rem solid #e0e0e0;
}


/* ----------------------------------------------------
   Sección de Búsqueda
------------------------------------------------------ */
.search-section {
  background: linear-gradient(135deg, #F7F7F7, #F7F7F7);
  padding: 0.25rem 0;
  text-align: center;
  color: #fff;
}

.search-container {
  max-width: 56.25rem;
  margin: 0 auto;
  padding: 1.25rem;
}

.search-container .section-title {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.search-bar {
  display: flex;
  justify-content: center;
  gap: 0.938rem;
}

.search-bar input {
  flex: 1;
  padding: 0.938rem 1.563rem;
  border: none;
  border-radius: 3.125rem;
  font-size: 1.1rem;
  outline: none;
  transition: box-shadow 0.3s;
  box-shadow: 0 0 0.063rem #111;

}

.search-bar input:focus {
  box-shadow: 0 0 0.063rem #d4af37;
}



.search-bar button {
  font-size: 1rem;
  font-weight: 600;
  background-color: #333;
  color: var(--white);
  /* color neutro para el texto */
  border: 0.063rem solid #111;
  padding: 0.5rem 0.75rem;
  border-radius: 1.875rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.search-bar button:hover {
  background-color: #333;
  color: #fff;
  transform: translateY(- 0.125rem);
}

/* ----------------------------------------------------
   Tarjeta de Propiedad (RESULTADOS)
------------------------------------------------------ */
.property-results {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.875rem rgba(0, 0, 0, 0.15);
  padding: 2.5rem;
  margin: 0rem auto;
  max-width: 62.5rem;
  transition: opacity 0.5s ease;
}

.property-card {
  display: flex;
  flex-wrap: wrap;
  border-radius: 1rem;
  overflow: hidden;
}

.property-image-container {
  flex: 1 1 45%;
  overflow: hidden;
}

.property-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}



.property-info {
  flex: 1 1 55%;
  padding: 1.875rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.property-info h3 {
  font-size: 2.2rem;
  margin-bottom: 0.938rem;
  color: #2C3E50;
}

.property-info p {
  font-size: 1.1rem;
  margin-bottom: 1.563rem;
  color: #666;
  line-height: 1.6;
}

/* Cuadrícula de Estadísticas (.stat) – Estilo Mejorado */
.property-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62.5rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.property-stats .stat {
  background: linear-gradient(135deg, #F7F7F7, #FFFFFF);
  border: 0.063rem solid #DDD;
  padding: 0.938rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  color: #2C3E50;
  text-align: left;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.property-stats .stat:hover {
  transform: translateY(-0.188rem);
}

/* Botón “Ver Más Información” */
#show-inform-button {
  margin-top: 1.25rem;
  align-self: flex-start;
  padding: 0.75rem 1.875rem;
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 700;
}

/* ----------------------------------------------------
   Sección de Análisis y Detalles
------------------------------------------------------ */
.property-analysis {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.875rem rgba(0, 0, 0, 0.15);
  padding: 2.5rem;
  margin: 2.5rem auto;
  max-width: 62.5rem;
}

.property-main-details {
  text-align: center;
  margin-bottom: 1.875rem;
}

.property-main-details h3 {
  font-size: 2.2rem;
  margin-bottom: 0.625rem;
  color: #2C3E50;
}

.analysis-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  align-items: flex-start;
  margin-top: 1.875rem;
}

.analysis-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  overflow-x: auto;
  /* Evita desbordes */
}

.analysis-chart {
  width: 100%;
  max-width: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

.analysis-chart canvas {
  width: 100% !important;
  height: auto !important;
}


.analysis-details {
  flex: 1 1 25rem;
  max-width: 31.25rem;
}

/* Datos clave en cuadrícula (.details-grid) – Estilo Mejorado */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.875rem;
}

.details-grid div {
  background: linear-gradient(135deg, #F7F7F7, #FFFFFF);
  padding: 0.938rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  color: #2C3E50;
  border: 0.063rem solid #DDD;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.details-grid div:hover {
  transform: translateY(-0.188rem);
}

/* Botón de Gestión de Operación – Estilo Mejorado */
.property-actions {
  text-align: center;
  margin: 1.875rem 0;
}


/* ----------------------------------------------------
   Sección de Descripción Detallada
------------------------------------------------------ */
.property-description {
  background: #fff;
  border-radius: 1rem;
  padding: 2.5rem;
  margin: 2.5rem auto;
  max-width: 50rem;
  box-shadow: 0 0.5rem 1.875rem rgba(0, 0, 0, 0.15);
  text-align: left;
}

.property-description h3 {
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
  color: #2C3E50;
}

.property-description p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

/* Enlaces en la Descripción */
.property-links {
  text-align: center;
  margin-top: 1.25rem;
}

.property-links a {
  font-size: 1rem;
  color: #E74C3C;
  text-decoration: none;
  margin: 0 0.625rem;
  transition: color 0.3s;
  font-weight: bold;

}

.property-links a:hover {
  color: #C0392B;
}

@media (max-width: 48rem) {
  .property-description {
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0;
    padding: 0.938rem 0.938rem !important;
    box-shadow: none;
  }

  .property-description h3 {
    font-size: 1.8rem;
  }

  .property-description p {
    font-size: 1rem;
    text-align: justify;
  }
}


/* ----------------------------------------------------
   Mejoras para el Carousel (en index.html)
------------------------------------------------------ */
.carousel {
  overflow: hidden;
  position: relative;
  padding: 2.5rem 0;
  background: linear-gradient(90deg, #F8F9FA 0%, #ffffff 100%);
}

.carousel::before,
.carousel::after {
  content: "";
  position: absolute;
  top: 0;
  width: 5rem;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.carousel::before {
  left: 0;
  background: linear-gradient(to right, #ffffff, transparent);
}

.carousel::after {
  right: 0;
  background: linear-gradient(to left, #ffffff, transparent);
}

/* ----------------------------------------------------
   RESPONSIVE (AJUSTES PARA DISPOSITIVOS PEQUEÑOS)
------------------------------------------------------ */
@media (max-width: 48rem) {
  .property-card {
    flex-direction: column;
  }

  .property-image-container,
  .property-info {
    flex: 1 1 100%;
  }

  .analysis-content {
    flex-direction: column;
  }
}

:root {
  --lux-font-body: 'Playfair Display', serif;
}

#manage-operation-button {
  background-color: #2c2c2c;
  color: #fff;
  padding: 0.938rem 3.125rem;
  margin: 0 auto;
  border: none;
  border-radius: 1.875rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  text-transform: uppercase;
  max-width: 37.5rem;
  font-family: var(--lux-font-body);

}

#manage-operation-button :hover {
  background-color: #ffffff;
  transform: translateY(-0.188rem);
}





#popup-bloqueo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-contenido {
  background: white;
  padding: 2rem;
  text-align: center;
  max-width: 25rem;
  border-radius: 2.5rem;
  box-shadow: 0 0 1.25rem rgba(0, 0, 0, 0.3);
}

.popup-contenido h3 {
  margin-bottom: 1rem;
}

.popup-contenido p {
  margin-bottom: 1rem;
}

.popup-contenido a.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: #555;
  color: white;
  border-radius: 0.313rem;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.popup-contenido a.btn:hover {
  background: #fff;
  color: #555
}




.popup-inversion {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-inversion.hidden {
  display: none;
}

.popup-content {
  background: white;
  padding: 2rem;
  border-radius: 1.25rem;
  text-align: center;
  max-width: 25rem;
  width: 90%;
}

.popup-content input,
.popup-content select {
  width: 100%;
  padding: 0.625rem;
  margin: 0.938rem 0;
  font-size: 1rem;
  border: 0.063rem solid #ccc;
  border-radius: 0.625rem;
}

.popup-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.625rem;
}

.popup-buttons .btn {
  flex: 1;
  padding: 0.625rem;
  font-weight: bold;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
}


@media (max-width: 48rem) {
  .analysis-chart {
    width: 100%;
    padding: 0;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
    margin: 1.25rem auto;
  }

  .analysis-chart canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
  }
}




#popup-confirmacion .popup-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.938rem;
  margin-top: 1.25rem;
}

#popup-confirmacion .btn {
  flex: 1;
  text-align: center;
}

.property-precio-boton {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.625rem;
}

.property-precio-boton p {
  margin: 0;
  font-weight: bold;
}

.property-precio-boton .invertir-btn {
  background-color: #2c2c2c;
  color: white;
  padding: 0.938rem 3.125rem;
  border: none;
  border-radius: 1.875rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  text-transform: uppercase;
  font-family: var(--lux-font-body);

}

.property-precio-boton .invertir-btn:hover {
  background-color: #111111;
  transform: translateY(- 0.125rem);
}




/* Contenedor principal desplazable */
#main-content {
  transition: margin-left 0.3s ease-in-out;
  margin-left: 0;
  gap: 10px
}

/* Escritorio (>=1100px): ~5% de margen a cada lado, igual que el resto de
   pantallas (este contenedor es full-width por defecto). */
@media (min-width: 1100px) {
  #main-content {
    padding-left: 5%;
    padding-right: 5%;
    box-sizing: border-box;
  }
}

/* Cuando sidebar está abierto, empuja el contenido */
#sidebar.open~#main-content {
  margin-left: 15.625rem;
  /* mismo valor que el ancho del sidebar */
}


#sidebar.open {
  transform: translateX(0);
}

#sidebar nav ul {
  list-style: none;
  padding: 0;
}

#sidebar nav ul li {
  margin-bottom: 1.25rem;
}

#sidebar nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-family: var(--lux-font-body);
  transition: color 0.2s;
}

#sidebar nav ul li a:hover {
  color: #d4af37;
}

/* Botón de menú */
#toggle-sidebar {
  position: fixed;
  top: 9.375rem;
  left: 1.25rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #2c2c2c;
  z-index: 1100;
  cursor: pointer;
  transition: transform 0.2s;
}



/* Ajustes para cuando el sidebar está abierto en móviles */
@media (max-width: 48rem) {
  #sidebar {
    width: 13.75rem;
    padding: 3.125rem 0.938rem;
    top: 5rem !important;
    height: 100% !important;
  }

  #toggle-sidebar {
    font-size: 1.8rem;
  }
}


/* Altura del header */
:root {
  --header-height: 8.75rem;
  /* ajusta si tu header tiene otra altura */
}

/* Estilos para el sidebar */
#sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 15.625rem;
  height: calc(100vh - var(--header-height));
  background-color: #111;
  color: #fff;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 900;
  padding: 1.25rem;
}

#sidebar nav ul {
  list-style: none;
  padding: 0;
}

#sidebar nav ul li {
  margin: 0.938rem 0;
}

#sidebar nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

#sidebar.open {
  transform: translateX(0);
}

/* Contenido principal (empujado cuando el sidebar está abierto) */
#main-content {
  transition: margin-left 0.3s ease;
}

#sidebar.open~#main-content {
  margin-left: 15.625rem;
}

/* ============ SUBMENÚ ESTILOS EN SIDEBAR ============ */

.menu-section {
  margin-top: 1.25rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1a1a1a;
  padding: 0.625rem 0.938rem;
  border-radius: 0.375rem;
  cursor: pointer;
  color: #fff;
  font-family: var(--lux-font-body);
  font-size: 1rem;
  font-weight: 600;
}

.section-header:hover {
  background-color: #333;
}

.section-header h2 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.section-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.section-toggle.collapsed {
  transform: rotate(-90deg);
}

/* Submenús ocultos */
.submenu {
  margin-top: 0.625rem;
  margin-left: 0.625rem;
  padding-left: 0.625rem;
  border-left: 0.125rem solid #444;
  display: block;
}

.submenu.hidden {
  display: none;
}

.submenu li {
  margin: 0.5rem 0;
}

.submenu li a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.submenu li a:hover {
  color: #d4af37;
}


.sidebar-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100% - var(--header-height));
  background: rgba(0, 0, 0, 0.4);
  z-index: 850;
  display: none;
}

.sidebar-overlay.visible {
  display: block;
}

/* Submenús */
.submenu {
  padding-left: 0.938rem;
  margin-top: 0.625rem;
  transition: max-height 0.3s ease;
}

.submenu.hidden {
  display: none;
}

/* Botón de sección desplegable */
.section-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  margin-left: auto;
  transition: transform 0.3s ease;
}

.section-toggle.collapsed {
  transform: rotate(-90deg);
}

/* Encabezado de sección */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem 0;
  border-bottom: 0.063rem solid rgba(255, 255, 255, 0.1);
}


.toggle-sidebar-btn {
  position: fixed;
  top: var(--header-height);
  /* debajo del header */
  left: 0.188rem;
  z-index: 1100;
  font-size: 1.5rem;
  background: white;
  border: 0.063rem solid #111;
  border-radius: 0.375rem;
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, left 0.3s ease;
  top: 10.625rem;

}



@media (max-width: 48rem) {
  .search-container {
    flex-direction: column;
    align-items: stretch;
  }

  .toggle-sidebar-btn {
    align-self: center;
    margin: 0 auto 0.625rem auto;
  }
}


/* Cuando el sidebar está abierto, mueve el botón */
#sidebar.open~#toggleSidebarBtn {
  left: 15.625rem;
}


.toggle-sidebar-btn:hover {
  background: #eee;
}


/* Estilo inicial del sidebar oculto */
#sidebar {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

/* Cuando se abre */
#sidebar.open {
  transform: translateX(0);
}

/* El overlay */
.sidebar-overlay {
  display: none;
}

.sidebar-overlay.visible {
  display: block;
}

/* Header desplazable */
.lux-header {
  position: relative;
  /* Importante: no fixed */
  top: 0;
  z-index: 1000;
  width: 100%;
}


.lux-header.scroll-follow.hide {
  transform: translateY(-100%);
}



/* ========================================
   ESTILOS RESPONSIVOS PARA TABLETS Y MÓVILES
   ======================================== */

/* Tablets (hasta 64rem) */
@media (max-width: 64rem) {
  .search-container {
    padding: 0.938rem;
  }

  .property-stats {
    grid-template-columns: 1fr;
  }

  .property-description,
  .property-analysis,
  .property-results {
    padding: 1.25rem;
    margin: 1.25rem auto;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .analysis-content {
    flex-direction: column;
    gap: 1.25rem;
  }

  .toggle-sidebar-btn {
    font-size: 1.3rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Móviles (hasta 48rem) */
@media (max-width: 48rem) {
  #property-grid {
    padding: 1.25rem;
    gap: 1.25rem;
  }

  .search-container {
    padding: 0.625rem;
    max-width: 100%;
  }

  .search-bar {
    margin-top: 50px;
    gap: 0.625rem;
  }



  #propiedades-container {
    margin-top: 20px !important;
  }

  .search-bar input,
  .search-bar button {
    font-size: 1rem;
  }

  .property-info h3 {
    font-size: 1.6rem;
  }

  .property-info p,
  .property-description p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .property-description h3,
  .property-main-details h3 {
    font-size: 1.5rem;
  }

  .popup-content {
    padding: 1.5rem;
    max-width: 90%;
  }

  .toggle-sidebar-btn {
    font-size: 1.2rem;
    padding: 0.5rem 0.75rem;
    left: 0.313rem;
    top: 5.625rem;
  }

  #sidebar.open~#main-content {
    margin-left: 0;
  }
}

.header-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  align-items: center;
  justify-items: center;
  width: 100%;
  text-align: center;
  text-decoration: none;
  color: #111;
  text-decoration: none !important;

}

.codigo {
  justify-self: start;
  text-decoration: none !important;

}

.precio {
  justify-self: center;
  text-decoration: none !important;

}

.variacion {
  justify-self: end;
  text-decoration: none !important;

}

@media (max-width: 768px) {
  .header-top {
    grid-template-columns: 30% 30% 20% 20%;
    font-size: 0.8rem;
  }
}

.search-section {
  padding-top: 10px;
  padding-bottom: 0;
  margin-bottom: 0;
}

.search-container {
  padding-top: 0;
  padding-bottom: 0;
}

#propiedades-container {
  margin-top: 10px !important;
  padding-top: 0 !important;
}



/* =========================================================
   RI — Alineación perfecta entre cards (foto a la IZQUIERDA)
   ========================================================= */

/* Card base */
body .property-header {
  display: flex;
  flex-direction: row;
  /* foto a la izquierda */
  align-items: stretch;
}

/* Foto: ancho fijo = alineación perfecta */
body .property-header>img {
  width: 84px !important;
  height: 100% !important;
  flex: 0 0 84px !important;
  object-fit: cover;
}

/* Anula escalados / auto-width del JS */
body .property-header .details {
  transform: none !important;
  width: 100% !important;
  padding: 0 14px !important;
}

/* ===== GRID CLAVE ===== */
body .property-header .header-top {
  display: grid !important;
  align-items: center;
  width: 100%;

  /* Columnas iguales en TODAS las cards */
  grid-template-columns:
    1fr
    /* código */
    110px
    /* precio */
    92px
    /* variación */
    44px;
  /* icono */

  column-gap: 12px;
  white-space: nowrap;
}

/* Código */
body .property-header .header-top h2 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  display: none;
}

/* Precio */
body .property-header .header-top h3 {
  margin: 0;
  text-align: right;
}

/* Variación */
body .property-header .header-top .variation {
  text-align: right;
}

/* Icono siempre alineado */
body .property-header .header-top .tipoinv {
  justify-self: end;
  width: 34px !important;
  height: 34px !important;
  object-fit: contain !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  body .property-header>img {
    width: 72px !important;
    flex-basis: 72px !important;
  }

  body .property-header .header-top {
    grid-template-columns: 1fr 92px 76px 38px;
    column-gap: 10px;
  }
}

@media (max-width: 430px) {
  body .property-header .header-top {
    grid-template-columns: 76px 25px 1fr;
  }
}

/* === Nombre del proyecto (arriba de la card) === */
.opp-name {
  font-weight: 700;

}

/* Nombre arriba — plantilla 2 */
.property-he .opp-name {
  width: 100%;
  margin-bottom: 6px;

  font-size: 12px;
  font-weight: 600;

  text-align: center;
  color: #555;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  opacity: 0.85;
}

@media (max-width: 768px) {
  .property-he .opp-name {
    font-size: 11px;
    margin-bottom: 4px;
  }
}

.property-header,
.property-he {
  position: relative;
}

.ri-closed-badge {
  position: absolute;
  right: 0;
  z-index: 5;
  padding: 6px 6px;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #C9CBD0, #B0B3B8, #A6A9AD);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  pointer-events: none;
  display: none;
}

body .property-header {
  display: flex;
  align-items: stretch;
  min-height: 74px;
  border-radius: 14px;
  overflow: hidden;
}

body .property-header>img {
  width: 74px !important;
  height: 74px !important;
  flex: 0 0 74px !important;
  object-fit: cover;
  border-radius: 69px;
}

body .property-header .details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px !important;
  transform: none !important;
  width: 100% !important;
}

.property-header .ri-card-top,
.property-header .ri-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.property-header .ri-card-top {
  align-items: flex-start;
}

.property-header .opp-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 15.8px;
  font-weight: 500;
  color: #111;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.property-header .ri-metrics-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.property-header .variation {
  font-size: 13px;
  font-weight: 700;
  color: #111;
}

.property-header .term {
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

.property-header .ri-funding-sim {
  flex: 1;
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
}

.property-header .ri-funding-bar {
  width: 100%;
  height: 4px;
  background: black;
  border-radius: 999px;
  overflow: hidden;
}

.property-header .ri-funding-fill {
  height: 100%;
  width: 72%;
  border-radius: 999px;
}

.property-header .ri-card-bottom .tipoinv {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain !important;
  flex: 0 0 auto;
  opacity: 0.9;
}


body .property-header {
  display: flex;
  align-items: stretch;
  min-height: 82px;
  border-radius: 0px;
  overflow: hidden;
  background: white;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

body .property-header>img {
  width: 74px !important;
  height: 72px !important;
  flex: 0 0 74px !important;
  object-fit: cover;
}

body .property-header .details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px !important;
  transform: none !important;
  width: 100% !important;
  gap: 0;
}

.property-header .ri-card-top,
.property-header .ri-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.property-header .ri-card-top {
  align-items: flex-start;
  margin-top: 6px;
}

.property-header .ri-card-bottom {
  align-items: flex-end;
}

.property-header .opp-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 15.8px;
  font-weight: 500;
  color: #111;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

}

.property-header .ri-metrics-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.property-header .variation {
  font-size: 13px;
  font-weight: 700;
  color: black;
}

.property-header .term {
  font-size: 13px;
  font-weight: 700;
  color: black;
  display: none;
}

.property-header .ri-funding-sim {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.property-header .ri-funding-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.property-header .ri-funded-label {
  font-size: 13px;
  font-weight: 500;
  color: #111;
  line-height: 1;
}

.property-header .ri-funding-bar {
  width: 100%;
  height: 4px;
  background: gray;
  border-radius: 999px;
  overflow: hidden;
}

.property-header .ri-funding-fill {
  height: 100%;
  border-radius: 999px;
  background-color: black;
}

.property-header .ri-funding-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.property-header .ri-capital-target {
  font-size: 10px;
  font-weight: 500;
  color: #7a7a7a;
  line-height: 1;
  display: none;
}

.property-header .ri-card-bottom .tipoinv {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain !important;
  flex: 0 0 auto;
  opacity: 0.9;
  margin-bottom: 11.6395px;
  border-radius: 999px;
  position: absolute;
  right: 18px;
}

.ri-btn-invertir {
  background: transparent;
  color: #111;
  border: none;
  border-radius: 0px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  right: 18px;
  position: absolute;
  bottom: 32px;
  white-space: nowrap;
  display: none;
  border: 1px solid gainsboro;
}


/* Contenedor del título */
.ri-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* Botón redondo */
.ri-info-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #111;
  font-size: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid black;
  margin-top: 8px;
}

/* Texto informativo */
.ri-info-text {
  position: absolute;
  top: 50%;
  left: 185px;
  /* 👈 ahora se va a la derecha del botón */
  transform: translateY(-50%);

  background: #fff;
  color: #111;
  padding: 10px 12px;
  font-size: 9px;
  border-radius: 8px;
  max-width: 260px;
  line-height: 1.4;
  border: 1px solid black;
  white-space: normal;
  z-index: 10;
}

.ri-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  /* 👈 clave */
}

/* =========================================
   Popup inferior tipo Revolut - Ofertas Black
========================================= */

/* Evita scroll del fondo cuando el popup está abierto */
body.ri-sheet-open {
  overflow: hidden;
}

/* Fondo oscuro */
.ri-bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 99999;
}

/* Estado visible */
.ri-bottom-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Caja del popup */
.ri-bottom-sheet {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 14px 18px 24px;
  box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

/* Cuando se abre, sube */
.ri-bottom-sheet-overlay.active .ri-bottom-sheet {
  transform: translateY(0);
}

/* Rayita superior tipo app */
.ri-bottom-sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 0 auto 14px;
}

/* Cabecera */
.ri-bottom-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ri-bottom-sheet-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

/* Botón cerrar */
.ri-bottom-sheet-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: #111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cuerpo */
.ri-bottom-sheet-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}

/* Botón info redondo */


/* Cabecera del título */
.ri-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* Móvil */
@media (max-width: 768px) {
  .ri-bottom-sheet {
    max-width: 100%;
    padding: 14px 16px 93px;
    border-radius: 22px 22px 0 0;
  }

  .ri-bottom-sheet-header h3 {
    font-size: 18px;
  }

  .ri-bottom-sheet-body p {
    font-size: 13px;
  }
}

/* =========================================================
   RI OFFER CARD V3 — diseño premium tipo mock generado
   Pegar al FINAL de propiedades.css
   ========================================================= */

#propiedades-container {
  gap: 14px !important;
  padding: 12px !important;
}

.property-header.ri-offer-card {
  position: relative;
  display: block !important;
  background: #ffffff !important;
  border: 1px solid #e7e4df;
  border-radius: 26px !important;
  overflow: hidden;
  text-decoration: none !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  min-height: auto !important;
  height: auto !important;
  padding: 0 !important;
  color: #111 !important;
}

.ri-offer-main {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 18px 18px 14px 18px;
  align-items: start;
}

.ri-offer-thumb-wrap {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  overflow: hidden;
  flex: 0 0 auto;
}

.property-header.ri-offer-card .ri-offer-thumb {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
}

.ri-offer-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ri-offer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ri-offer-title-wrap {
  flex: 1;
  min-width: 0;
}

.ri-offer-title {
  font-size: 19px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #171717;
  margin-bottom: 12px;
}

.ri-offer-return {
  flex: 0 0 auto;
  text-align: right;
  min-width: 86px;
}

.ri-offer-return-value {
  font-size: 21px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0b8a2a;
}

.ri-offer-return-label {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #4f4f4f;
  text-transform: lowercase;
}

.ri-offer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ri-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f1efec;
  color: #272727;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ri-offer-guarantee {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1c1c1c;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.ri-offer-shield {
  font-size: 17px;
  line-height: 1;
}

.ri-offer-progress-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ri-offer-progress-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  color: #373737;
  line-height: 1.2;
}

.ri-offer-progress-strong {
  color: #0b8a2a;
  font-weight: 800;
}

.ri-offer-progress-sep {
  color: #8a8a8a;
}

.ri-offer-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #ddd8d2;
  overflow: hidden;
}

.ri-offer-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d8d2b 0%, #0a7a24 100%);
}

.ri-offer-progress-fill.is-closed {
  background: linear-gradient(90deg, #d91313 0%, #b90f0f 100%);
}

.ri-offer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #ece8e2;
  padding: 12px 18px 14px 18px;
  background: #fff;
}

.ri-offer-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.ri-offer-platform-icon {
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px;
  object-fit: cover !important;
  flex: 0 0 auto;
}

.ri-offer-platform {
  font-size: 13px;
  font-weight: 800;
  color: #22314d;
  white-space: nowrap;
}

.ri-offer-divider {
  width: 1px;
  height: 18px;
  background: #d8d3cd;
  flex: 0 0 auto;
}

.ri-offer-location {
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: #5a5a5a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ri-offer-footer-right {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.ri-offer-capital-current {
  font-size: 13px;
  font-weight: 800;
  color: #2a2a2a;
}

.ri-offer-capital-total {
  font-size: 12px;
  font-weight: 500;
  color: #757575;
}

.ri-offer-arrow {
  margin-left: 6px;
  font-size: 26px;
  line-height: 1;
  color: #6d6d6d;
}

.ri-offer-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.ri-offer-badge--closed {
  background: #b80f0f;
}

.property-header.ri-offer-card.is-closed {
  opacity: 0.97;
}

.property-header.ri-offer-card.is-closed .ri-offer-return-value {
  color: #0b8a2a;
}

@media (max-width: 768px) {
  #propiedades-container {
    gap: 12px !important;
    padding: 10px !important;
  }

  .ri-offer-main {
    grid-template-columns: 86px 1fr;
    gap: 12px;
    padding: 14px 14px 12px 14px;
  }

  .ri-offer-thumb-wrap {
    width: 86px;
    height: 86px;
    border-radius: 22px;
  }

  .ri-offer-top {
    gap: 12px;
  }

  .ri-offer-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .ri-offer-return-value {
    font-size: 18px;
  }

  .ri-offer-return-label {
    font-size: 10px;
  }

  .ri-chip {
    min-height: 26px;
    padding: 0 10px;
    font-size: 11px;
  }

  .ri-offer-guarantee {
    font-size: 13px;
  }

  .ri-offer-progress-text {
    font-size: 12px;
  }

  .ri-offer-progress-bar {
    height: 7px;
  }

  .ri-offer-footer {
    padding: 11px 14px 13px 14px;
    gap: 10px;
  }

  .ri-offer-platform-icon {
    width: 24px !important;
    height: 24px !important;
  }

  .ri-offer-platform,
  .ri-offer-location,
  .ri-offer-capital-current,
  .ri-offer-capital-total {
    font-size: 11px;
  }

  .ri-offer-arrow {
    font-size: 22px;
    margin-left: 2px;
  }
}

@media (max-width: 430px) {
  .ri-offer-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .ri-offer-footer-left,
  .ri-offer-footer-right {
    width: 100%;
  }

  .ri-offer-footer-right {
    justify-content: flex-end;
  }
}

/* ===== Imagen izquierda con barra circular de financiación ===== */
body .property-header {
  display: flex;
  align-items: center;
  min-height: 82px;
  overflow: hidden;
  background: white;
  gap: 12px;
  padding-left: 10px;
  zoom: .93;
}

body .property-header>img {
  display: none !important;
}

/* Contenedor general del anillo */
.property-header .ri-thumb-ring {
  --size: 74px;
  --thickness: 4px;
  --track: transparent;

  position: relative;
  width: var(--size);
  height: var(--size);
  flex: 0 0 var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;

  background:
    conic-gradient(var(--ring-color, #111) 0deg,
      var(--ring-color, #111) var(--progress, 0deg),
      var(--track) var(--progress, 0deg),
      var(--track) 360deg);
}

/* Agujero interior del anillo */
.property-header .ri-thumb-ring::before {
  content: "";
  position: absolute;
  inset: var(--thickness);
  background: #fff;
  border-radius: 50%;
  z-index: 1;
}

/* Capa interior que contiene la imagen */
.property-header .ri-thumb-ring-inner {
  position: relative;
  z-index: 2;
  width: calc(100% - (var(--thickness) * 2) - 2px);
  height: calc(100% - (var(--thickness) * 2) - 2px);
  border-radius: 50%;
  overflow: hidden;
}

/* Imagen real */
.property-header .ri-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ya no hace falta la barra horizontal */
.property-header .ri-funding-bar,
.property-header .ri-funding-fill {
  display: none !important;
}

/* Ajuste del bloque de texto */
.property-header .ri-funding-sim {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.property-header .ri-funded-label {
  font-size: 13px;
  font-weight: 500;
  color: #111;
  line-height: 1;
}

.property-header .ri-capital-target {
  display: none;
}

/* Móvil */
@media (max-width: 640px) {
  .property-header .ri-thumb-ring {
    --size: 68px;
    --thickness: 3px;
  }

  body .property-header {
    min-height: 78px;
    gap: 10px;
    padding-left: 8px;
    border-bottom: 1px solid gainsboro;
  }
}

/* ===== Tabs superiores ===== */
.ri-top-tabs-wrap {
  padding: 0px 12px 0;
  background: #fff;
  position: sticky;
  top: 68px;
  z-index: 20;
}

.ri-top-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #e5e7eb;
}

.ri-top-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 14px 8px 12px;
  font-size: 17px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.ri-top-tab.is-active {
  color: #111;
  font-weight: 700;
  border-bottom-color: #111;
}

/* ===== Emisores sin colapsar ===== */
.emisores-section {
  display: none;
}

.emisores-section.is-visible {
  display: block;
}

.emisores-list {
  list-style: none;
  padding: 0;
  margin: 0 10px 14px;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  overflow: visible !important;
  max-height: none !important;
}

.emisores-list.is-collapsed,
.emisores-list.is-expanded {
  overflow: visible !important;
  max-height: none !important;
}

.emisores-toggle,
.emisores-header {
  display: none !important;
}

.emisor-link {
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  min-height: 82px;
  text-decoration: none;
}

@media (max-width: 768px) {
  .ri-top-tab {
    font-size: 15px;
    padding: 7px 6px 10px;
  }

  .emisores-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .emisor-link {
    min-height: 72px;
    border-radius: 14px;
    padding: 12px;
  }
}

#emisores-section-top {
  display: none;
}

#emisores-section-top.is-visible {
  display: block;
}