/* ============== STRETCH FORÇADO DA CASCATA FILAMENT ============== */

/* Grid pai: linhas com altura igual */
.fi-ta-content-grid {
    align-items: stretch;
}

/* Wrapper do registro inteiro */
.fi-ta-content-grid > .fi-ta-record {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Div interno "flex items-center" que envolve o conteúdo */
.fi-ta-content-grid > .fi-ta-record > .flex.items-center {
    flex: 1 1 auto;
    align-items: stretch !important;
    display: flex;
    width: 100%;
}

/* "flex w-full flex-col gap-y-3 py-4" */
.fi-ta-content-grid > .fi-ta-record > .flex.items-center > .flex.w-full.flex-col {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* "flex-1" wrapper do link */
.fi-ta-content-grid > .fi-ta-record > .flex.items-center > .flex.w-full.flex-col > .flex-1 {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* O <a> que envolve tudo precisa esticar */
.fi-ta-content-grid > .fi-ta-record a.ps-4.pe-4.block {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* col-[--col-span-default] internos */
.fi-ta-content-grid > .fi-ta-record .col-\[--col-span-default\] {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* "flex flex-col items-start" interno */
.fi-ta-content-grid > .fi-ta-record .flex.flex-col.items-start {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* fi-ta-col-wrp */
.fi-ta-content-grid > .fi-ta-record .fi-ta-col-wrp {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* "flex w-full disabled:pointer-events-none justify-start text-start" */
.fi-ta-content-grid > .fi-ta-record .fi-ta-col-wrp > .flex.w-full {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
}

/* Ações do Filament (Ver Detalhes, Página, Compartilhar, Duplicar, Excluir)
 * ancoradas no rodapé da célula pra alinhar horizontalmente entre vizinhos. */
.fi-ta-record-actions,
.fi-ta-actions {
    margin-top: auto;
    flex-shrink: 0;
}


/* ============== IMOVEL CARD ============== */
.imovel-card {
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: all .18s ease;
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.dark .imovel-card {
    background: #1f2937;
    border-color: #374151;
}

.imovel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    border-color: #f59e0b;
}

/* Thumbnail: altura fixa por proporção */
.imovel-card__thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
    overflow: hidden;
}

.imovel-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.imovel-card__thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.dark .imovel-card__thumb--placeholder {
    background: #111827;
}

/* Badges sobre a thumb */
.imovel-card-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
    backdrop-filter: blur(4px);
}

.imovel-card-tipo {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(17,24,39,.85);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* Body do card: ocupa o resto, com gaps fixos */
.imovel-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    gap: 6px;
}

/* Cada linha do body com altura previsível */
.imovel-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;             /* sempre reserva 2 linhas */
    flex-shrink: 0;
}

.dark .imovel-card__title {
    color: #f3f4f6;
}

.imovel-card__code {
    font-size: 11px;
    color: #9ca3af;
    letter-spacing: .04em;
    min-height: 1.1em;
    flex-shrink: 0;
}

.imovel-card__price {
    font-size: 17px;
    font-weight: 700;
    color: #10b981;
    line-height: 1.2;
    min-height: 1.2em;
    flex-shrink: 0;
}

.imovel-card__attrs {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    min-height: 1.4em;             /* mesmo se vazio, ocupa 1 linha */
    flex-shrink: 0;
}

.dark .imovel-card__attrs {
    color: #9ca3af;
}

.imovel-card__address {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.4em;
    margin-top: auto;              /* empurra pro fim do body */
    flex-shrink: 0;
}

.dark .imovel-card__address {
    color: #9ca3af;
}

.imovel-card__address span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile: pode relaxar o min-height pra não sobrar espaço em coluna única */
@media (max-width: 768px) {
    .imovel-card {
        min-height: auto;
    }
}
