/* LBM Imóveis Juliana - Frontend v1.0.2
   Correções de compatibilidade com Elementor/tema: tipografia, cards, botões e single. */

.lbm-imoveis-wrap,
.lbm-imovel-single {
    --lbm-imovel-primary: #005E33;
    --lbm-imovel-hover: #84C340;
    --lbm-imovel-button-bg: #005E33;
    --lbm-imovel-button-text: #ffffff;
    --lbm-imovel-button-hover-bg: #84C340;
    --lbm-imovel-button-hover-text: #ffffff;
    --lbm-imovel-button-border: #005E33;
    --lbm-imovel-outline-bg: #ffffff;
    --lbm-imovel-outline-text: #005E33;
    --lbm-imovel-outline-border: #005E33;
    --lbm-imovel-status-bg: #005E33;
    --lbm-imovel-status-text: #ffffff;
    --lbm-imovel-badge-bg: #edf4f0;
    --lbm-imovel-badge-text: #005E33;
    --lbm-imovel-price-color: #005E33;
    --lbm-imovel-title-color: #1f2937;
    --lbm-imovel-text: #1f2937;
    --lbm-imovel-muted: #667085;
    --lbm-imovel-border: #e5e7eb;
    --lbm-imovel-card-bg: #ffffff;
    --lbm-imovel-filter-bg: #f8fafc;
    --lbm-imovel-soft: #eef2f0;
    --lbm-imovel-radius: 18px;
    font-family: inherit;
    color: var(--lbm-imovel-text);
    box-sizing: border-box;
}

.lbm-imoveis-wrap *,
.lbm-imovel-single * {
    box-sizing: border-box;
}

.lbm-imoveis-filtros {
    width: min(100%, 1220px);
    margin: 0 auto 34px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(170px, .9fr) minmax(170px, .9fr) minmax(170px, .9fr) auto;
    gap: 12px;
    align-items: center;
    background: var(--lbm-imovel-filter-bg);
    border: 1px solid var(--lbm-imovel-border);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.lbm-imoveis-filtros input,
.lbm-imoveis-filtros select,
.lbm-imoveis-filtros button {
    width: 100%;
    min-height: 52px;
    border-radius: 12px;
    font-size: 16px !important;
    line-height: 1.25 !important;
    font-weight: 500;
    box-shadow: none;
    outline: none;
}

.lbm-imoveis-filtros input,
.lbm-imoveis-filtros select {
    padding: 0 16px;
    color: var(--lbm-imovel-text);
    background: var(--lbm-imovel-card-bg);
    border: 1px solid var(--lbm-imovel-border);
}

.lbm-imoveis-filtros input:focus,
.lbm-imoveis-filtros select:focus {
    border-color: var(--lbm-imovel-primary);
    box-shadow: 0 0 0 3px rgba(0, 94, 51, .12);
}

.lbm-imoveis-filtros button {
    cursor: pointer;
    padding: 0 22px;
    border: 1px solid var(--lbm-imovel-button-border);
    background: var(--lbm-imovel-button-bg);
    color: var(--lbm-imovel-button-text);
    font-weight: 800;
    white-space: nowrap;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.lbm-imoveis-filtros button:hover,
.lbm-imoveis-filtros button:focus {
    background: var(--lbm-imovel-button-hover-bg);
    border-color: var(--lbm-imovel-button-hover-bg);
    color: var(--lbm-imovel-button-hover-text);
    transform: translateY(-1px);
}

.lbm-imoveis-grid {
    width: min(100%, 1220px);
    margin: 0 auto;
    display: grid;
    gap: 28px;
    align-items: stretch;
}

.lbm-imoveis-grid.lbm-imoveis-cols-1 { grid-template-columns: 1fr; }
.lbm-imoveis-grid.lbm-imoveis-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lbm-imoveis-grid.lbm-imoveis-cols-3,
.lbm-imoveis-grid.lbm-imoveis-cols-4,
.lbm-imoveis-grid.lbm-imoveis-cols-5,
.lbm-imoveis-grid.lbm-imoveis-cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.lbm-imovel-card {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--lbm-imovel-card-bg);
    border: 1px solid var(--lbm-imovel-border);
    border-radius: var(--lbm-imovel-radius);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.lbm-imovel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, .10);
    border-color: rgba(0, 94, 51, .22);
}

.lbm-imovel-card-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--lbm-imovel-soft);
    text-decoration: none !important;
}

.lbm-imovel-card-image img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.lbm-imovel-card:hover .lbm-imovel-card-image img {
    transform: scale(1.035);
}

.lbm-imovel-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lbm-imovel-muted);
    font-size: 16px !important;
    font-weight: 700;
}

.lbm-imovel-status {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 94px;
    height: 94px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    border-radius: 999px;
    background: var(--lbm-imovel-status-bg);
    color: var(--lbm-imovel-status-text);
    font-size: 13px !important;
    line-height: 1.15 !important;
    font-weight: 800;
    letter-spacing: .01em;
    box-shadow: 0 10px 22px rgba(0, 94, 51, .25);
}

.lbm-imovel-card-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px;
}

.lbm-imovel-tipo {
    display: inline-block;
    margin: 0 0 10px;
    color: var(--lbm-imovel-primary);
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.lbm-imovel-card h3 {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: var(--lbm-imovel-title-color) !important;
    font-size: clamp(22px, 1.9vw, 30px) !important;
    line-height: 1.12 !important;
    font-weight: 850 !important;
    letter-spacing: -.03em !important;
    overflow-wrap: anywhere;
}

.lbm-imovel-card h3 a {
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: inherit !important;
    text-decoration: none !important;
}

.lbm-imovel-card h3 a:hover,
.lbm-imovel-card h3 a:focus {
    color: var(--lbm-imovel-primary) !important;
}

.lbm-imovel-local {
    margin: 0 0 14px !important;
    color: var(--lbm-imovel-muted) !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    font-weight: 500 !important;
}

.lbm-imovel-card-meta {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--lbm-imovel-border);
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    color: var(--lbm-imovel-muted);
    font-size: 15px !important;
    line-height: 1.35 !important;
}

.lbm-imovel-card-meta span,
.lbm-imovel-card-meta strong {
    font-size: 15px !important;
    line-height: 1.35 !important;
}

.lbm-imovel-card-meta strong {
    color: var(--lbm-imovel-price-color);
    font-weight: 900;
    white-space: nowrap;
}

.lbm-imovel-card-actions,
.lbm-imovel-single-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.lbm-imovel-btn,
.lbm-imovel-btn:visited,
.elementor .lbm-imovel-btn,
.elementor .lbm-imovel-btn:visited {
    min-height: 48px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px !important;
    border-radius: 12px !important;
    border: 1px solid var(--lbm-imovel-button-border) !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
    text-align: center;
    text-decoration: none !important;
    box-shadow: none !important;
    white-space: normal;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.lbm-imovel-card-actions .lbm-imovel-btn {
    flex: 1 1 140px;
}

.lbm-imovel-btn-primary,
.lbm-imovel-btn-primary:visited,
.elementor .lbm-imovel-btn-primary,
.elementor .lbm-imovel-btn-primary:visited {
    background: var(--lbm-imovel-button-bg) !important;
    color: var(--lbm-imovel-button-text) !important;
}

.lbm-imovel-btn-outline,
.lbm-imovel-btn-outline:visited,
.elementor .lbm-imovel-btn-outline,
.elementor .lbm-imovel-btn-outline:visited {
    background: var(--lbm-imovel-outline-bg) !important;
    color: var(--lbm-imovel-outline-text) !important;
    border-color: var(--lbm-imovel-outline-border) !important;
}

.lbm-imovel-btn:hover,
.lbm-imovel-btn:focus,
.elementor .lbm-imovel-btn:hover,
.elementor .lbm-imovel-btn:focus {
    transform: translateY(-1px);
    background: var(--lbm-imovel-button-hover-bg) !important;
    border-color: var(--lbm-imovel-button-hover-bg) !important;
    color: var(--lbm-imovel-button-hover-text) !important;
}

.lbm-imoveis-empty {
    width: min(100%, 1220px);
    margin: 0 auto;
    padding: 22px;
    border: 1px solid var(--lbm-imovel-border);
    border-radius: 16px;
    background: var(--lbm-imovel-card-bg);
    color: var(--lbm-imovel-muted);
    text-align: center;
    font-size: 16px !important;
}

/* Página individual */
.lbm-imovel-single {
    width: min(100%, 1280px);
    margin: 0 auto 40px;
}

.lbm-imovel-single-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, .9fr);
    gap: 30px;
    align-items: start;
}

.lbm-imovel-gallery {
    display: grid;
    gap: 14px;
}

.lbm-imovel-gallery figure {
    margin: 0 !important;
    overflow: hidden;
    border-radius: 18px;
    background: var(--lbm-imovel-soft);
    border: 1px solid var(--lbm-imovel-border);
}

.lbm-imovel-gallery figure:first-child {
    aspect-ratio: 16 / 10;
}

.lbm-imovel-gallery figure:not(:first-child) {
    aspect-ratio: 16 / 9;
}

.lbm-imovel-gallery img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;
}

.lbm-imovel-info-box,
.lbm-imovel-features {
    background: var(--lbm-imovel-card-bg);
    border: 1px solid var(--lbm-imovel-border);
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.lbm-imovel-info-box {
    padding: 26px;
    position: sticky;
    top: 22px;
}

.lbm-imovel-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.lbm-imovel-badges span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--lbm-imovel-badge-bg);
    color: var(--lbm-imovel-badge-text);
    font-size: 12px !important;
    line-height: 1.1 !important;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.lbm-imovel-price {
    margin: 0 0 10px;
    color: var(--lbm-imovel-price-color);
    font-size: clamp(32px, 4vw, 50px) !important;
    line-height: 1.05 !important;
    font-weight: 900 !important;
    letter-spacing: -.04em;
}

.lbm-imovel-location {
    margin: 0 0 22px;
    color: var(--lbm-imovel-muted);
    font-size: 17px !important;
    line-height: 1.45 !important;
    font-weight: 500;
}

.lbm-imovel-details {
    margin: 0 !important;
}

.lbm-imovel-details div {
    display: grid;
    grid-template-columns: minmax(140px, .8fr) minmax(0, 1.2fr);
    gap: 16px;
    padding: 13px 0;
    border-top: 1px solid var(--lbm-imovel-border);
}

.lbm-imovel-details dt,
.lbm-imovel-details dd {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
}

.lbm-imovel-details dt {
    color: var(--lbm-imovel-text);
    font-weight: 850;
}

.lbm-imovel-details dd {
    color: var(--lbm-imovel-muted);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.lbm-imovel-single-actions .lbm-imovel-btn {
    width: 100%;
    min-height: 52px;
    font-size: 17px !important;
}

.lbm-imovel-features {
    margin-top: 30px;
    padding: 28px 30px;
}

.lbm-imovel-features h2 {
    margin: 0 0 18px !important;
    color: var(--lbm-imovel-title-color) !important;
    font-size: clamp(28px, 3vw, 42px) !important;
    line-height: 1.12 !important;
    font-weight: 850 !important;
    letter-spacing: -.03em;
}

.lbm-imovel-features ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.lbm-imovel-features li {
    position: relative;
    margin: 0 !important;
    padding: 0 0 0 28px !important;
    color: var(--lbm-imovel-muted);
    font-size: 16px !important;
    line-height: 1.45 !important;
    font-weight: 500;
}

.lbm-imovel-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: .08em;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--lbm-imovel-badge-bg);
    color: var(--lbm-imovel-badge-text);
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 1024px) {
    .lbm-imoveis-filtros {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lbm-imoveis-filtros button {
        grid-column: 1 / -1;
    }

    .lbm-imoveis-grid.lbm-imoveis-cols-3,
    .lbm-imoveis-grid.lbm-imoveis-cols-4,
    .lbm-imoveis-grid.lbm-imoveis-cols-5,
    .lbm-imoveis-grid.lbm-imoveis-cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lbm-imovel-single-summary {
        grid-template-columns: 1fr;
    }

    .lbm-imovel-info-box {
        position: static;
    }
}

@media (max-width: 640px) {
    .lbm-imoveis-filtros {
        padding: 14px;
        border-radius: 16px;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .lbm-imoveis-grid,
    .lbm-imoveis-grid.lbm-imoveis-cols-2,
    .lbm-imoveis-grid.lbm-imoveis-cols-3,
    .lbm-imoveis-grid.lbm-imoveis-cols-4,
    .lbm-imoveis-grid.lbm-imoveis-cols-5,
    .lbm-imoveis-grid.lbm-imoveis-cols-6 {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .lbm-imovel-card-body {
        padding: 18px;
    }

    .lbm-imovel-card h3 {
        font-size: 24px !important;
    }

    .lbm-imovel-status {
        width: 76px;
        height: 76px;
        top: 12px;
        right: 12px;
        font-size: 12px !important;
    }

    .lbm-imovel-card-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .lbm-imovel-single {
        margin-bottom: 28px;
    }

    .lbm-imovel-info-box,
    .lbm-imovel-features {
        border-radius: 16px;
        padding: 20px;
    }

    .lbm-imovel-price {
        font-size: 34px !important;
    }

    .lbm-imovel-details div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .lbm-imovel-features ul {
        grid-template-columns: 1fr;
    }
}
