/* ==============================
   Favoritos - Cards compactas
   4 / 5 cards por fila
============================== */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

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

.ah-fav-page {
    width: 100%;
    min-height: 85vh;
    padding: 32px 20px 55px;
    background: #ffffff;
}

.ah-fav-header {
    margin-bottom: 26px;
}

.ah-fav-header h1 {
    margin: 0 0 4px;
    font-size: 38px;
    line-height: .95;
    font-weight: 600;
    color: #000;
    letter-spacing: 1.5px;
}

.ah-fav-header p {
    margin: 0;
    max-width: 620px;
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

/* ==============================
   GRID
============================== */

.ah-fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.ah-fav-item {
    display: block;
    min-width: 0;
}

/* ==============================
   CARD
============================== */

.ah-fav-card {
    position: relative;
    width: 100%;
    height: 98%;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .10);
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}

.ah-fav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .14);
}

.ah-fav-card-main {
    padding: 15px;
    background: #fff;
    flex: 1 1 auto;
}

.ah-fav-img {
    display: block;
    width: 100%;
    height: 145px;
    border-radius: 12px;
    overflow: hidden;
    background: #e8e8e8;
    margin-bottom: 12px;
}

.ah-fav-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ah-fav-info h3 {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: .4px;
    color: #000;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.ah-fav-info h3 a {
    color: inherit;
    text-decoration: none;
}

.ah-fav-info h3 a:hover {
    color: #cd1218;
}

.ah-fav-location {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 11px;
    line-height: 1.35;
    color: #444;
    margin-bottom: 8px;
}

.ah-fav-location i {
    font-size: 12px;
    color: #5a5760;
    margin-top: 1px;
}

.ah-fav-specs-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
    margin-top: 8px;
}

.ah-fav-specs-list__item {
    display: flex;
    gap: 4px;
    align-items: baseline;
    font-size: 10px;
    line-height: 1.2;
    color: #444;
}

.ah-fav-specs-list__item strong {
    font-weight: 900;
    color: #111;
}

.ah-fav-specs-list__item span {
    font-weight: 600;
    color: #666;
}

/* ==============================
   BLOQUE DE RENTA
============================== */

.ah-fav-price-box {
    position: relative;
    background: #000;
    padding: 20px 15px 16px;
    min-height: 238px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    flex: 0 0 auto;
}

.ah-fav-date-field {
    width: 100%;
}

.fav-month-plans {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 9px 6px;
    margin: 0 0 16px;
    padding: 4px 0 0;
    overflow: visible;
}

.fav-month-plan {
    position: relative;
    min-width: 60px;
    min-height: 32px;
    padding: 8px 9px;
    border: 1.5px solid #fff;
    background: transparent;
    color: #fff;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
    white-space: nowrap;
    overflow: visible;
}

.fav-month-plan:hover,
.fav-month-plan.is-active {
    background: #fff;
    color: #cd1218;
}

.fav-month-plan[data-months="3"]::after,
.fav-month-plan[data-months="6"]::after,
.fav-month-plan[data-months="12"]::after {
    display: none;
}

.ah-fav-date-field input {
    width: 100%;
    height: 42px;
    border: none;
    outline: none;
    border-radius: 9px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 900;
    color: #1d1d1d;
    background: #fff;
    padding: 0 9px;
    box-shadow: none;
}

.ah-fav-date-field input::placeholder {
    color: #8d8d8d;
}

.ah-fav-selected-range {
    min-height: 4px;
    font-size: 11px;
    color: #fff;
}

.ah-fav-date-alert {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    padding: 8px 10px;
    border-radius: 8px;
    width: 100%;
}

.ah-fav-date-alert i {
    color: #ffcc00;
    font-size: 12px;
}

.ah-fav-date-alert .alert-text {
    font-size: 10.5px;
}

.ah-fav-price-comparison {
    width: 100%;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
    min-height: 38px;
}

.ah-fav-price-base {
    color: rgba(255, 255, 255, .74);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.ah-fav-price-base span {
    font-size: 9px;
    font-weight: 800;
}

.ah-fav-price-base.is-crossed {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    opacity: .9;
}

.ah-fav-price {
    margin-top: 0;
    width: auto;
    color: #fff;
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.spot-calculated-price,
.spot-calculated-price.ah-fav-price-trigger {
    border: none;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    text-align: center;
}

.spot-calculated-price:hover,
.spot-calculated-price.ah-fav-price-trigger:hover {
    opacity: .85;
}

.ah-fav-savings-trigger {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #cd1218;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.ah-fav-savings-trigger:hover {
    transform: scale(1.08);
    background: #f7f7f7;
    color: #a90f14;
}

.ah-fav-plan-savings-data {
    display: none !important;
}

.ah-fav-rent-btn,
a.ah-fav-rent-btn,
button.ah-fav-rent-btn {
    width: 100%;
    min-height: 40px;
    margin-top: auto;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #cd1218 !important;
    border: none;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.ah-fav-rent-btn:hover {
    background: #f7f7f7;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .16);
}

.ah-fav-rent-btn.is-loading {
    pointer-events: none;
    opacity: .75;
}

/* ==============================
   EMPTY
============================== */

.ah-fav-empty {
    background: #fff;
    border-radius: 18px;
    padding: 45px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

.ah-fav-empty h3 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
}

.ah-fav-empty p {
    margin: 0;
    color: #555;
}

/* ==============================
   CALENDARIO CENTRADO
============================== */

.daterangepicker {
    z-index: 9999999 !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: min(940px, calc(100vw - 32px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border-radius: 14px !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .18) !important;
}

.daterangepicker.opensleft::before,
.daterangepicker.opensleft::after,
.daterangepicker.opensright::before,
.daterangepicker.opensright::after,
.daterangepicker.openscenter::before,
.daterangepicker.openscenter::after {
    display: none !important;
}

.daterangepicker .drp-calendar.left,
.daterangepicker .drp-calendar.right {
    width: 50% !important;
    max-width: 50% !important;
    padding: 14px !important;
}

.daterangepicker .calendar-table,
.daterangepicker .calendar-table table {
    width: 100% !important;
}

.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td {
    font-size: 14px !important;
    padding: 8px !important;
}

.calendar-animated {
    transition: opacity .2s ease, transform .2s ease;
}

.calendar-visible {
    opacity: 1;
}

.calendar-hidden {
    opacity: 0;
}

/* ==============================
   MODALES
============================== */

.ahf-price-modal,
.ahf-savings-modal {
    position: fixed;
    inset: 0;
    z-index: 99999999;
    background: rgba(0, 0, 0, .35);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ahf-price-modal.is-open,
.ahf-savings-modal.is-open {
    display: flex;
}

.ahf-price-modal__dialog,
.ahf-savings-modal__dialog {
    width: 100%;
    max-width: 450px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.ahf-price-modal__head,
.ahf-savings-modal__head {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e5e5;
}

.ahf-price-modal__head h3,
.ahf-savings-modal__head h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #000;
}

.ahf-price-modal__close,
.ahf-savings-modal__close {
    border: none;
    background: transparent;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    color: #111;
}

.ahf-price-modal__body,
.ahf-savings-modal__body {
    padding: 24px;
}

.ahf-price-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    font-size: 15px;
    color: #222;
}

.ahf-price-line strong {
    font-size: 16px;
    color: #000;
    white-space: nowrap;
}

.ahf-price-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 18px 0;
}

.ahf-price-line--total {
    margin-bottom: 0;
    font-size: 19px;
    font-weight: 900;
}

.ahf-price-line--total strong {
    font-size: 22px;
    color: #cd1218;
}

.ahf-savings-modal__body {
    display: grid;
    gap: 10px;
}

.ahf-savings-modal__body span {
    font-size: 14px;
    font-weight: 900;
    color: #cd1218;
}

.ahf-savings-modal__body strong {
    font-size: 26px;
    font-weight: 900;
    color: #111;
}

.ahf-savings-modal__body small {
    font-size: 14px;
    font-weight: 700;
    color: #555;
}

/* ==============================
   ALERTAS / TOASTS
============================== */

.alert,
.alert-danger,
.alert-success,
.alert-warning,
.alert-info,
.swal2-container,
.toast,
.toast-container,
.toastr,
#toast-container,
.noty_bar,
.noty_layout,
.iziToast-wrapper,
.iziToast {
    z-index: 99999999 !important;
}

/* ==============================
   RESPONSIVE
============================== */

@media (min-width: 1900px) {
    .ah-fav-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1899px) {
    .ah-fav-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1450px) {
    .ah-fav-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ah-fav-img {
        height: 150px;
    }
}

@media (max-width: 1150px) {
    .ah-fav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ah-fav-img {
        height: 170px;
    }
}

@media (max-width: 991px) {
    .ah-fav-page {
        padding: 28px 16px 45px;
    }

    #dashboard {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

@media (max-width: 768px) {
    .ah-fav-page {
        padding: 24px 12px 40px;
    }

    .ah-fav-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .ah-fav-card {
        border-radius: 18px;
    }

    .ah-fav-card-main {
        padding: 15px;
    }

    .ah-fav-img {
        height: 200px;
    }

    .ah-fav-price-box {
        padding: 20px 15px 18px;
        min-height: 235px;
    }

    .daterangepicker {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }

    .daterangepicker .drp-calendar.left,
    .daterangepicker .drp-calendar.right {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 520px) {
    .ah-fav-header h1 {
        font-size: 36px;
    }

    .ah-fav-header p {
        font-size: 13px;
    }

    .ah-fav-img {
        height: 185px;
    }

    .ah-fav-specs-list {
        grid-template-columns: 1fr;
    }

    .fav-month-plans {
        gap: 9px 6px;
    }

    .fav-month-plan {
        min-width: 58px;
        padding: 8px 9px;
        font-size: 10.5px;
    }

    .ah-fav-price-comparison {
        margin-top: 16px;
    }

    .ah-fav-price {
        font-size: 19px;
    }

    .ahf-price-modal__dialog,
    .ahf-savings-modal__dialog {
        max-width: calc(100vw - 28px);
    }
}



/* ==============================
   BOTÓN QUITAR FAVORITO
============================== */

.ah-fav-img-wrap {
    position: relative;
}

.ah-fav-heart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: #cd1218;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.ah-fav-heart-btn:hover {
    transform: scale(1.08);
    background: #cd1218;
    color: #fff;
}

.ah-fav-heart-btn.is-loading {
    pointer-events: none;
    opacity: .65;
}
