/*
 * Cuentas de clientes y favoritos (sitio público).
 * Reutiliza las clases de la plantilla (.popup, .popup-form, .form-field, .btn2)
 * y agrega lo propio con el prefijo mh-.
 * Plan: docs-dev/2026-10-06_plan_cuentas_clientes_favoritos.md
 */

:root {
    --mh-accent: var(--color-template, #C72C41);
    --mh-text: #242526;
    --mh-muted: #6b6c70;
    --mh-border: #dfe0e5;
    --mh-error: #c0392b;
    --mh-surface: #ffffff;
    --mh-soft: #f5f5f7;
}

/* ===================== Modal de cuenta ===================== */

/* Rediseño 2026-10-07: sin la franja gris de la plantilla (.popup > h3), encabezado
   blanco con título por pestaña, pestañas tipo píldora (como el home) y campos
   redondeados. Tipografía de la plantilla (Poppins). */
#customer-popup,
#mh-confirm {
    display: none;
    width: 420px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    text-align: left;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
#customer-popup.active,
#mh-confirm.active {
    display: block;
    opacity: 1;
    z-index: 99999;
    margin: 0;
}
.mh-account__header {
    padding: 30px 30px 6px;
    text-align: center;
}
.mh-account__header h3,
#mh-confirm > h3 {
    margin: 0;
    padding: 0;
    background: transparent;
    color: var(--mh-text);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.3;
}
#mh-confirm > h3 {
    padding: 30px 30px 0;
    text-align: center;
}
.mh-account__subtitle {
    margin: 6px 0 0;
    color: var(--mh-muted);
    font-size: 14px;
    line-height: 1.5;
}
.mh-account__subtitle[hidden] {
    display: none;
}
.mh-account__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mh-muted);
    font-size: 18px;
    line-height: 34px;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.mh-account__close:hover {
    background-color: var(--mh-soft);
    color: var(--mh-text);
}
/* Pestañas tipo píldora: igual que las del home */
.mh-account__tabs {
    display: flex;
    gap: 4px;
    margin: 18px 30px 0;
    padding: 4px;
    border-radius: 30px;
    background-color: #efeff1;
}
.mh-account__tabs[hidden] {
    display: none;
}
.mh-account__tab {
    flex: 1;
    padding: 9px 8px;
    border: 0;
    border-radius: 26px;
    background: transparent;
    color: var(--mh-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.mh-account__tab:hover {
    color: var(--mh-text);
}
.mh-account__tab.is-active {
    background-color: #ffffff;
    color: var(--mh-text);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
#customer-popup .popup-form {
    padding: 22px 30px 30px;
}
#customer-popup .popup-form > form {
    padding: 0;
    margin: 0;
    border: 0;
}
#customer-popup .popup-form .form-field {
    margin-bottom: 12px;
}
/* Campos */
#customer-popup .form-field input[type="text"],
#customer-popup .form-field input[type="email"],
#customer-popup .form-field input[type="tel"],
#customer-popup .form-field input[type="password"],
.mh-page-card .form-field input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--mh-border);
    border-radius: 10px;
    background-color: #ffffff;
    color: var(--mh-text);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#customer-popup .form-field input::placeholder,
.mh-page-card .form-field input::placeholder {
    color: #9b9ca0;
}
#customer-popup .form-field input:focus,
.mh-page-card .form-field input:focus {
    outline: 0;
    border-color: var(--mh-accent);
    box-shadow: 0 0 0 3px rgba(199, 44, 65, 0.12);
}
/* Autocompletado del navegador: sin el fondo azul */
#customer-popup .form-field input:-webkit-autofill,
.mh-page-card .form-field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    -webkit-text-fill-color: var(--mh-text);
}
#customer-popup .form-field input:-webkit-autofill:focus,
.mh-page-card .form-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 3px rgba(199, 44, 65, 0.12);
}
#customer-popup .form-field input.is-invalid,
.mh-page-card .form-field input.is-invalid {
    border-color: var(--mh-error);
}
#customer-popup .btn2 {
    width: 100%;
    height: 48px;
    line-height: 48px;
    margin-top: 16px;
}
/* Fila "Recordarme" / "¿Olvidaste tu contraseña?" */
#customer-popup .form-cp {
    display: flex;
    align-items: center;
    justify-content: space-between;
    float: none;
    margin-top: 2px;
}
#customer-popup .form-cp .form-field {
    width: auto;
    float: none;
    margin: 0;
}
.mh-account__intro {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background-color: #fdf0f2;
    color: var(--mh-text);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.mh-account__intro[hidden] {
    display: none;
}
.mh-account__intro i {
    color: var(--mh-accent);
    font-size: 18px;
    line-height: 1.2;
}
.mh-account__help {
    /* El subtítulo del encabezado ya lo explica */
    display: none;
}
.mh-account__alert {
    background: #fdecea;
    color: var(--mh-error);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
}
.mh-account__alert.is-info {
    background: #e8f4fd;
    color: #1d5f8a;
}
.mh-account__alert[hidden] {
    display: none;
}
.mh-account__error {
    display: block;
    color: var(--mh-error);
    font-size: 12px;
    line-height: 1.4;
    margin-top: 5px;
    padding-left: 4px;
    text-align: left;
}
.mh-account__error:empty {
    display: none;
}
.mh-account__policy small a {
    color: var(--mh-accent);
    text-decoration: underline;
}
.mh-account__policy .input-field > label small {
    white-space: normal;
}
.mh-account__policy {
    overflow: hidden;
}
.mh-account__policy .mh-account__error {
    clear: both;
    padding-top: 4px;
}
.mh-account__captcha {
    margin-top: 6px;
}
.mh-account__link {
    display: inline-block;
    border: 0;
    background: transparent;
    padding: 0;
    margin-top: 14px;
    color: var(--mh-accent);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}
#customer-popup [data-pane="forgot"] .mh-account__link {
    display: block;
    margin: 16px auto 0;
}
.mh-account__forgot {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--mh-accent);
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}
.mh-account__forgot:hover {
    text-decoration: underline;
}
.mh-account__link[hidden] {
    display: none;
}
#customer-popup [data-pane][hidden] {
    display: none;
}
.mh-account__done {
    text-align: center;
    padding: 4px 0 0;
}
.mh-account__done > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #fdf0f2;
    font-size: 30px;
    color: var(--mh-accent);
}
.mh-account__done p {
    color: var(--mh-text);
    font-size: 15px;
    line-height: 1.6;
    margin: 14px 0 0;
}

/* Confirmación para quitar un favorito */
#mh-confirm {
    width: 380px;
}
#mh-confirm .popup-form {
    padding: 14px 30px 30px;
}
.mh-confirm__text {
    color: var(--mh-text);
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
    margin: 0 0 20px;
}
.mh-confirm__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mh-confirm__actions .btn2 {
    flex: 1;
    margin: 0;
}
.mh-confirm__cancel {
    flex: 1;
    height: 51px;
    border: 1px solid var(--mh-border);
    border-radius: 30px;
    background: #ffffff;
    color: var(--mh-text);
    font-size: 14px;
    cursor: pointer;
}
.mh-confirm__cancel:hover {
    border-color: var(--mh-text);
}

/* reCAPTCHA en pantallas angostas */
@media (max-width: 400px) {
    #customer-popup .popup-form {
        padding: 18px 18px 24px;
    }
    .mh-account__header {
        padding: 26px 18px 4px;
    }
    .mh-account__tabs {
        margin: 16px 18px 0;
    }
    #customer-popup .mh-recaptcha {
        transform: scale(0.88);
        transform-origin: 0 0;
    }
}

/* ===================== Tarjeta de inmueble ===================== */

/* Home, /inmuebles, mapa, similares de la ficha y "Mis favoritos" (clase
   mh-property-card en cada vista). Esquinas redondeadas, también en la foto. */
.card.mh-property-card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #ececf0;
    box-shadow: 0 10px 24px rgba(36, 37, 38, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card.mh-property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(36, 37, 38, 0.14);
}

/* Carrusel de fotos (parcial property_card_images + property-card.js).
   Puntos arriba al centro: abajo están el precio (izquierda) y el corazón (derecha). */
.mh-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.mh-gallery__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    will-change: transform;
}
.blog-image-container .mh-gallery__img {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
}
.mh-gallery__dots {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 3;
}
.mh-gallery__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: width 0.25s ease, background-color 0.25s ease;
}
.mh-gallery__dot.is-active {
    width: 18px;
    background-color: #ffffff;
}
.mh-gallery__dot:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .mh-gallery__track {
        transition: none;
    }
}

/* Acciones de la tarjeta: "Contactar por esta propiedad" + "Compartir"
   (parcial property_card_actions + property-card.js). Van por encima de .ext-link,
   el enlace transparente que cubre toda la tarjeta. */
.mh-property-card .card-body {
    container-type: inline-size;
    container-name: mh-card-body;
}
.mh-card-actions {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    clear: both;
    margin-top: 16px;
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid #ececf0;
}
.mh-card-actions__contact {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--mh-accent);
    border-radius: 30px;
    color: var(--mh-accent);
    background-color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.mh-card-actions__contact i {
    font-size: 18px;
}
.mh-card-actions__contact:hover,
.mh-card-actions__contact:focus {
    background-color: var(--mh-accent);
    color: #ffffff;
    text-decoration: none;
}
.mh-card-actions__label {
    overflow: hidden;
    text-overflow: ellipsis;
}
.mh-card-actions__label--short {
    display: none;
}
/* Tarjetas angostas (mapa, tablet, móvil): el texto largo + el botón de compartir
   necesitan ~316 px de contenido (el ancho de la container query no incluye el relleno) */
@container mh-card-body (max-width: 320px) {
    .mh-card-actions__label--long {
        display: none;
    }
    .mh-card-actions__label--short {
        display: inline;
    }
}
.mh-card-share {
    position: relative;
    flex: 0 0 auto;
}
.mh-card-actions__share {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--mh-border);
    border-radius: 50%;
    background-color: #ffffff;
    color: var(--mh-text);
    font-size: 17px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.mh-card-actions__share:hover,
.mh-card-share.is-open .mh-card-actions__share {
    border-color: var(--mh-accent);
    color: var(--mh-accent);
}
/* Menú de compartir: abre hacia arriba, mismo estilo del menú "Mi cuenta" */
.mh-card-share__menu {
    display: none;
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    min-width: 190px;
    padding: 6px 0;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 5;
}
.mh-card-share.is-open .mh-card-share__menu {
    display: block;
}
.mh-card-share__menu a,
.mh-card-share__menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px;
    border: 0;
    background: transparent;
    color: var(--mh-text);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.mh-card-share__menu a:hover,
.mh-card-share__menu button:hover {
    background-color: var(--mh-soft);
    color: var(--mh-accent);
    text-decoration: none;
}
.mh-card-share__menu i {
    width: 16px;
    font-size: 16px;
    text-align: center;
}
.mh-card-share__x {
    width: 14px;
    height: 14px;
    margin: 0 1px;
}

/* ===================== Pestañas del home (Venta / Arriendo) ===================== */

.mh-home-tabs__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}
.section-heading.mh-home-tabs__heading {
    float: none;
    width: auto;
    margin-bottom: 0;
    text-align: left;
}
.mh-home-tabs__heading h2 {
    float: none;
    margin: 0;
}
/* Píldora gris; la pestaña activa queda blanca, como el fondo de la página */
.mh-home-tabs__nav {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 4px;
    border-radius: 30px;
    background-color: #efeff1;
}
.mh-home-tabs__nav .nav-item {
    margin: 0;
}
.mh-home-tabs__nav .nav-link {
    padding: 9px 20px;
    border: 0;
    border-radius: 26px;
    color: #6b6c70;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.mh-home-tabs__nav .nav-link:hover {
    color: var(--mh-text);
}
.mh-home-tabs__nav .nav-link.active {
    background-color: #ffffff;
    color: var(--mh-text);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
@media (max-width: 767px) {
    .mh-home-tabs__header {
        flex-direction: column;
        align-items: flex-start;
    }
    .mh-home-tabs__nav {
        width: 100%;
    }
    .mh-home-tabs__nav .nav-item {
        flex: 1;
    }
    .mh-home-tabs__nav .nav-link {
        text-align: center;
    }
}

/* ===================== Corazón de favoritos ===================== */

.mh-fav {
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.mh-fav:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}
.mh-fav.is-loading {
    opacity: 0.6;
    pointer-events: none;
}
.mh-fav--card {
    position: absolute;
    right: 18px;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    font-size: 22px;
    z-index: 3;
}
.mh-fav--card:hover {
    transform: scale(1.1);
}
.mh-fav--card.is-active {
    background-color: #ffffff;
    color: var(--mh-accent);
}
.mh-fav--detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--mh-accent);
    border-radius: 30px;
    color: var(--mh-accent);
    background-color: #ffffff;
    font-size: 15px;
    line-height: 1;
    margin: 0 0 10px 12px;
    white-space: nowrap;
}
.mh-fav--detail i {
    font-size: 20px;
}
.mh-fav--detail.is-active {
    background-color: var(--mh-accent);
    color: #ffffff;
}
.mh-fav--detail:focus-visible {
    outline-color: var(--mh-accent);
}

/* ===================== Aviso flotante ===================== */

.mh-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: calc(100vw - 32px);
    padding: 12px 16px;
    border-radius: 6px;
    background-color: #242526;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 100000;
}
.mh-toast[hidden] {
    display: none;
}
.mh-toast__close {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
}

/* ===================== Menú "Mi cuenta" del header ===================== */

/* Cuenta en la barra superior (escritorio) */
@media (min-width: 992px) {
    .mh-topbar-right {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 20px;
    }
}
.mh-topbar-account .mh-topbar-account__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    color: var(--color-btn-color, #ffffff);
    font-size: 15.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.mh-topbar-account .mh-topbar-account__link i {
    font-size: 19px;
}
.mh-topbar-account .mh-topbar-account__link:hover,
.mh-topbar-account .mh-topbar-account__link:focus {
    color: var(--color-btn-color, #ffffff);
    opacity: 0.85;
    text-decoration: none;
}
.mh-topbar-dropdown {
    position: relative;
}
.mh-topbar-account .mh-topbar-account__link {
    user-select: none;
}
.mh-topbar-account__menu {
    min-width: 210px;
    margin-top: 10px;
    padding: 6px 0;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1100;
}
.mh-topbar-account__menu .dropdown-item,
.mh-topbar-account__menu .dropdown-item-text {
    padding: 10px 18px;
    font-size: 14px;
    text-align: left;
}
.mh-topbar-account__menu .dropdown-item {
    color: var(--mh-text);
    background: transparent;
    border: 0;
    width: 100%;
    cursor: pointer;
}
.mh-topbar-account__menu .dropdown-item:hover {
    background-color: var(--mh-soft);
    color: var(--mh-accent);
}
.mh-topbar-account__menu .dropdown-item i {
    margin-right: 6px;
}
.mh-topbar-account__name {
    color: var(--mh-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--mh-border);
    margin-bottom: 4px;
}

/* Cuenta dentro del menú móvil: alineada como "Zona Clientes" y "Pagos en línea" */
@media (max-width: 991px) {
    .header .navbar-sign-content .mh-account-entry {
        width: 100%;
        margin: 0 !important;
    }
    .header .navbar-sign-content .mh-account-entry > .nav-link {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        margin: 0;
        text-align: left;
    }
    .header .navbar-sign-content .mh-account-entry > .nav-link i {
        top: 0;
        margin-right: 0;
    }
    .header .navbar-sign-content .mh-account-entry b {
        font-weight: 400;
    }
}
.mh-account-menu .dropdown-menu {
    min-width: 200px;
}
.mh-account-menu .mh-account-menu__name {
    color: var(--mh-muted);
    font-weight: 600;
    text-transform: none;
    cursor: default;
}
.mh-account-menu .mh-account-menu__name:hover {
    background: transparent;
}
.mh-account-menu__logout {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

/* ===================== Página "Mis favoritos" ===================== */

.popular-listing.mh-favorites {
    padding: 50px 0 70px;
}
/* Pestañas tipo píldora (Venta / Arriendo) */
.mh-favorites__bar {
    display: flex;
    justify-content: center;
    margin-bottom: 36px;
}
.mh-favorites__tabs {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 40px;
    background-color: var(--mh-soft);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}
.mh-favorites__tabs .nav-item {
    margin: 0;
}
.mh-favorites__tabs .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 0;
    border-radius: 30px;
    color: var(--mh-muted);
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.mh-favorites__tabs .nav-link i {
    font-size: 19px;
}
.mh-favorites__tabs .nav-link:hover {
    color: var(--mh-text);
}
.mh-favorites__tabs .nav-link.active {
    background-color: var(--mh-accent);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(199, 44, 65, 0.3);
}
.mh-favorites__count {
    display: inline-block;
    min-width: 24px;
    padding: 4px 7px;
    border-radius: 12px;
    background-color: #ffffff;
    color: var(--mh-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
}
.mh-favorites__tabs .nav-link.active .mh-favorites__count {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.mh-favorites .mh-property-card {
    margin-bottom: 30px;
}
.mh-favorites__card .img-block {
    position: relative;
}
.mh-favorites__card.is-unavailable .img-block img {
    filter: grayscale(1);
    opacity: 0.6;
}
.mh-property-card.is-unavailable:hover {
    transform: none;
    box-shadow: 0 10px 24px rgba(36, 37, 38, 0.08);
}
.mh-favorites__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: #242526;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
}
.mh-favorites__empty {
    text-align: center;
    padding: 40px 16px;
}
.mh-favorites__empty[hidden] {
    display: none;
}
.mh-favorites__empty > i {
    font-size: 54px;
    color: var(--mh-accent);
}
.mh-favorites__empty p {
    color: var(--mh-text);
    font-size: 16px;
    margin: 10px 0 0;
}
.mh-favorites__empty .mh-favorites__hint {
    color: var(--mh-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ===================== Páginas de cuenta (confirmación, restablecer) ===================== */

.mh-page-card {
    background: var(--mh-surface);
    border-radius: 12px;
    border-top: 5px solid var(--mh-accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    padding: 36px;
    margin: 50px 0 70px;
}
.mh-page-card h2 {
    color: var(--mh-text);
    font-size: 24px;
    font-weight: 700;
    margin: 10px 0;
}
.mh-page-card p {
    color: var(--mh-muted);
    font-size: 15px;
    line-height: 1.6;
}
.mh-page-card__icon {
    font-size: 54px;
    color: var(--mh-accent);
}
.mh-page-card form {
    margin-top: 20px;
    text-align: left;
}
.mh-page-card .form-field input {
    width: 100%;
}
.mh-page-card .btn2 {
    width: 100%;
    margin-top: 10px;
}
.mh-resend-form__message {
    margin-top: 14px;
    text-align: center;
}
.mh-resend-form__message[hidden] {
    display: none;
}

@media (max-width: 767px) {
    .mh-favorites__tabs .nav-link {
        padding: 10px 16px;
    }
    .mh-page-card {
        padding: 28px 16px;
        margin: 30px 0 50px;
    }
    .mh-fav--detail {
        margin: 10px 0;
    }
}

/* Con el modal abierto se oculta el botón flotante de chat (GetButton), que en
   móvil queda encima del botón "Crear cuenta" */
body.mh-account-open [id^="gb-widget"] {
    display: none !important;
}

/* =====================================================================
   Ficha del inmueble (show / show_plus) · rediseño 2026-10-07
   Mismas secciones y orden de siempre; cambia la visual y el uso.
   Componentes: property_detail_header, property_gallery, property_facts,
   property_features, property_contact_bar; JS: property-detail.js.
   Plan: docs-dev/2026-10-07_plan_ficha_inmueble.md
   ===================================================================== */

.mh-detail-page {
    padding-top: 40px;
}
.mh-detail-page .property-single-page-content {
    margin-top: 24px;
}
.mh-detail-page .property-pg-left {
    padding-right: 0;
}

/* ── Botones de la ficha ───────────────────────────────────────────── */
.mh-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}
.mh-detail-btn i {
    font-size: 18px;
}
.mh-detail-btn:hover,
.mh-detail-btn:focus {
    text-decoration: none;
}
.mh-detail-btn--primary {
    background-color: var(--mh-accent);
    color: #ffffff;
}
.mh-detail-btn--primary:hover,
.mh-detail-btn--primary:focus {
    color: #ffffff;
    filter: brightness(0.92);
}
.mh-detail-btn--outline {
    border-color: var(--mh-accent);
    background-color: #ffffff;
    color: var(--mh-accent);
}
.mh-detail-btn--outline:hover,
.mh-detail-btn--outline:focus {
    background-color: var(--mh-accent);
    color: #ffffff;
}
.mh-detail-btn--ghost {
    border-color: var(--mh-border);
    background-color: #ffffff;
    color: var(--mh-text);
}
.mh-detail-btn--ghost:hover,
.mh-detail-btn--ghost:focus {
    border-color: var(--mh-text);
    color: var(--mh-text);
}
.mh-detail-btn--icon {
    width: 46px;
    padding: 0;
}
.mh-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--mh-accent);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.mh-detail-link:hover {
    color: var(--mh-accent);
    text-decoration: underline;
}

/* ── Encabezado ─────────────────────────────────────────────────────── */
.mh-detail-page .property-hd-sec .card.mh-detail-head {
    display: flex;
    flex-direction: row; /* .card de Bootstrap trae column */
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    float: none;
    padding: 26px 28px;
    border: 1px solid #ececf0;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 10px 24px rgba(36, 37, 38, 0.06);
}
.mh-detail-head__main {
    min-width: 0;
}
.mh-detail-head__badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background-color: #fdf0f2;
    color: var(--mh-accent);
    font-size: 12px;
    font-weight: 500;
}
.mh-detail-head__title {
    margin: 10px 0 6px;
    color: var(--mh-text);
    font-size: 28px;
    font-weight: 500;
    line-height: 1.25;
}
.mh-detail-head__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--mh-muted);
    font-size: 14px;
}
.mh-detail-head__meta i {
    font-size: 16px;
}
.mh-detail-head__sep {
    color: #c4c5ca;
}
.mh-detail-head__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.mh-detail-head__quick li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mh-text);
    font-size: 14px;
}
.mh-detail-head__quick i {
    color: var(--mh-muted);
    font-size: 16px;
}
.mh-detail-head__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    flex-shrink: 0;
}
.mh-detail-head__price {
    color: var(--mh-text);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.1;
}
.mh-detail-head__tools {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mh-detail-head__tools .mh-fav--detail {
    height: 42px;
    margin: 0;
    padding: 0 16px;
    font-size: 14px;
}
.mh-detail-head__tools .mh-fav--detail .mh-fav__text {
    text-transform: none;
}
.mh-card-actions.mh-card-actions--share-only {
    margin: 0;
    padding: 0;
    border: 0;
}
/* En el encabezado el menú de compartir abre hacia abajo */
.mh-detail-head .mh-card-share__menu {
    top: calc(100% + 8px);
    bottom: auto;
}
.mh-detail-head__cta {
    display: flex;
    gap: 10px;
}

/* ── Galería en mosaico ─────────────────────────────────────────────── */
.mh-detail-gallery {
    position: relative;
    clear: both;
    margin-bottom: 32px;
}
.mh-detail-gallery__grid {
    display: grid;
    gap: 12px;
    height: 520px;
    grid-template-columns: 1.45fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.mh-detail-gallery__item {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background-color: #efeff1;
    cursor: zoom-in;
}
.mh-detail-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.mh-detail-gallery__item:hover img {
    transform: scale(1.03);
}
.mh-detail-gallery__item:focus-visible {
    outline: 3px solid var(--mh-accent);
    outline-offset: 2px;
}
/* 4 o más fotos: grande a la izquierda, una ancha arriba y dos abajo (como la referencia) */
.mh-detail-gallery--4 .mh-detail-gallery__item--0 { grid-column: 1; grid-row: 1 / 3; }
.mh-detail-gallery--4 .mh-detail-gallery__item--1 { grid-column: 2 / 4; grid-row: 1; }
.mh-detail-gallery--4 .mh-detail-gallery__item--2 { grid-column: 2; grid-row: 2; }
.mh-detail-gallery--4 .mh-detail-gallery__item--3 { grid-column: 3; grid-row: 2; }
.mh-detail-gallery--3 .mh-detail-gallery__grid { grid-template-columns: 1.45fr 1fr; }
.mh-detail-gallery--3 .mh-detail-gallery__item--0 { grid-row: 1 / 3; }
.mh-detail-gallery--2 .mh-detail-gallery__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.mh-detail-gallery--1 .mh-detail-gallery__grid { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.mh-detail-gallery__count {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 0;
    border-radius: 30px;
    background-color: var(--mh-accent);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 2;
}
.mh-detail-gallery__count:hover {
    filter: brightness(0.92);
}

/* ── Visor a pantalla completa ──────────────────────────────────────── */
.mh-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 16, 18, 0.97);
}
.mh-lightbox[hidden] {
    display: none;
}
body.mh-lightbox-open {
    overflow: hidden;
}
body.mh-lightbox-open [id^="gb-widget"] {
    display: none !important;
}
.mh-lightbox__top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: #ffffff;
    z-index: 2;
}
.mh-lightbox__count {
    font-size: 15px;
    letter-spacing: 0.5px;
}
.mh-lightbox__close,
.mh-lightbox__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.mh-lightbox__close {
    width: 44px;
    height: 44px;
    font-size: 22px;
}
.mh-lightbox__nav {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    font-size: 26px;
    z-index: 2;
}
.mh-lightbox__nav[hidden] {
    display: none;
}
.mh-lightbox__nav--prev { left: 20px; }
.mh-lightbox__nav--next { right: 20px; }
.mh-lightbox__close:hover,
.mh-lightbox__nav:hover {
    background-color: rgba(255, 255, 255, 0.25);
}
.mh-lightbox__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 70px 90px;
}
.mh-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
}

/* ── Secciones (descripción, detalles, características, ubicación, asesor) ── */
.mh-detail-page .descp-text,
.mh-detail-page .details-info,
.mh-detail-page .features-dv,
.mh-detail-page .map-dv,
.mh-detail-page .mh-detail-agent {
    padding: 28px 30px;
    border: 1px solid #ececf0;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 10px 24px rgba(36, 37, 38, 0.05);
    margin-bottom: 28px;
}
.mh-detail-page .descp-text > p.mh-readmore {
    margin: 0;
    color: #55565b;
    font-size: 15px;
    line-height: 1.85;
    white-space: pre-line;
}
.mh-readmore.is-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mh-readmore__toggle {
    margin-top: 10px;
}

/* Detalles: cuadrícula con íconos */
.mh-detail-page .details-info ul.mh-detail-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    float: none;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}
.mh-detail-page .details-info ul.mh-detail-facts li.mh-detail-facts__item {
    display: flex;
    align-items: center;
    gap: 12px;
    float: none;
    width: auto;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background-color: var(--mh-soft);
}
.mh-detail-page .details-info ul.mh-detail-facts li span.mh-detail-facts__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: #ffffff;
    color: var(--mh-accent);
    font-size: 17px;
}
.mh-detail-page .details-info ul.mh-detail-facts li span.mh-detail-facts__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
}
.mh-detail-page .details-info ul.mh-detail-facts li span.mh-detail-facts__label {
    display: block;
    padding: 0;
    color: var(--mh-muted);
    font-size: 12.5px;
    line-height: 1.3;
}
.mh-detail-page .details-info ul.mh-detail-facts li span.mh-detail-facts__value {
    display: block;
    padding: 0;
    color: var(--mh-text);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

/* Características */
.mh-detail-features + .mh-detail-features {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #f0f0f2;
}
.mh-detail-features__title {
    margin: 0 0 12px;
    color: var(--mh-text);
    font-size: 15px;
    font-weight: 500;
}
.mh-detail-features__title span {
    color: var(--mh-muted);
    font-weight: 400;
}
.mh-detail-features__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mh-detail-features__list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #55565b;
    font-size: 14px;
    line-height: 1.45;
}
.mh-detail-features__list li[hidden] {
    display: none;
}
.mh-detail-features__list i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border-radius: 50%;
    background-color: #fdf0f2;
    color: var(--mh-accent);
    font-size: 12px;
}
.mh-detail-features .mh-detail-link {
    margin-top: 14px;
}
.mh-detail-empty {
    margin: 0;
    color: var(--mh-muted);
}

/* Ubicación */
.mh-detail-map__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 14px;
}
.mh-detail-map__place {
    margin: 0;
    color: var(--mh-muted);
    font-size: 14px;
}
.mh-detail-page .mh-detail-map {
    border-radius: 12px;
    overflow: hidden;
}
.mh-detail-page .mh-detail-map #mi_mapa {
    height: 360px;
}

/* Asesor */
.mh-detail-page .mh-detail-agent .card-body {
    padding: 0;
}

/* Llamado a la acción (botones de abajo) */
.mh-detail-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    clear: both;
    float: left;
    width: 100%;
    margin-bottom: 40px;
    padding: 26px 30px;
    border-radius: 16px;
    background-color: #fdf0f2;
}
.mh-detail-cta__text h3 {
    margin: 0 0 4px;
    color: var(--mh-text);
    font-size: 20px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}
.mh-detail-cta__text p {
    margin: 0;
    color: var(--mh-muted);
    font-size: 14px;
}
.mh-detail-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── Barra fija de contacto (móvil) ─────────────────────────────────── */
.mh-detail-bar {
    display: none;
}
@media (max-width: 767px) {
    .mh-detail-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid #ececf0;
        background-color: #ffffff;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
        transform: translateY(110%);
        transition: transform 0.25s ease;
    }
    .mh-detail-bar.is-visible {
        transform: translateY(0);
    }
    .mh-detail-bar__price {
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.2;
    }
    .mh-detail-bar__price small {
        color: var(--mh-muted);
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mh-detail-bar__price strong {
        color: var(--mh-text);
        font-size: 17px;
        font-weight: 600;
        white-space: nowrap;
    }
    .mh-detail-bar__actions {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }
    .mh-detail-bar .mh-detail-btn {
        height: 44px;
        padding: 0 18px;
    }
    .mh-detail-bar .mh-detail-btn--icon {
        width: 44px;
        padding: 0;
    }
    /* El botón flotante de chat sube para no quedar encima de la barra */
    body.mh-detail-bar-visible [id^="gb-widget"] {
        transform: translateY(-72px);
        transition: transform 0.25s ease;
    }
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .mh-detail-gallery__grid {
        height: 420px;
    }
    .mh-detail-page .details-info ul.mh-detail-facts,
    .mh-detail-features__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mh-detail-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (max-width: 767px) {
    .mh-detail-page {
        padding-top: 20px;
    }
    .mh-detail-page .property-hd-sec .card.mh-detail-head {
        flex-direction: column;
        gap: 18px;
        padding: 20px 18px;
    }
    .mh-detail-head__title {
        font-size: 22px;
    }
    .mh-detail-head__side {
        align-items: stretch;
        width: 100%;
    }
    .mh-detail-head__price {
        font-size: 26px;
    }
    .mh-detail-head__tools {
        justify-content: flex-start;
    }
    .mh-detail-head__cta .mh-detail-btn {
        flex: 1;
        padding: 0 12px;
    }
    /* Galería: una sola foto deslizable con contador */
    .mh-detail-gallery__grid {
        display: block;
        height: auto;
    }
    .mh-detail-gallery__item {
        display: none;
        width: 100%;
        aspect-ratio: 4 / 3;
        border-radius: 14px;
    }
    .mh-detail-gallery__item--0 {
        display: block;
    }
    .mh-detail-gallery__count {
        left: 12px;
        bottom: 12px;
        padding: 8px 14px;
        font-size: 13px;
    }
    .mh-lightbox__stage {
        padding: 64px 0;
    }
    .mh-lightbox__nav {
        width: 42px;
        height: 42px;
        margin-top: -21px;
        font-size: 20px;
    }
    .mh-lightbox__nav--prev { left: 8px; }
    .mh-lightbox__nav--next { right: 8px; }
    .mh-detail-page .descp-text,
    .mh-detail-page .details-info,
    .mh-detail-page .features-dv,
    .mh-detail-page .map-dv,
    .mh-detail-page .mh-detail-agent {
        padding: 22px 18px;
        border-radius: 14px;
        margin-bottom: 20px;
    }
    .mh-detail-page .details-info ul.mh-detail-facts {
        gap: 10px;
    }
    .mh-detail-page .details-info ul.mh-detail-facts li.mh-detail-facts__item {
        padding: 10px;
        gap: 10px;
    }
    .mh-detail-page .details-info ul.mh-detail-facts li span.mh-detail-facts__icon {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
    .mh-detail-features__list {
        grid-template-columns: 1fr;
    }
    .mh-detail-page .mh-detail-map #mi_mapa {
        height: 260px;
    }
    .mh-detail-cta {
        padding: 22px 18px;
    }
    .mh-detail-cta__actions,
    .mh-detail-cta__actions .mh-detail-btn {
        width: 100%;
    }
    /* Espacio para que la barra fija no tape el final de la página */
    .mh-detail-page {
        padding-bottom: 90px;
    }
}
/* La plantilla deja un contenedor de video vacío dentro de la descripción */
.mh-detail-page .descp-text .wraper-video {
    display: none;
}
@media (max-width: 767px) {
    .mh-detail-head__sep {
        display: none;
    }
    .mh-detail-head__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}
