/* Real Estate Feed Widget — v2.1 */

/* ====== Tarjeta base (compartida entre layouts) ====== */
.refw-list { font-family: inherit; }

.refw-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
    display: flex;
}
.refw-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    transform: translateY(-1px);
}

.refw-thumb {
    overflow: hidden;
    background: #edf2f7;
    flex-shrink: 0;
}
.refw-thumb a { display: block; width: 100%; height: 100%; }
.refw-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.refw-card:hover .refw-thumb img { transform: scale(1.05); }

.refw-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.refw-title {
    font-size: .9rem;
    font-weight: 600;
    color: #1a3c5e;
    line-height: 1.35;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
a.refw-title:hover { color: #c8972a; }

.refw-loc  { font-size: .8rem; color: #64748b; }
.refw-price{ font-size: 1.25rem; font-weight: 700; color: #1a3c5e; letter-spacing: -.01em; }
.refw-feats{ font-size: .82rem; color: #718096; }

.refw-cta {
    display: inline-block;
    margin-top: auto;
    padding: 7px 18px;
    background: #1a3c5e;
    color: #fff !important;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: background .15s ease;
    align-self: flex-start;
}
.refw-cta:hover { background: #c8972a; color: #fff !important; }

/* ====== LAYOUT: LISTA (horizontal, default) ====== */
.refw-list.refw-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.refw-list.refw-list .refw-card {
    flex-direction: row;
    min-height: 200px;
}

/* ====== LAYOUT: CUADRÍCULA ====== */
.refw-list.refw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.refw-list.refw-grid .refw-card { flex-direction: column; }
.refw-list.refw-grid .refw-thumb {
    width: 100% !important;
    min-width: 0 !important;
}
.refw-list.refw-grid .refw-body { padding: 14px 16px; }

/* ====== LAYOUT: COMPACTO ====== */
.refw-list.refw-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.refw-list.refw-compact .refw-card {
    flex-direction: row;
    border-radius: 6px;
}
.refw-list.refw-compact .refw-thumb {
    width: 120px !important;
    min-width: 120px !important;
    height: 90px !important;
}
.refw-list.refw-compact .refw-body {
    padding: 8px 12px;
    gap: 4px;
}
.refw-list.refw-compact .refw-title { font-size: .85rem; -webkit-line-clamp: 1; }
.refw-list.refw-compact .refw-price { font-size: 1rem; }
.refw-list.refw-compact .refw-loc,
.refw-list.refw-compact .refw-feats { font-size: .75rem; }
.refw-list.refw-compact .refw-cta { display: none; }

/* ====== Título del shortcode ====== */
.refw-shortcode-title {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    color: #1a3c5e;
}

/* ====== Responsive ====== */
@media (max-width: 600px) {
    /* En móvil, lista pasa a vertical */
    .refw-list.refw-list .refw-card { flex-direction: column; }
    .refw-list.refw-list .refw-thumb {
        width: 100% !important;
        min-width: 0 !important;
        height: 200px !important;
    }
    /* Compacto se mantiene horizontal pero más pequeño */
    .refw-list.refw-compact .refw-thumb {
        width: 100px !important;
        min-width: 100px !important;
        height: 80px !important;
    }
}
