/* ============================
   CARD — Referência exata
   Desktop: horizontal (img esquerda, info direita)
   Mobile: vertical compacto, 1 por vez
   ============================ */

/* --- CARD BASE --- */
.ji-card {
    position: relative;
    display: flex;
    flex-direction: row;
    background: var(--ji-white, #fff);
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.ji-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.13);
    transform: translateY(-2px);
}

/* --- IMAGEM (desktop: esquerda fixa) --- */
.ji-card-media {
    position: relative;
    flex: 0 0 280px;
    min-height: 220px;
    overflow: hidden;
    display: block;
}

/* --- FAIXA LOCADO / VENDIDO --- */
.ji-ribbon {
    position: absolute;
    top: 24px;
    right: -32px;
    z-index: 10;
    padding: 6px 40px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    transform: rotate(45deg);
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: var(--ji-ribbon-bg, #D6C899);
    color: var(--ji-ribbon-color, #1a1a2e);
}

.ji-ribbon--locado {
    background: var(--ji-ribbon-bg, #D6C899);
}

.ji-ribbon--vendido {
    background: var(--ji-ribbon-bg, #B8A76E);
}

.ji-card-media .ji-gallery,
.ji-card-media .ji-gallery-track,
.ji-card-media .ji-gallery-slide {
    width: 100%;
    height: 100%;
}

.ji-card-media .ji-gallery {
    overflow: hidden;
}

.ji-card-media .ji-gallery-img,
.ji-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ji-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f8;
}

/* --- INFO (desktop: direita flex) --- */
.ji-card-info {
    flex: 1;
    padding: 14px 20px 16px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* --- TAGS ROW: badges + coração à direita --- */
.ji-card-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    position: relative;
}

/* Favoritar (Canto Inferior Direito do Card) */
.ji-fav-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: transparent !important;
    border: none !important;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none !important;
    padding: 0;
    box-shadow: none !important;
}

.ji-fav-btn:hover {
    transform: scale(1.1);
}

.ji-fav-btn.ji-active {
    background: transparent !important;
}

.ji-heart {
    width: 32px;
    height: 32px;
    display: block;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.9;
    pointer-events: none;
}

.ji-heart path {
    fill: #e74c3c !important;
    /* Vermelho padrão fixo */
    stroke: none !important;
}

.ji-fav-btn.ji-active .ji-heart path,
.ji-fav-btn.ji-active:hover .ji-heart path {
    fill: #ff0000 !important;
    /* Vermelho vibrante quando ativo */
}

.ji-fav-btn.ji-active .ji-heart {
    opacity: 1 !important;
    transform: scale(1.1);
}

.ji-fav-btn:hover .ji-heart {
    transform: scale(1.2);
    opacity: 1;
}

.ji-fav-btn:hover .ji-heart path {
    fill: #ff4d4d !important;
}

/* Tags / Badges */
.ji-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
    white-space: nowrap;
}

.ji-tag--venda {
    background: var(--ji-brand, #D6C899);
    color: var(--ji-dark, #1a1a2e);
}

.ji-tag--locacao,
.ji-tag--locação,
.ji-tag--aluguel {
    background: var(--ji-brand, #D6C899);
    color: var(--ji-dark, #1a1a2e);
}

.ji-tag--tipo {
    background: var(--ji-dark, #1a1a2e);
    color: #fff;
}

.ji-tag--ref {
    background: var(--ji-gray-200, #e8e8ed);
    color: var(--ji-gray-600, #5a5a6a);
}

.ji-tag--permuta {
    background: #4a7c59;
    color: #fff;
    font-size: 10px;
}

/* --- TÍTULO (link cobre card inteiro) --- */
.ji-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 6px;
}

.ji-card-title a {
    color: var(--ji-dark, #1a1a2e);
    text-decoration: none;
    transition: color 0.2s;
}

.ji-card-title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ji-card:hover .ji-card-title a {
    color: var(--ji-brand-dark, #b8a76e);
}

/* --- PREÇO (destaque) --- */
.ji-card-price {
    margin: 0 0 4px;
}

.ji-card-price strong {
    font-size: 20px;
    font-weight: 800;
    color: var(--ji-brand-dark, #b8a76e);
}

/* --- CONDOMÍNIO --- */
.ji-card-cond {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--ji-dark, #1a1a2e);
    margin: 0 0 8px;
    font-weight: 500;
}

.ji-card-cond svg {
    color: var(--ji-gray-500, #7a7a8a);
    flex-shrink: 0;
}

/* --- LOCALIZAÇÃO --- */
.ji-card-location {
    font-size: 12px;
    color: var(--ji-gray-500, #7a7a8a);
    margin: 0 0 8px;
    line-height: 1.4;
}

/* --- SPECS: ícones + números inline --- */
.ji-card-specs {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 6px;
}

.ji-spec {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ji-gray-600, #5a5a6a);
}

.ji-spec svg {
    width: 16px;
    height: 16px;
    color: var(--ji-gray-500, #7a7a8a);
    flex-shrink: 0;
}

/* --- SEM RESULTADOS --- */
.ji-no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--ji-gray-500);
}

.ji-no-results p {
    font-size: 14px;
    margin-bottom: 6px;
}

.ji-related-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ji-dark);
    margin: 20px 0 12px;
    padding-top: 14px;
    border-top: 1px solid var(--ji-gray-300, #d1d1d9);
}


/* ============================
   TABLET
   ============================ */
@media (max-width: 1024px) {
    .ji-card-media {
        flex: 0 0 240px;
        min-height: 200px;
    }

    .ji-card-info {
        padding: 12px 16px 14px;
    }

    .ji-card-title {
        font-size: 16px;
    }

    .ji-card-price strong {
        font-size: 18px;
    }
}

/* ============================
   MOBILE — vertical compacto, 1 por vez, centralizado
   ============================ */
@media (max-width: 768px) {

    .ji-card {
        flex-direction: column;
        border-radius: 14px;
        width: 100%;
    }

    .ji-card:hover {
        transform: none;
    }

    .ji-card-media {
        flex: none;
        width: 100%;
        height: 220px;
        min-height: 0;
    }

    .ji-card-info {
        padding: 14px 16px 16px;
    }

    .ji-card-tags {
        margin-bottom: 10px;
    }

    .ji-card-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .ji-card-price strong {
        font-size: 20px;
    }

    .ji-card-cond {
        font-size: 15px;
    }

    .ji-card-location {
        font-size: 13px;
    }

    .ji-card-specs {
        flex-wrap: wrap;
        gap: 10px;
    }

    .ji-spec svg {
        width: 18px;
        height: 18px;
    }

    .ji-spec {
        font-size: 14px;
    }
}