/* MadeiraUsados global polish: subtle, reversible, no layout ownership. */
:root {
    --mu-polish-ease: cubic-bezier(.16, 1, .3, 1);
    --mu-polish-shadow: 0 18px 48px rgba(7, 29, 24, .10);
    --mu-polish-shadow-strong: 0 24px 70px rgba(7, 29, 24, .14);
    --mu-polish-ring: 0 0 0 4px rgba(199, 239, 110, .44);
}

html.mu-enhanced {
    scroll-behavior: smooth;
}

html.mu-enhanced body {
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

html.mu-enhanced :where(a, button, input, select, textarea) {
    -webkit-tap-highlight-color: transparent;
}

html.mu-enhanced :where(input, select, textarea) {
    font-size: 16px;
}

html.mu-enhanced :where(.button, button[type="submit"], .chip, .pill, .badge, .segment, .job-pill, .local-card, .conversion-action, .featured-control, .detail-action-row a, .nav-actions a, .nav-links a) {
    transition: transform .2s var(--mu-polish-ease), box-shadow .2s ease, border-color .2s ease, background-color .2s ease, color .2s ease, opacity .2s ease;
}

@media (hover: hover) and (pointer: fine) {
    html.mu-enhanced :where(.button, button[type="submit"], .chip, .pill, .local-card, .conversion-action, .featured-control, .detail-action-row a):hover {
        transform: translateY(-1px);
        box-shadow: var(--mu-polish-shadow);
    }

    html.mu-enhanced :where(.listing-card, .property, .job, .seller-card, .guide, .info-card, .conversion-card, .panel, .hero-panel, .filter-sidebar, .summary, .gallery-panel, .category-link):hover {
        border-color: rgba(19, 92, 60, .26) !important;
        box-shadow: var(--mu-polish-shadow-strong);
    }

    html.mu-enhanced :where(.listing-card, .property, .job, .seller-card, .guide, .info-card, .conversion-card, .panel, .hero-panel, .filter-sidebar, .summary, .gallery-panel) {
        transition: transform .22s var(--mu-polish-ease), box-shadow .22s ease, border-color .22s ease;
    }

    html.mu-enhanced :where(.listing-card, .property, .job, .seller-card, .guide, .info-card, .conversion-card):hover {
        transform: translateY(-3px);
    }

    html.mu-enhanced :where(.featured-card, .listing-card, .property) img {
        transition: transform .45s var(--mu-polish-ease), filter .45s ease;
    }

    html.mu-enhanced :where(.featured-card, .listing-card, .property):hover img {
        transform: scale(1.025);
    }

    html.mu-enhanced .listing-card:hover :where(.listing-slide img, .listing-image img) {
        transform: none !important;
    }
}

html.mu-enhanced :where(input, select, textarea):focus {
    outline: none;
    box-shadow: var(--mu-polish-ring);
    border-color: rgba(19, 92, 60, .56) !important;
}

html.mu-enhanced :where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid rgba(199, 239, 110, .86);
    outline-offset: 3px;
}

html.mu-enhanced :where(.search, .search-inline, .filters, .filter-sidebar) {
    backdrop-filter: blur(14px);
}

html.mu-enhanced .listing-card :where(.listing-gallery, .listing-image) {
    background: linear-gradient(180deg, #f8fbf8 0%, #edf5ef 100%) !important;
    overflow: hidden !important;
}

html.mu-enhanced .listing-card :where(.listing-slide, .listing-image) {
    padding: 8px !important;
}

html.mu-enhanced .listing-card :where(.listing-slide img, .listing-image img) {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center 58% !important;
    transform: none !important;
}

html.mu-enhanced .listing-card :where(.listing-gallery.carros, .listing-gallery.motas) :where(.listing-slide img, .listing-image img) {
    object-position: center bottom !important;
}

html.mu-enhanced .brand img {
    transition: transform .22s var(--mu-polish-ease), filter .22s ease;
}

@media (hover: hover) and (pointer: fine) {
    html.mu-enhanced .brand:hover img {
        transform: translateY(-1px);
        filter: drop-shadow(0 10px 18px rgba(7, 29, 24, .12));
    }
}

html.mu-enhanced [data-mu-reveal] {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(5px);
}

html.mu-enhanced [data-mu-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition: opacity .62s var(--mu-polish-ease), transform .62s var(--mu-polish-ease), filter .62s ease;
}

html.mu-enhanced [data-favorite-toggle],
html.mu-enhanced .favorite-button,
html.mu-enhanced .photo-arrow {
    transition: transform .18s var(--mu-polish-ease), box-shadow .18s ease, background-color .18s ease;
}

/* Photo carousel controls belong on the photo edge across the whole site. */
html.mu-enhanced :where(.gallery-nav.prev, .photo-arrow.prev) {
    left: 12px !important;
}

html.mu-enhanced :where(.gallery-nav.next, .photo-arrow.next) {
    right: 12px !important;
}

html.mu-enhanced :where(.gallery-nav, .photo-arrow) {
    z-index: 4;
}

@media (hover: hover) and (pointer: fine) {
    html.mu-enhanced [data-favorite-toggle]:hover,
    html.mu-enhanced .favorite-button:hover {
        transform: scale(1.04);
        box-shadow: 0 12px 30px rgba(7, 29, 24, .14);
    }

    html.mu-enhanced .main-photo .photo-arrow:hover {
        transform: translateY(-50%) scale(1.04);
        box-shadow: 0 12px 30px rgba(7, 29, 24, .14);
    }
}

@media (max-width: 640px) {
    html.mu-enhanced [data-mu-reveal] {
        transform: translateY(8px);
        filter: blur(3px);
    }
}

@media (prefers-reduced-motion: reduce) {
    html.mu-enhanced,
    html.mu-enhanced * ,
    html.mu-enhanced *::before,
    html.mu-enhanced *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }

    html.mu-enhanced [data-mu-reveal] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* Shared secondary-page restraint: marketplace utility beats oversized presentation. */
body.mu-page {
    background: #f7faf6 !important;
}

body.mu-page .shell {
    width: min(1120px, calc(100% - 28px)) !important;
}

body.mu-page .brand img,
body.mu-page .brand-logo {
    width: 152px !important;
}

body.mu-page :where(.nav, .site-nav) {
    min-height: 0 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

body.mu-page :where(.hero, .page-hero) {
    padding-top: 18px !important;
    padding-bottom: 14px !important;
    gap: 16px !important;
}

body.mu-page :where(.hero-card, .hero-panel, .card, .panel, .info-card, .module, .filter-card, .filter-sidebar, .property, .job, .listing-card, .guide, .tile, .insight, .fast-item, .setor, .page, .summary, .gallery-panel) {
    border-radius: 18px !important;
    box-shadow: none !important;
}

body.mu-page :where(.hero-card, .hero-panel, .card) {
    padding: 22px !important;
    min-height: 0 !important;
}

body.mu-page :where(h1) {
    font-size: clamp(32px, 4.1vw, 54px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.035em !important;
}

body.mu-page :where(h2) {
    font-size: clamp(23px, 2.45vw, 34px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.025em !important;
}

body.mu-page :where(h3) {
    letter-spacing: -0.02em !important;
}

body.mu-page :where(p, li) {
    font-size: 15px;
    line-height: 1.48;
}

body.mu-page :where(.dark p, .dark span, .card.dark p, .hero-card.dark p, .score-card p) {
    color: #edf8f3 !important;
}

body.mu-page :where(.section) {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

body.mu-page :where(.value-grid, .insights, .fast-list, .setor-grid, .stats, .quality) {
    gap: 10px !important;
    padding-top: 6px !important;
    padding-bottom: 18px !important;
}

body.mu-page :where(.tile, .insight, .fast-item, .setor, .stat) {
    min-height: 0 !important;
    padding: 14px !important;
}

body.mu-page :where(input, select, textarea) {
    min-height: 44px;
    font-size: 16px;
}

body.mu-page :where(.button) {
    min-height: 44px !important;
}

html.mu-enhanced :where(.nav-actions a, .nav-links a, .nav span a, .quick a, .quick-tags a, .segments a, .local-card, .chip, .tag, .segment, .pill) {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html.mu-enhanced :where(.category-link) {
    min-height: 44px;
    padding: 4px 2px;
}

html.mu-enhanced :where(.favorite-button, .featured-control, .gallery-nav, .photo-arrow, [data-favorite-toggle]) {
    min-width: 44px;
    min-height: 44px;
}

body.mu-page .listing-card :where(.listing-gallery, .listing-image) {
    height: 286px !important;
}

body.mu-page .listing-card :where(.listing-body) {
    padding: 7px 12px 8px !important;
}

body.mu-page .listing-card :where(.listing-body h3) {
    font-size: 17px !important;
    line-height: 1.1 !important;
    font-weight: 620 !important;
    letter-spacing: 0 !important;
    margin: 0 0 4px !important;
    min-height: 0 !important;
}

body.mu-page .listing-card :where(.listing-footer strong) {
    font-size: 16px !important;
    line-height: 1.08 !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
}

body.mu-page :where(.price) {
    font-size: clamp(22px, 2.4vw, 30px) !important;
}

body.mu-page :where(.footer-business-inner) {
    min-height: 0 !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

body.mu-page :where(.footer-intro) {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

body.mu-page :where(.footer-intro img) {
    width: 126px !important;
}

body.mu-page :where(.footer-links-wrap) {
    padding-top: 26px !important;
    padding-bottom: 24px !important;
}

@media (max-width: 720px) {
    html.reveal-ready [data-reveal],
    html.mu-enhanced [data-mu-reveal] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        animation: none !important;
    }

    body.mu-page .shell {
        width: min(100% - 20px, 1120px) !important;
    }

    body.mu-page .brand img,
    body.mu-page .brand-logo {
        width: 136px !important;
    }

    body.mu-page :where(.hero-card, .hero-panel, .card, .panel, .info-card, .module, .filter-card, .filter-sidebar, .page, .summary, .gallery-panel) {
        padding: 16px !important;
    }

    body.mu-page :where(h1) {
        font-size: clamp(30px, 10.5vw, 44px) !important;
    }

    body.mu-page .listing-card :where(.listing-gallery, .listing-image) {
        height: 252px !important;
    }

    body.mu-page .listing-card :where(.listing-body) {
        padding: 7px 11px 8px !important;
    }

    body.mu-page .listing-card :where(.listing-body h3) {
        font-size: 16px !important;
    }

    body.mu-page .listing-card :where(.listing-footer strong) {
        font-size: 15px !important;
    }

    body.mu-page :where(.market-browse, .layout) {
        display: flex !important;
        flex-direction: column;
    }

    body.mu-page-listing :where(.detail-layout) {
        display: flex !important;
        flex-direction: column;
    }

    body.mu-page-listing :where(.gallery-panel) {
        display: contents !important;
    }

    body.mu-page-listing :where(.gallery-kicker) {
        order: 1;
    }

    body.mu-page-listing :where(.hero-gallery) {
        order: 2;
    }

    body.mu-page-listing :where(.thumbs) {
        order: 3;
    }

    body.mu-page-listing :where(.photo-note) {
        order: 4;
    }

    body.mu-page-listing :where(.summary) {
        order: 5;
    }

    body.mu-page-listing :where(.content-section) {
        order: 6;
    }

    body.mu-page-listing :where(.map-panel) {
        order: 7;
    }

    body.mu-page :where(.results-area, .jobs, .properties) {
        order: 1;
    }

    body.mu-page :where(.filter-sidebar, .sidebar, .layout > aside) {
        order: 2;
    }

    body.mu-page :where(.filter-sidebar, .filter-card, .panel) {
        scroll-margin-top: 12px;
    }

    body.mu-page :where(.value-grid, .insights, .fast-list) {
        display: none !important;
    }

    body.mu-page-real-estate :where(.hero > .hero-card.dark),
    body.mu-page-jobs :where(.hero > aside.card.dark),
    body.mu-page-services :where(.hero > aside.card.dark),
    body.mu-page-publish :where(.hero > aside.card.dark) {
        display: none !important;
    }

    body.mu-page :where(.nav-links, .nav-actions, .nav span) a {
        min-height: 44px;
        padding-inline: 4px;
    }

    body.mu-page :where(.nav-links, .nav-actions, .nav span) {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap !important;
        white-space: nowrap;
        scrollbar-width: none;
    }

    body.mu-page :where(.nav-links, .nav-actions, .nav span)::-webkit-scrollbar {
        display: none;
    }

    html.mu-enhanced :where(.gallery-nav.prev, .photo-arrow.prev) {
        left: 10px !important;
    }

    html.mu-enhanced :where(.gallery-nav.next, .photo-arrow.next) {
        right: 10px !important;
    }
}

@media (max-width: 520px) {
    #cookie-banner {
        left: 10px !important;
        right: 10px !important;
        bottom: calc(10px + env(safe-area-inset-bottom)) !important;
        max-width: none !important;
        padding: 12px !important;
        border-radius: 16px !important;
    }

    #cookie-banner > div {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    #cookie-banner p {
        font-size: 12px !important;
        line-height: 1.32 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    #cookie-banner [data-cookie-choice] {
        min-height: 44px !important;
        flex: 1 1 0;
        padding: 0 12px !important;
    }
}
