/* Ordenar resultados — alojamientos (desktop + mobile) */

.aloj-sort-form {
    position: relative;
    margin: 0;
}

.aloj-sort {
    position: relative;
    display: inline-block;
}

.aloj-sort__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.75rem;
    padding: 0.45rem 0.85rem 0.45rem 0.55rem;
    border: 1px solid #dbe3f0;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #002660;
    box-shadow: 0 1px 2px rgba(0, 38, 96, 0.05), 0 4px 14px rgba(0, 38, 96, 0.06);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.aloj-sort__trigger:hover {
    border-color: #b8c9e8;
    box-shadow: 0 2px 6px rgba(0, 38, 96, 0.08), 0 8px 20px rgba(0, 38, 96, 0.08);
}

.aloj-sort.is-open .aloj-sort__trigger,
.aloj-sort__trigger:focus-visible {
    outline: none;
    border-color: #003a8c;
    box-shadow: 0 0 0 3px rgba(0, 58, 140, 0.12), 0 8px 20px rgba(0, 38, 96, 0.1);
}

.aloj-sort__icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    background: rgba(0, 38, 96, 0.08);
    color: #003a8c;
    flex-shrink: 0;
}

.aloj-sort__icon-badge .material-symbols-outlined {
    font-size: 1.15rem;
    line-height: 1;
}

.aloj-sort__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    min-width: 0;
    text-align: left;
}

.aloj-sort__eyebrow {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.2;
}

.aloj-sort__value {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #002660;
    line-height: 1.25;
    max-width: 11rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aloj-sort__chev {
    margin-left: 0.15rem;
    font-size: 1.25rem;
    color: #64748b;
    transition: transform 0.2s ease, color 0.15s ease;
    flex-shrink: 0;
}

.aloj-sort.is-open .aloj-sort__chev {
    transform: rotate(180deg);
    color: #003a8c;
}

.aloj-sort__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    width: min(18.5rem, calc(100vw - 2rem));
    padding: 0.45rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 38, 96, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
}

.aloj-sort__panel-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.55rem 0.35rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
}

.aloj-sort__panel-head .material-symbols-outlined {
    font-size: 1rem;
    color: #003a8c;
}

.aloj-sort__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aloj-sort__option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.62rem 0.65rem;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    color: #1e293b;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.12s ease, color 0.12s ease;
}

.aloj-sort__option:hover {
    background: #f1f5f9;
    color: #002660;
}

.aloj-sort__option.is-active {
    background: linear-gradient(90deg, rgba(0, 38, 96, 0.08) 0%, rgba(0, 58, 140, 0.04) 100%);
    color: #002660;
}

.aloj-sort__option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.aloj-sort__option.is-active .aloj-sort__option-icon {
    background: #002660;
    border-color: #002660;
    color: #fff;
}

.aloj-sort__option-icon .material-symbols-outlined {
    font-size: 1.05rem;
    line-height: 1;
}

.aloj-sort__option-text {
    flex: 1;
    min-width: 0;
}

.aloj-sort__option-check {
    font-size: 1.1rem;
    color: #003a8c;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.aloj-sort__option.is-active .aloj-sort__option-check {
    opacity: 1;
    transform: scale(1);
}

/* Mobile: ancho completo bajo el título */
.aloj-sort-form--mobile {
    width: 100%;
    margin-top: 0.65rem;
}

.aloj-sort-form--mobile .aloj-sort {
    display: block;
    width: 100%;
}

.aloj-sort-form--mobile .aloj-sort__trigger {
    width: 100%;
    justify-content: flex-start;
}

.aloj-sort-form--mobile .aloj-sort__value {
    max-width: none;
}

.aloj-sort-form--mobile .aloj-sort__panel {
    left: 0;
    right: 0;
    width: auto;
}
