/* ═══════════════════════════════════════════════════════════════
   Favoritos — corazón en tarjetas + página usuario
   ═══════════════════════════════════════════════════════════════ */

/* ── Botón corazón (tarjetas alojamiento) ── */
.aloj-fav-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.94);
    color: #64748b;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
}

.aloj-fav-btn:active {
    transform: scale(0.92);
}

.aloj-fav-btn__icon {
    font-size: 1.25rem;
    line-height: 1;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.aloj-fav-btn.is-active {
    color: #dc2626;
}

.aloj-fav-btn.is-active .aloj-fav-btn__icon {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.dh-detail-actions #btnSave.is-active {
    border-color: rgba(220, 38, 38, 0.35);
    color: #dc2626;
    background: #fef2f2;
}

.dh-detail-actions #btnSave.is-active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── Página favoritos (usuario) ── */
body.page-favoritos {
    background: #f4f7fc;
    font-family: 'Inter', system-ui, sans-serif;
}

body.page-favoritos .fav-main {
    max-width: 72rem;
    margin: 0 auto;
    padding: calc(4.5rem + env(safe-area-inset-top, 0px)) 1rem calc(5.75rem + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}

@media (min-width: 768px) {
    body.page-favoritos .fav-main {
        padding: calc(5.5rem + env(safe-area-inset-top, 0px)) 1.5rem 2.5rem;
    }
}

body.page-favoritos .fav-hero {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
    padding: 1.125rem 1.25rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0f5ff 100%);
    border: 1px solid #dbe4f3;
    box-shadow: 0 2px 12px rgba(0, 38, 96, 0.05);
}

body.page-favoritos .fav-hero__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: #002660;
    color: #fff;
}

body.page-favoritos .fav-hero__icon .material-symbols-outlined {
    font-size: 1.375rem;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

body.page-favoritos .fav-hero h1 {
    margin: 0 0 0.25rem;
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #002660;
    line-height: 1.2;
}

body.page-favoritos .fav-hero p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
}

body.page-favoritos .fav-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    body.page-favoritos .fav-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

body.page-favoritos .fav-stat {
    padding: 0.75rem 0.875rem;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid #e8edf5;
    text-align: center;
}

body.page-favoritos .fav-stat__val {
    display: block;
    font-size: 1.375rem;
    font-weight: 800;
    color: #002660;
    line-height: 1.2;
}

body.page-favoritos .fav-stat__lbl {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}

body.page-favoritos .fav-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.25rem;
    border-radius: 0.75rem;
    background: #e8edf5;
}

body.page-favoritos .fav-tab {
    flex: 1 1 0;
    padding: 0.625rem 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.page-favoritos .fav-tab.is-active {
    background: #fff;
    color: #002660;
    box-shadow: 0 1px 4px rgba(0, 38, 96, 0.1);
}

body.page-favoritos .fav-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    body.page-favoritos .fav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    body.page-favoritos .fav-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

body.page-favoritos .fav-hotel-card-wrap {
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 1rem;
    border: 1px solid #e8edf5;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 38, 96, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.page-favoritos .fav-hotel-card-wrap:hover {
    box-shadow: 0 8px 24px rgba(0, 38, 96, 0.1);
    transform: translateY(-2px);
}

body.page-favoritos .fav-hotel-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1 1 auto;
}

body.page-favoritos .fav-hotel-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(145deg, #e8edf5, #f1f5f9);
    overflow: hidden;
}

body.page-favoritos .fav-hotel-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.page-favoritos .fav-hotel-card__rating {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.45rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fbbf24;
    font-size: 0.6875rem;
    font-weight: 700;
}

body.page-favoritos .fav-hotel-card__body {
    padding: 0.875rem 1rem 0.75rem;
    min-width: 0;
}

body.page-favoritos .fav-hotel-card__body h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: #002660;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.page-favoritos .fav-hotel-card__loc {
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
}

body.page-favoritos .fav-hotel-card__loc .material-symbols-outlined {
    font-size: 0.875rem;
    flex-shrink: 0;
}

body.page-favoritos .fav-hotel-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.6875rem;
    color: #94a3b8;
}

body.page-favoritos .fav-hotel-card__price {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #002660;
}

body.page-favoritos .fav-hotel-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.625rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    background: #002660;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    width: fit-content;
    transition: background 0.15s ease;
}

body.page-favoritos .fav-hotel-card__cta .material-symbols-outlined {
    font-size: 1rem;
}

body.page-favoritos .fav-hotel-card:hover .fav-hotel-card__cta {
    background: #003a8c;
}

body.page-favoritos .fav-hotel-card__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem 0.75rem;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

body.page-favoritos .fav-add-col-select {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.45rem 0.5rem;
    border: 1px solid #d8dee8;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.75rem;
    color: #334155;
}

body.page-favoritos .fav-add-col-btn {
    flex-shrink: 0;
    padding: 0.45rem 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background: #002660;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    cursor: pointer;
}

body.page-favoritos .fav-remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.94);
    color: #dc2626;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

body.page-favoritos .fav-remove-btn .material-symbols-outlined {
    font-size: 1.125rem;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

body.page-favoritos .fav-empty {
    grid-column: 1 / -1;
    padding: 3rem 1.5rem;
    text-align: center;
    border-radius: 1rem;
    border: 1px dashed #cbd5e1;
    background: #fff;
}

body.page-favoritos .fav-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.75rem;
    border-radius: 9999px;
    background: #f0f5ff;
    color: #002660;
}

body.page-favoritos .fav-empty p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

body.page-favoritos .fav-empty a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    background: #002660;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
}

body.page-favoritos .fav-coleccion {
    margin-bottom: 1.25rem;
    padding: 1.125rem;
    border-radius: 1rem;
    border: 1px solid #e8edf5;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 38, 96, 0.04);
}

body.page-favoritos .fav-coleccion__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

body.page-favoritos .fav-coleccion__head h3 {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #002660;
}

body.page-favoritos .fav-coleccion__head p {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}

body.page-favoritos .fav-coleccion__badge {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: #f0f5ff;
    color: #002660;
    font-size: 0.6875rem;
    font-weight: 700;
}

body.page-favoritos .fav-coleccion__del {
    flex-shrink: 0;
    border: none;
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.4rem 0.625rem;
    border-radius: 0.375rem;
    cursor: pointer;
}

body.page-favoritos .fav-new-col {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
    padding: 1.125rem;
    border-radius: 1rem;
    border: 1px solid #dbe4f3;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

body.page-favoritos .fav-new-col__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #002660;
}

body.page-favoritos .fav-new-col input,
body.page-favoritos .fav-new-col textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d8dee8;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

body.page-favoritos .fav-new-col input:focus,
body.page-favoritos .fav-new-col textarea:focus {
    outline: none;
    border-color: #003a8c;
    box-shadow: 0 0 0 3px rgba(0, 58, 140, 0.1);
}

body.page-favoritos .fav-new-col button {
    align-self: flex-start;
    padding: 0.55rem 1.125rem;
    border: none;
    border-radius: 0.5rem;
    background: #002660;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

body.page-favoritos .fav-loading {
    padding: 3rem;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

body.page-favoritos .fav-toast {
    position: fixed;
    left: 50%;
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 10060;
    padding: 0.625rem 1.125rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    max-width: calc(100vw - 2rem);
    text-align: center;
}

body.page-favoritos .fav-toast.is-visible {
    opacity: 1;
}

@media (min-width: 768px) {
    body.page-favoritos .fav-toast {
        bottom: 1.5rem;
    }
}

/* Colección: tarjeta compacta horizontal dentro de colección */
body.page-favoritos .fav-coleccion__empty {
    margin: 0;
    padding: 0.25rem;
    font-size: 0.8125rem;
    color: #94a3b8;
}

body.page-favoritos .fav-hotel-card__rating .material-symbols-outlined {
    font-size: 0.75rem;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

body.page-favoritos .fav-coleccion .fav-hotel-card-wrap {
    flex-direction: row;
}

body.page-favoritos .fav-coleccion .fav-hotel-card {
    flex-direction: row;
    align-items: stretch;
}

body.page-favoritos .fav-coleccion .fav-hotel-card__media {
    width: 6.5rem;
    min-width: 6.5rem;
    aspect-ratio: auto;
    min-height: 5rem;
}

body.page-favoritos .fav-coleccion .fav-hotel-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.page-favoritos .fav-coleccion .fav-grid {
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

@media (min-width: 768px) {
    body.page-favoritos .fav-coleccion .fav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
