/* imob-overrides.css
 * Delta específico da página imob.ejs.
 * Carregar DEPOIS de landing-base.css + landing-premium.css
 * (e antes de tenant-public.css, se aplicável).
 * Núcleo compartilhado (navbar, hero, ofertas, FAQ, CTA, etc.): landing-premium.css
 */

/* Preço dos cards de imóvel — brand do tenant */
.icard-price {
    color: var(--brand-primary);
}

/* =============================================================================
 * Cards de imóveis (#repeat_produtos) — visual premium; só imob
 * Não altera cores dinâmicas (badge/Ver imóvel via dmx-style) nem #25d366 / #fbbf24
 * ============================================================================= */

#repeat_produtos.imoveis-grid {
    align-items: stretch;
}

#repeat_produtos .icard.imovel-card {
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--brand-primary) 10%, var(--border));
    box-shadow:
        0 4px 14px rgba(15, 23, 42, 0.06),
        0 1px 3px rgba(15, 23, 42, 0.04);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

#repeat_produtos .icard.imovel-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--brand-primary) 22%, var(--border));
    box-shadow:
        0 18px 44px color-mix(in srgb, var(--brand-primary) 22%, transparent),
        0 6px 16px rgba(15, 23, 42, 0.1);
}

/* Mídia: overflow confirmado; zoom só na foto (não no watermark) */
#repeat_produtos .icard.imovel-card .icard-img {
    overflow: hidden;
    border-radius: 0;
}

#repeat_produtos .icard.imovel-card .icard-img > img:not(.icard-wm) {
    transition: transform 0.3s ease;
    will-change: transform;
}

#repeat_produtos .icard.imovel-card:hover .icard-img > img:not(.icard-wm) {
    transform: scale(1.04);
}

/* Mantém marca d'água centralizada no hover (base aplicaria scale em todas as img) */
#repeat_produtos .icard.imovel-card:hover .icard-wm {
    transform: translate(-50%, -50%);
}

/* Preço — destaque tipográfico (cor já via --brand-primary acima) */
#repeat_produtos .icard.imovel-card .icard-price,
#repeat_produtos .icard.imovel-card .imovel-card__price {
    font-size: clamp(1.35rem, 2.4vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

/* Badge — tipografia/padding; cor permanece dmx-style (cor_primaria) */
#repeat_produtos .icard.imovel-card .icard-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.68rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

/* Estrela — âmbar #fbbf24 intacto; só refino de tamanho/sombra */
#repeat_produtos .icard.imovel-card .icard-star {
    width: 34px;
    height: 34px;
    font-size: 0.78rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.45);
}

/* Body — mais respiro entre blocos */
#repeat_produtos .icard.imovel-card .icard-body,
#repeat_produtos .icard.imovel-card .imovel-card__body {
    padding: 18px 20px 20px;
    gap: 12px;
}

#repeat_produtos .icard.imovel-card .icard-title,
#repeat_produtos .icard.imovel-card .imovel-card__title {
    margin: 0;
}

#repeat_produtos .icard.imovel-card .icard-addr,
#repeat_produtos .icard.imovel-card .imovel-card__addr {
    margin: 0;
}

#repeat_produtos .icard.imovel-card .icard-attrs,
#repeat_produtos .icard.imovel-card .imovel-card__attrs {
    margin: 2px 0 0;
    padding: 12px 0;
    gap: 10px 14px;
}

/* Ações — mesma altura/padding/raio; cores intactas (wpp / dmx-style) */
#repeat_produtos .icard.imovel-card .icard-actions,
#repeat_produtos .icard.imovel-card .imovel-card__actions {
    gap: 10px;
    margin-top: auto;
}

#repeat_produtos .icard.imovel-card .icard-actions .bcwpp,
#repeat_produtos .icard.imovel-card .icard-actions .bcview,
#repeat_produtos .icard.imovel-card .imovel-card__actions .bcwpp,
#repeat_produtos .icard.imovel-card .imovel-card__actions .bcview {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    justify-content: center;
}

@media (max-width: 575.98px) {
    #repeat_produtos .icard.imovel-card .icard-body,
    #repeat_produtos .icard.imovel-card .imovel-card__body {
        padding: 16px 16px 18px;
        gap: 10px;
    }

    #repeat_produtos .icard.imovel-card .icard-price,
    #repeat_produtos .icard.imovel-card .imovel-card__price {
        font-size: 1.28rem;
    }

    #repeat_produtos .icard.imovel-card .icard-actions .bcwpp,
    #repeat_produtos .icard.imovel-card .icard-actions .bcview,
    #repeat_produtos .icard.imovel-card .imovel-card__actions .bcwpp,
    #repeat_produtos .icard.imovel-card .imovel-card__actions .bcview {
        min-height: 44px;
        border-radius: 11px;
    }
}

/* Tipografia — Inter sem DM Sans (só imob) */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* dmx-if vazio — inclui #hero_wrapper e #topo2 (só imob) */
#hero_wrapper:not(:has(*)),
#topo2:not(:has(*)),
#topo3:not(:has(*)),
section[is="dmx-if"]:not(:has(*)),
div[is="dmx-if"]:not(:has(*)) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* Hero vídeo — altura mínima específica da imob */
.bgvid.imob-hero-video {
    min-height: clamp(320px, min(38vw, 52vh), 680px);
}

/* =============================================================================
 * TOPO 02 (#topo2) — espelho das regras #topo_slider de landing-base.css
 * (só imob; hosp/lp/guia continuam com #topo_slider na base)
 * ============================================================================= */
header.nav-wrap + section#topo2 {
    margin-top: 0;
}

#topo2.imob-hero-slider-wrap {
    background: var(--surface);
    line-height: 0;
    overflow: hidden;
}

#topo2 .imob-hero-slider-inner {
    width: 100%;
    max-width: none;
    padding: 0;
    line-height: 0;
    overflow: hidden;
}

#topo2 .dmx-slideshow {
    position: relative;
    width: 100%;
    height: clamp(160px, min(32vw, 42vh), 520px) !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden;
    aspect-ratio: unset !important;
}

#topo2 .dmx-slideshow-slides-container,
#topo2 .dmx-slideshow-effects-container,
#topo2 .dmx-slideshow-textbox-container {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

#topo2 .dmx-slideshow a,
#topo2 .dmx-slideshow [class*="slide"],
#topo2 .dmx-slideshow img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
}

#topo2 .dmx-slideshow-paging-container {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    z-index: 3;
    line-height: normal;
}

#topo2 .dmx-slideshow-prev,
#topo2 .dmx-slideshow-next {
    line-height: normal;
}

/* =============================================================================
 * Busca imóveis — layout 4 cols (.imob-page-search-*) só imob
 * Visual do painel/inputs/ações: landing-premium.css (.imob-search-*)
 * ============================================================================= */

#sk_produtos {
    margin-top: 0 !important;
}

/* Desktop: 4 cols — linha 1 filtros; linha 2 banheiros + nome + ações */
#produtos .imob-page-search-grid.imob-search-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 12px;
    align-items: end;
}

#produtos .imob-page-search-grid .imob-search-item,
#produtos .imob-page-search-grid .imob-search-item--wide,
#produtos .imob-page-search-grid .imob-search-item:nth-child(n) {
    grid-column: auto;
    gap: 7px;
}

#produtos .imob-page-search-grid .imob-search-extras {
    grid-column: span 2;
}

#produtos .imob-page-search-grid .imob-search-extras-grid {
    display: block;
    width: 100%;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

#produtos .imob-page-search-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    grid-column: span 1;
    padding-bottom: 0;
}

@media (max-width: 767.98px) {
    #produtos .imob-page-search-grid.imob-search-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    #produtos .imob-page-search-grid .imob-search-item--collapse,
    #produtos .imob-page-search-grid .imob-search-extras,
    #produtos .imob-page-search-actions {
        grid-column: 1 / -1;
    }

    #produtos .imob-page-search-actions {
        flex-direction: column;
        gap: 8px;
    }
}

/* =============================================================================
 * Footer (fundo cor_primaria via dmx-style — não sobrescrever)
 * ============================================================================= */

#footer.foot-vivareal {
    padding: 56px 0 0;
}

#footer .foot-grid {
    gap: 40px;
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    #footer .foot-grid {
        gap: 48px;
    }
}

#footer .foot-slabel {
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

#footer .foot-nav {
    gap: 4px;
}

#footer .foot-nav a {
    min-height: 40px;
    padding: 4px 0;
    transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.82;
}

#footer .foot-nav a:hover {
    color: #fff;
    opacity: 1;
    transform: translateX(3px);
}

#footer .foot-contact-btn {
    min-height: 46px;
    border-radius: 12px;
    padding: 0 18px;
    transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

#footer .foot-contact-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

#footer .foot-social .sbtn {
    width: 42px;
    height: 42px;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#footer .foot-social .sbtn:hover {
    transform: translateY(-2px) scale(1.06);
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

#footer .foot-bottom {
    padding: 22px 24px;
}
