/* ============================================================
   modern.css – Propiedades Maule | Rediseño Visual 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  --pm-primary: #1a56db;
  --pm-primary-h: #1e40af;
  --pm-accent: #f59e0b;
  --pm-dark: #0f172a;
  --pm-dark-2: #1e293b;
  --pm-bg: #f1f5f9;
  --pm-card: #ffffff;
  --pm-text: #334155;
  --pm-muted: #64748b;
  --pm-border: #e2e8f0;
  --pm-radius: 14px;
  --pm-radius-sm: 8px;
  --pm-shadow: 0 4px 24px rgba(15, 23, 42, .10);
  --pm-shadow-h: 0 12px 40px rgba(15, 23, 42, .18);
  --pm-transition: .3s cubic-bezier(.4, 0, .2, 1);
}

/* ── Base ───────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Open Sans', sans-serif !important;
  background-color: var(--pm-bg) !important;
  color: var(--pm-text) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Inter', 'Roboto', sans-serif !important;
  color: var(--pm-dark) !important;
}

/* ── Slider caption text ─────────────────────────────────── */
.camera_caption h1,
.camera_caption h2,
.camera_caption h3,
.camera_caption p {
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .5) !important;
}

a {
  transition: var(--pm-transition) !important;
}

/* ── WhatsApp float ─────────────────────────────────────── */
.whatsapp-float {
  bottom: 80px !important;
  right: 24px !important;
  z-index: 9999 !important;
  position: fixed !important;
  box-shadow: 0 6px 24px rgba(37, 211, 102, .4) !important;
}

/* ── Login Bar ──────────────────────────────────────────── */
.jBar {
  background: var(--pm-dark) !important;
}

.jBar .botton {
  background: var(--pm-primary) !important;
  border-radius: var(--pm-radius-sm) !important;
  font-weight: 600 !important;
  letter-spacing: .3px !important;
  transition: var(--pm-transition) !important;
}

.jBar .botton:hover {
  background: var(--pm-primary-h) !important;
}

/* ── Top Line ───────────────────────────────────────────── */
.line {
  background: linear-gradient(90deg, var(--pm-primary), var(--pm-accent)) !important;
  height: 4px !important;
}

/* ── Navigation ─────────────────────────────────────────── */
nav {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
  padding: 0 !important;
  box-shadow: 0 2px 24px rgba(0, 0, 0, .45) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
}

.logo img {
  max-width: 180px !important;
  position: relative !important;
  top: auto !important;
  padding: 10px 0 !important;
}

.sf-menu {
  padding-top: 0 !important;
}

.sf-menu>li {
  border: none !important;
  padding: 20px 0 !important;
  margin: 0 6px !important;
  position: relative !important;
}

.sf-menu>li>a {
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: .6px !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  padding: 6px 14px !important;
  border-radius: var(--pm-radius-sm) !important;
  transition: var(--pm-transition) !important;
}

.sf-menu>li>a:hover,
.sf-menu>li.sfHover>a {
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
}

.sf-menu>li::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 3px;
  background: var(--pm-primary);
  border-radius: 3px 3px 0 0;
  transition: var(--pm-transition);
}

.sf-menu>li:hover::after {
  left: 0;
  right: 0;
}

.sf-menu ul {
  background: var(--pm-dark-2) !important;
  border-radius: 0 0 var(--pm-radius-sm) var(--pm-radius-sm) !important;
  box-shadow: var(--pm-shadow-h) !important;
  border: 1px solid rgba(255, 255, 255, .06) !important;
  min-width: 180px !important;
}

.sf-menu li li a {
  color: #94a3b8 !important;
  padding: 10px 20px !important;
  font-size: 13px !important;
}

.sf-menu li li a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .06) !important;
}

/* ── Search / Filtro horizontal ─────────────────────────── */
.filter_horizontal {
  background: rgba(15, 23, 42, .82) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
  padding: 16px 0 14px !important;
}

.filter_horizontal label {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .8px !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  margin-bottom: 4px !important;
  display: block !important;
}

.filter_horizontal select {
  border-radius: var(--pm-radius-sm) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  background: rgba(255, 255, 255, .07) !important;
  color: #fff !important;
  height: 40px !important;
  font-size: 14px !important;
  padding: 0 10px !important;
  transition: var(--pm-transition) !important;
}

.filter_horizontal select:focus {
  outline: none !important;
  border-color: var(--pm-primary) !important;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .25) !important;
}

.filter_horizontal select option {
  background: var(--pm-dark-2);
  color: #fff;
}

.filter_horizontal .button,
.filter_horizontal input[type="submit"] {
  background: linear-gradient(135deg, var(--pm-primary), #2563eb) !important;
  border: none !important;
  border-radius: var(--pm-radius-sm) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 10px 28px !important;
  cursor: pointer !important;
  margin-top: 0 !important;
  height: 40px !important;
  line-height: 1 !important;
  box-shadow: 0 4px 12px rgba(26, 86, 219, .35) !important;
  transition: var(--pm-transition) !important;
  width: auto !important;
  font-style: normal !important;
}

.filter_horizontal .button:hover,
.filter_horizontal input[type="submit"]:hover {
  background: linear-gradient(135deg, var(--pm-primary-h), #1d4ed8) !important;
  box-shadow: 0 6px 20px rgba(26, 86, 219, .45) !important;
  transform: translateY(-1px) !important;
}

/* ── Content area ───────────────────────────────────────── */
.content_info {
  background: var(--pm-bg) !important;
}

.content_info>.container {
  padding-top: 40px !important;
}

/* ── Section titles ─────────────────────────────────────── */
.titles {
  margin: 40px 0 30px 0 !important;
  position: relative;
  padding-bottom: 12px;
}

.titles::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--pm-primary), var(--pm-accent));
  border-radius: 4px;
}

.titles h1 {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: var(--pm-dark) !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  letter-spacing: -.3px !important;
}

/* ── Bar propiedades ────────────────────────────────────── */
.bar_properties {
  background: var(--pm-dark-2) !important;
  border-radius: var(--pm-radius-sm) !important;
  margin-bottom: 28px !important;
}

.bar_properties ul li a {
  color: #94a3b8 !important;
}

.bar_properties ul li:hover {
  background: rgba(255, 255, 255, .07) !important;
  border-radius: 6px;
}

.bar_properties ul li a:hover {
  color: #fff !important;
}

.bar_properties strong {
  color: #cbd5e1 !important;
}

/* ── Property Cards ─────────────────────────────────────── */
.item_property {
  background: var(--pm-card) !important;
  border-radius: var(--pm-radius) !important;
  overflow: hidden !important;
  box-shadow: var(--pm-shadow) !important;
  transition: var(--pm-transition) !important;
  margin-bottom: 28px !important;
  border: 1px solid var(--pm-border) !important;
}

.item_property:hover {
  box-shadow: var(--pm-shadow-h) !important;
  transform: translateY(-4px) !important;
}

.head_property {
  overflow: hidden !important;
  position: relative !important;
}

/* Image overlay on hover */
.head_property::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(15, 23, 42, .55) 100%);
  opacity: 0;
  transition: var(--pm-transition);
  pointer-events: none;
}

.item_property:hover .head_property::after {
  opacity: 1;
}

.head_property img {
  width: 100% !important;
  height: 210px !important;
  object-fit: cover !important;
  display: block !important;
  transition: var(--pm-transition) !important;
}

.item_property:hover img {
  transform: scale(1.06) !important;
  opacity: 1 !important;
}

/* Badge tipo operación */
.item_property h5 {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  bottom: auto !important;
  left: auto !important;
  background: #dc2626 !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  padding: 5px 14px !important;
  border-radius: 20px !important;
  line-height: 1.6 !important;
  box-shadow: 0 2px 10px rgba(220, 38, 38, .45) !important;
}

/* Info section de la card */
.info_property {
  background: #fff !important;
  border: none !important;
  border-top: 3px solid var(--pm-bg) !important;
  padding: 16px 16px 14px !important;
}

.info_property ul {
  padding: 0 !important;
  margin: 0 !important;
}

.info_property ul li {
  padding: 6px 0 !important;
  border-bottom: 1px solid var(--pm-border) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.info_property ul li:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.info_property ul li strong {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--pm-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
}

.info_property ul li span {
  float: none !important;
  font-weight: 500 !important;
  color: var(--pm-dark) !important;
  font-size: 13px !important;
  text-align: right !important;
}

/* Precio destacado */
.info_property ul li:last-child span {
  color: var(--pm-primary) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

/* ── Contenido info (sección de propiedades) ────────────── */
.content_info .row>.col-md-12 {
  padding: 0 !important;
}

/* ── Section title página Detalle ──────────────────────── */
.section_title.features {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0e7490 100%) !important;
  border-bottom: none !important;
  height: 200px !important;
  display: flex !important;
  align-items: flex-end !important;
  padding-bottom: 0 !important;
}

.section_title h1 {
  font-size: 30px !important;
  font-weight: 700 !important;
  border-radius: 0 !important;
  background: none !important;
  padding: 16px 0 20px !important;
  margin: 0 !important;
}

.section_title h1 span a {
  color: #94a3b8 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

.section_title h1 span a:hover {
  color: #fff !important;
}

/* ── Newsletter box (Detalle: título propiedad) ─────────── */
.newsletter_box {
  background: linear-gradient(135deg, var(--pm-dark) 0%, var(--pm-dark-2) 100%) !important;
  border: none !important;
  border-bottom: 3px solid var(--pm-primary) !important;
}

.newsletter_box::after {
  display: none !important;
}

.newsletter_box h3 {
  color: #fff !important;
  font-family: 'Inter', sans-serif !important;
  font-style: normal !important;
  font-weight: 700 !important;
  font-size: 22px !important;
}

/* ── Galería detalle (camera_wrap) ─────────────────────── */
#slide_details {
  border-radius: var(--pm-radius) !important;
  overflow: hidden !important;
  box-shadow: var(--pm-shadow-h) !important;
}

/* ── Info general detalle ───────────────────────────────── */
.tab_container {
  background: #fff !important;
  border: 1px solid var(--pm-border) !important;
  border-radius: var(--pm-radius) !important;
  box-shadow: var(--pm-shadow) !important;
  padding: 28px !important;
}

.description {
  background: var(--pm-bg) !important;
  border-radius: var(--pm-radius-sm) !important;
  padding: 20px !important;
  border-left: 4px solid var(--pm-primary) !important;
}

.description h4 {
  color: var(--pm-primary) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .8px !important;
  margin-bottom: 12px !important;
  padding: 0 0 8px !important;
  border-bottom: 1px solid var(--pm-border) !important;
}

.info_details {
  padding: 0 !important;
  list-style: none !important;
}

.info_details li {
  padding: 8px 0 !important;
  border-bottom: 1px solid var(--pm-border) !important;
  font-size: 14px !important;
  display: flex !important;
  justify-content: space-between !important;
}

.info_details li:last-child {
  border-bottom: none !important;
}

.info_details li strong {
  color: var(--pm-muted) !important;
  font-size: 13px !important;
}

.info_details li span {
  font-weight: 600 !important;
  color: var(--pm-dark) !important;
}

/* General info buttons (iconos m², habitaciones, etc.) */
.general_info {
  padding: 0 !important;
  list-style: none !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 20px 0 !important;
}

.general_info .btn {
  background: var(--pm-bg) !important;
  border: 2px solid var(--pm-border) !important;
  border-radius: var(--pm-radius-sm) !important;
  color: var(--pm-dark) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 10px 18px !important;
  transition: var(--pm-transition) !important;
  min-width: 90px !important;
}

.general_info .btn:hover {
  background: var(--pm-primary) !important;
  border-color: var(--pm-primary) !important;
  color: #fff !important;
}

.general_info .btn i {
  display: block !important;
  font-size: 22px !important;
  margin-bottom: 4px !important;
  color: var(--pm-primary) !important;
}

.general_info .btn:hover i {
  color: #fff !important;
}

/* ── Carousel de propiedades relacionadas ───────────────── */
.content-carousel {
  padding: 20px 0 40px !important;
}

.content-carousel .titles {
  text-align: center !important;
}

.content-carousel .titles::after {
  left: 50% !important;
  transform: translateX(-50%) !important;
}

.properties-carousel .item_property {
  margin: 0 10px 10px !important;
}

/* ── Footer ─────────────────────────────────────────────── */
footer.footer_medium {
  background: var(--pm-dark) !important;
  padding: 48px 0 36px !important;
  border-top: none !important;
}

footer.footer_medium h3 {
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: .5px !important;
  text-transform: uppercase !important;
  padding-bottom: 16px !important;
  margin-bottom: 16px !important;
  border-bottom: 2px solid var(--pm-primary) !important;
  display: inline-block !important;
}

.contact_footer {
  padding: 0 !important;
  list-style: none !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 24px !important;
}

.contact_footer li {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #94a3b8 !important;
  font-size: 14px !important;
}

.contact_footer li i {
  color: var(--pm-primary) !important;
  font-size: 18px !important;
  width: 36px !important;
  height: 36px !important;
  background: rgba(26, 86, 219, .15) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.contact_footer li a {
  color: #94a3b8 !important;
  font-size: 14px !important;
}

.contact_footer li a:hover {
  color: #fff !important;
}

footer.footer_down {
  background: #060c18 !important;
  padding: 16px 0 !important;
}

footer.footer_down p {
  color: #475569 !important;
  font-size: 13px !important;
  margin: 0 !important;
}

footer.footer_down .social li a {
  color: #475569 !important;
  font-size: 18px !important;
  transition: var(--pm-transition) !important;
}

footer.footer_down .social li a:hover {
  color: var(--pm-primary) !important;
}

/* ── Global Button override ─────────────────────────────── */
.button {
  background: linear-gradient(135deg, var(--pm-primary), #2563eb) !important;
  border-radius: var(--pm-radius-sm) !important;
  font-weight: 600 !important;
  font-style: normal !important;
  letter-spacing: .3px !important;
  box-shadow: 0 4px 12px rgba(26, 86, 219, .3) !important;
  transition: var(--pm-transition) !important;
}

.button:hover {
  background: linear-gradient(135deg, var(--pm-primary-h), #1d4ed8) !important;
  box-shadow: 0 6px 20px rgba(26, 86, 219, .4) !important;
  transform: translateY(-1px) !important;
  color: #fff !important;
}

/* ── Divisor ────────────────────────────────────────────── */
.divisor {
  background: linear-gradient(90deg, var(--pm-primary), transparent) !important;
  height: 2px !important;
}

.circle_left,
.circle_right {
  background: var(--pm-primary) !important;
  width: 8px !important;
  height: 8px !important;
}

/* ── Pagination & Table Controls ────────────────────────── */
.pm-table-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 24px;
  padding: 14px 20px;
  background: #fff;
  border-radius: var(--pm-radius-sm);
  border: 1px solid var(--pm-border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}

.pm-controls-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Toggle "Solo disponibles" */
/* Control segmentado Todas / Solo disponibles */
.pm-seg-control {
  display: inline-flex;
  border: 1.5px solid var(--pm-border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--pm-bg);
}

.pm-seg-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-muted);
  text-decoration: none !important;
  transition: var(--pm-transition);
  white-space: nowrap;
}

.pm-seg-btn+.pm-seg-btn {
  border-left: 1.5px solid var(--pm-border);
}

.pm-seg-btn.active {
  background: #16a34a;
  color: #fff;
}

.pm-seg-btn:not(.active):hover {
  background: #f0fdf4;
  color: #15803d;
}


.pm-per-page {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pm-per-page label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--pm-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
  margin: 0 !important;
}

.pm-per-page select {
  border: 1.5px solid var(--pm-border) !important;
  border-radius: var(--pm-radius-sm) !important;
  background: var(--pm-bg) !important;
  color: var(--pm-dark) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
  cursor: pointer !important;
  transition: var(--pm-transition) !important;
  height: auto !important;
}

.pm-per-page select:focus {
  outline: none !important;
  border-color: var(--pm-primary) !important;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .15) !important;
}

.pm-results-info {
  font-size: 13px;
  color: var(--pm-muted);
}

.pm-results-info strong {
  color: var(--pm-dark);
  font-weight: 700;
}

/* Grid de propiedades – CSS Grid (sin huecos en última fila) */
.pm-properties-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  width: 100% !important;
  /* anula comportamientos de .row de Bootstrap */
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
}

/* Las tarjetas son celdas directas del CSS Grid */
.pm-property-col {
  /* Sin width, float ni padding de Bootstrap: el grid manda */
  min-width: 0;
  /* evita overflow en celdas con texto largo */
}

@media (max-width: 992px) {
  .pm-properties-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 576px) {
  .pm-properties-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Pagination bar */
.pm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 36px 0 20px;
  padding: 0;
}

.pm-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-dark);
  background: #fff;
  border: 1.5px solid var(--pm-border);
  border-radius: var(--pm-radius-sm);
  cursor: pointer;
  text-decoration: none !important;
  transition: var(--pm-transition);
  line-height: 1;
}

.pm-page-btn:hover:not(.disabled):not(.active) {
  background: var(--pm-bg);
  border-color: var(--pm-primary);
  color: var(--pm-primary);
}

.pm-page-btn.active {
  background: var(--pm-primary) !important;
  border-color: var(--pm-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(26, 86, 219, .35) !important;
}

.pm-page-btn.disabled {
  opacity: .38;
  cursor: not-allowed;
  pointer-events: none;
}

.pm-page-num {
  min-width: 40px;
  justify-content: center;
}

/* No image fallback */
.pm-no-image {
  width: 100%;
  height: 210px;
  background: linear-gradient(135deg, var(--pm-dark) 0%, var(--pm-dark-2) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pm-no-image img {
  width: 110px !important;
  height: auto !important;
  object-fit: contain !important;
  opacity: .8 !important;
}

.pm-no-image span {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, .4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Empty state */
.pm-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--pm-muted);
}

.pm-empty-state i {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: .3;
}

.pm-empty-state p {
  font-size: 16px;
  font-weight: 500;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  nav {
    position: relative !important;
  }

  .filter_horizontal {
    position: relative !important;
    top: auto !important;
  }

  .head_property img {
    height: 180px !important;
  }

  .pm-no-image {
    height: 180px !important;
  }

  .contact_footer {
    flex-direction: column !important;
    gap: 16px !important;
  }

  .section_title.features {
    height: 150px !important;
  }

  .titles h1 {
    font-size: 22px !important;
  }

  .pm-table-controls {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

@media (max-width: 480px) {
  .head_property img {
    height: 200px !important;
  }

  .pm-page-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ── Loading Overlay ────────────────────────────────────── */
#pm-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

#pm-loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.pm-loading-card {
  background: rgba(30, 41, 59, .92);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 36px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
  animation: pmCardIn .25s cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes pmCardIn {
  from {
    transform: scale(.92) translateY(8px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.pm-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid rgba(255, 255, 255, .12);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pmSpin .85s linear infinite;
}

@keyframes pmSpin {
  to {
    transform: rotate(360deg);
  }
}

.pm-loading-text {
  color: rgba(255, 255, 255, .85);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .2px;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════
   Chat IA Widget
   ══════════════════════════════════════════════════════════ */

/* ── Botón flotante ── */
#pm-chat-btn {
  position: fixed;
  bottom: 80px;
  right: 24px;
  z-index: 99998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a56db 0%, #0f172a 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(26, 86, 219, .45);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1),
    box-shadow .25s cubic-bezier(.4, 0, .2, 1);
  color: #fff;
}

#pm-chat-btn svg {
  width: 26px;
  height: 26px;
}

#pm-chat-btn:hover,
#pm-chat-btn.active {
  transform: scale(1.08);
  box-shadow: 0 10px 32px rgba(26, 86, 219, .55);
}

/* ── Widget ── */
#pm-chat-widget {
  position: fixed;
  bottom: 148px;
  right: 24px;
  z-index: 99997;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 200px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1),
    opacity .3s cubic-bezier(.4, 0, .2, 1);
}

#pm-chat-widget.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* ── Header ── */
#pm-chat-header {
  background: linear-gradient(135deg, #1a56db 0%, #0f172a 100%);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.pm-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pm-chat-avatar svg {
  width: 22px;
  height: 22px;
}

.pm-chat-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.pm-chat-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, .65);
  margin-top: 1px;
}

#pm-chat-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, .7);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color .2s;
}

#pm-chat-close:hover {
  color: #fff;
}

#pm-chat-close svg {
  width: 18px;
  height: 18px;
}

/* ── Mensajes ── */
#pm-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
}

.pm-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.pm-msg-user {
  align-self: flex-end;
  align-items: flex-end;
}

.pm-msg-assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.pm-msg-content {
  padding: 10px 14px;
  border-radius: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
}

.pm-msg-user .pm-msg-content {
  background: #1a56db;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.pm-msg-assistant .pm-msg-content {
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

/* ── Typing indicator ── */
.pm-typing .pm-msg-content {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}

.pm-typing .pm-msg-content span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: pmDot 1.2s infinite ease-in-out;
}

.pm-typing .pm-msg-content span:nth-child(2) {
  animation-delay: .2s;
}

.pm-typing .pm-msg-content span:nth-child(3) {
  animation-delay: .4s;
}

@keyframes pmDot {

  0%,
  80%,
  100% {
    transform: scale(1);
    opacity: .5;
  }

  40% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* ── Botón WhatsApp inline ── */
.pm-wa-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 14px;
  background: #16a34a;
  color: #fff !important;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .2s;
}

.pm-wa-inline-btn:hover {
  background: #15803d;
}

/* ── Link a propiedad dentro del chat ── */
.pm-prop-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: #1a56db;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none !important;
  transition: color .2s;
}

.pm-prop-link:hover {
  color: #1e40af;
  text-decoration: underline !important;
}

/* ── Badge de conversación activa en el botón ── */
.pm-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ── Barra Agendar Visita ── */
#pm-chat-schedule {
  padding: 8px 14px 12px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

#pm-schedule-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: #25d366;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s, transform .1s;
  letter-spacing: .3px;
}

#pm-schedule-btn:hover {
  background: #1da851;
}

#pm-schedule-btn:active {
  transform: scale(.98);
}

/* ── Footer / Input ── */
#pm-chat-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

#pm-chat-input {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 9px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: #1e293b;
  background: #f8fafc;
  outline: none;
  transition: border-color .2s;
}

#pm-chat-input:focus {
  border-color: #1a56db;
  background: #fff;
}

#pm-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1a56db;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: background .2s, transform .15s;
}

#pm-chat-send:hover {
  background: #1e40af;
  transform: scale(1.05);
}

#pm-chat-send:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

#pm-chat-send svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 480px) {
  #pm-chat-widget {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 70vh;
    border-radius: 20px 20px 0 0;
  }
}