.mc-bg,
.mc-bg *{
    box-sizing:border-box;
}

.mc-bg{
    --orange:#F58220;
    --orange-dark:#d9660b;
    --dark:#111418;
    --text:#171a1f;
    --muted:#686e75;
    --border:#e3e6e9;
    font-family:Inter,Arial,Helvetica,sans-serif;
    color:var(--text);
    background:#fff;
}

.mc-bg__wrap{
    width:min(1500px,calc(100% - 56px));
    margin:0 auto;
}

/* HERO COMPACTO */
.mc-bg__hero{
    position:relative;
    min-height:118px;
    overflow:visible;
    background:linear-gradient(90deg,#050607 0%,#2a1307 42%,#8f3500 72%,#F58220 100%);
}

.mc-bg__hero:before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(90deg,rgba(0,0,0,.12),rgba(0,0,0,0));
    pointer-events:none;
}

.mc-bg__hero-overlay{
    display:none;
}

.mc-bg__hero-content{
    position:relative;
    z-index:2;
    min-height:118px;
    display:grid;
    grid-template-columns:minmax(240px,340px) minmax(420px,1fr) auto;
    gap:28px;
    align-items:center;
}

.mc-bg__breadcrumb{
    display:none!important;
}

.mc-bg__hero h1{
    margin:0!important;
    max-width:340px;
    color:#fff!important;
    font-size:clamp(25px,2vw,34px)!important;
    line-height:1.08!important;
    letter-spacing:-.025em!important;
    font-weight:750!important;
}

.mc-bg__search{
    position:relative;
    width:100%;
    min-height:54px;
    padding:6px 6px 6px 16px;
    border-radius:9px;
    background:#fff;
    box-shadow:0 8px 22px rgba(0,0,0,.18);
    display:grid;
    grid-template-columns:28px minmax(0,1fr) 132px;
    gap:10px;
    align-items:center;
}

.mc-bg__search-icon{
    width:24px;
    height:24px;
    color:var(--orange);
    display:flex;
}

.mc-bg__search-icon svg{
    width:100%;
    height:100%;
}

.mc-bg__search input{
    width:100%;
    height:40px;
    padding:0;
    border:0;
    outline:0;
    background:transparent;
    color:#282d33;
    font-size:14px;
}

.mc-bg__search button{
    height:42px;
    border:0;
    border-radius:7px;
    background:var(--orange);
    color:#fff;
    font-size:13px;
    font-weight:800;
    cursor:pointer;
}

.mc-bg__search button:hover{
    background:var(--orange-dark);
}

.mc-bg__autocomplete{
    position:absolute;
    z-index:40;
    top:calc(100% + 7px);
    left:0;
    right:0;
    padding:8px;
    border:1px solid var(--border);
    border-radius:9px;
    background:#fff;
    box-shadow:0 16px 35px rgba(0,0,0,.17);
}

.mc-bg__autocomplete[hidden]{
    display:none;
}

.mc-bg-auto__item{
    display:flex;
    gap:12px;
    padding:10px;
    border-radius:7px;
    color:var(--text);
    text-decoration:none;
}

.mc-bg-auto__item:hover{
    background:#fff4ea;
}

.mc-bg-auto__icon{
    color:var(--orange);
    font-weight:800;
}

.mc-bg-auto__item strong,
.mc-bg-auto__item span{
    display:block;
}

.mc-bg-auto__item span{
    margin-top:3px;
    color:var(--muted);
    font-size:11px;
}

.mc-bg-auto__all{
    display:block;
    padding:11px;
    border-top:1px solid #eee;
    color:var(--orange);
    font-size:12px;
    font-weight:800;
    text-align:center;
    text-decoration:none;
}

.mc-bg__hero-meta{
    min-height:50px;
    padding:10px 16px;
    border:1px solid rgba(255,255,255,.28);
    border-radius:9px;
    background:rgba(0,0,0,.10);
    color:#fff;
    display:flex;
    gap:7px;
    align-items:center;
    white-space:nowrap;
}

.mc-bg__hero-meta-icon{
    width:20px;
    height:20px;
    display:flex;
    color:#ffd2ac;
}

.mc-bg__hero-meta-icon svg{
    width:100%;
    height:100%;
}

.mc-bg__hero-meta strong{
    color:#fff;
    font-size:19px;
}

.mc-bg__hero-meta>span:last-child{
    font-size:12px;
    font-weight:700;
}

/* CONTEÚDO */
.mc-bg__content{
    padding:24px 0 60px;
    background:#fff;
}

.mc-bg__toolbar{
    margin-bottom:22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.mc-bg__chips{
    display:flex;
    gap:9px;
}

.mc-bg__chips a{
    min-height:38px;
    padding:9px 17px;
    border:1px solid #dde1e5;
    border-radius:999px;
    background:#fff;
    color:var(--text);
    display:flex;
    align-items:center;
    font-size:11px;
    font-weight:800;
    text-decoration:none;
}

.mc-bg__chips a.is-active{
    border-color:var(--orange);
    background:var(--orange);
    color:#111!important;
}

.mc-bg__chips a.is-active:hover{
    border-color:var(--orange-dark);
    background:var(--orange-dark);
    color:#111!important;
}

.mc-bg__sort{
    display:flex;
    gap:9px;
    align-items:center;
    font-size:11px;
}

.mc-bg__sort select,
.mc-bg-filter select{
    height:42px;
    padding:0 13px;
    border:1px solid #dfe3e7;
    border-radius:8px;
    background:#fff;
    color:var(--text);
}

.mc-bg__layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 330px;
    gap:32px;
    align-items:start;
}

.mc-bg__results-heading h2{
    margin:0 0 18px!important;
    color:var(--text)!important;
    font-size:27px!important;
    line-height:1.2!important;
}

.mc-bg__results{
    display:grid;
    gap:14px;
}

.mc-bg-card{
    position:relative;
    min-height:176px;
    padding:20px 22px;
    border:1px solid var(--border);
    border-radius:11px;
    background:#fff;
    box-shadow:0 5px 17px rgba(30,35,40,.045);
    display:grid;
    grid-template-columns:118px minmax(0,1fr) 138px;
    gap:22px;
    align-items:center;
}

.mc-bg-card__badge{
    position:absolute;
    top:0;
    left:0;
    padding:5px 9px;
    border-radius:10px 0 8px 0;
    background:var(--orange);
    color:#fff;
    font-size:9px;
    font-weight:800;
    text-transform:uppercase;
}

.mc-bg-card__logo{
    width:106px;
    height:106px;
    overflow:hidden;
    border:1px solid #eceff1;
    border-radius:50%;
    background:#fff;
    color:var(--orange);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:34px;
    font-weight:800;
    text-decoration:none;
}

.mc-bg-card__logo img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.mc-bg-card h3{
    margin:0 0 5px!important;
    font-size:21px!important;
    line-height:1.2!important;
}

.mc-bg-card h3 a{
    color:var(--text);
    text-decoration:none;
}

.mc-bg-card mark{
    padding:0 2px;
    background:#ffe47d;
    color:inherit;
}

.mc-bg-card__category{
    color:var(--orange);
    font-size:11px;
    line-height:1.45;
    font-weight:800;
}

.mc-bg-card p{
    margin:9px 0!important;
    color:#4e545a!important;
    font-size:12px!important;
    line-height:1.5!important;
}

.mc-bg-card__details{
    display:grid;
    gap:5px;
    color:#555c63;
    font-size:11px;
}

.mc-bg-card__button{
    min-height:43px;
    padding:11px 13px;
    border-radius:7px;
    background:var(--orange);
    color:#111!important;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-size:11px;
    font-weight:800;
    text-decoration:none!important;
    transition:background .16s ease,transform .16s ease;
}

.mc-bg-card__button:hover{
    background:var(--orange-dark);
    color:#111!important;
    transform:translateY(-1px);
}

.mc-bg-card__button span{
    color:#111;
}

.mc-bg-filter,
.mc-bg-help{
    padding:21px;
    border:1px solid var(--border);
    border-radius:11px;
    background:#fff;
    box-shadow:0 4px 15px rgba(30,35,40,.035);
}

.mc-bg-filter h3,
.mc-bg-help h3{
    margin:0 0 18px!important;
    font-size:17px!important;
}

.mc-bg-filter label{
    display:block;
    margin:15px 0 7px;
    font-size:11px;
    font-weight:800;
}

.mc-bg-filter select{
    width:100%;
}

.mc-bg-filter button{
    width:100%;
    height:44px;
    margin-top:18px;
    border:0;
    border-radius:7px;
    background:var(--orange);
    color:#fff;
    font-weight:800;
    cursor:pointer;
}

.mc-bg-filter>a{
    display:block;
    margin-top:12px;
    color:var(--orange);
    font-size:11px;
    font-weight:800;
    text-align:center;
    text-decoration:none;
}

.mc-bg-help{
    margin-top:16px;
}

.mc-bg-help p{
    color:var(--muted);
    font-size:12px;
    line-height:1.5;
}

.mc-bg-help a{
    color:var(--orange);
    font-size:12px;
    font-weight:800;
    text-decoration:none;
}

.mc-bg__empty{
    padding:40px;
    border:1px solid #f0d8c2;
    border-radius:11px;
    background:#fff6ed;
    text-align:center;
}

.mc-bg__empty strong{
    display:block;
    margin-bottom:7px;
    font-size:18px;
}

.mc-bg__pagination{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:8px;
    margin-top:28px;
}

.mc-bg__pagination a{
    min-width:38px;
    height:38px;
    border:1px solid #dfe2e5;
    border-radius:8px;
    background:#fff;
    color:var(--text);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:800;
    text-decoration:none;
}

.mc-bg__pagination a.is-current{
    border-color:var(--orange);
    background:var(--orange);
    color:#fff;
}

.mc-bg__filter-toggle{
    display:none;
}

/* TABLET */
@media(max-width:1024px){
    .mc-bg__wrap{
        width:calc(100% - 36px);
    }

    .mc-bg__hero{
        min-height:142px;
    }

    .mc-bg__hero-content{
        min-height:142px;
        padding:18px 0;
        grid-template-columns:minmax(0,1fr) auto;
        gap:14px 18px;
    }

    .mc-bg__hero h1{
        max-width:none;
        font-size:26px!important;
    }

    .mc-bg__search{
        grid-column:1;
        grid-row:2;
    }

    .mc-bg__hero-meta{
        grid-column:2;
        grid-row:2;
    }

    .mc-bg__layout{
        grid-template-columns:1fr;
        gap:18px;
    }

    .mc-bg__filter-toggle{
        width:100%;
        min-height:44px;
        margin-bottom:20px;
        padding:10px 15px;
        border:1px solid #dde1e5;
        border-radius:8px;
        background:#fff;
        color:var(--text);
        display:flex;
        align-items:center;
        justify-content:center;
        gap:8px;
        font-size:11px;
        font-weight:800;
        cursor:pointer;
    }

    .mc-bg__filter-toggle span{
        width:18px;
        height:18px;
        display:flex;
    }

    .mc-bg__filter-toggle svg{
        width:100%;
        height:100%;
    }

    .mc-bg__filter-toggle b{
        margin-left:auto;
    }

    .mc-bg__sidebar{
        display:none;
        margin-bottom:4px;
    }

    .mc-bg__sidebar.is-open{
        display:block;
    }

    .mc-bg-filter{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px 16px;
    }

    .mc-bg-filter h3,
    .mc-bg-filter button,
    .mc-bg-filter>a{
        grid-column:1/-1;
    }

    .mc-bg-filter label{
        margin-top:0;
    }

    .mc-bg-help{
        display:none;
    }

    .mc-bg-card{
        grid-template-columns:92px minmax(0,1fr) 126px;
    }

    .mc-bg-card__logo{
        width:82px;
        height:82px;
    }
}

/* SMARTPHONE */
@media(max-width:650px){
    .mc-bg__wrap{
        width:calc(100% - 24px);
    }

    .mc-bg__hero{
        min-height:154px;
    }

    .mc-bg__hero-content{
        min-height:154px;
        padding:14px 0 13px;
        display:flex;
        flex-direction:column;
        align-items:stretch;
        gap:10px;
    }

    .mc-bg__hero h1{
        max-width:none;
        overflow:hidden;
        font-size:16px!important;
        line-height:1.15!important;
        text-align:left;
        white-space:nowrap;
        text-overflow:ellipsis;
    }

    .mc-bg__search{
        min-height:46px;
        padding:5px 5px 5px 12px;
        grid-template-columns:22px minmax(0,1fr) 82px;
        gap:7px;
    }

    .mc-bg__search-icon{
        width:20px;
        height:20px;
    }

    .mc-bg__search input{
        height:34px;
        font-size:12px;
    }

    .mc-bg__search button{
        height:36px;
        font-size:11px;
    }

    .mc-bg__hero-meta{
        min-height:34px;
        padding:6px 10px;
        align-self:center;
        font-size:11px;
    }

    .mc-bg__hero-meta-icon{
        width:16px;
        height:16px;
    }

    .mc-bg__hero-meta strong{
        font-size:14px;
    }

    .mc-bg__hero-meta>span:last-child{
        font-size:10px;
    }

    .mc-bg__content{
        padding-top:18px;
    }

    .mc-bg__toolbar{
        margin-bottom:16px;
        align-items:flex-start;
        gap:12px;
    }

    .mc-bg__sort{
        display:none;
    }

    .mc-bg__chips a{
        min-height:34px;
        padding:8px 14px;
    }

    .mc-bg__filter-toggle{
        margin-bottom:16px;
    }

    .mc-bg__results-heading h2{
        margin-bottom:14px!important;
        font-size:17px!important;
    }

    .mc-bg-card{
        min-height:0;
        padding:16px;
        grid-template-columns:70px minmax(0,1fr);
        gap:13px;
        align-items:start;
    }

    .mc-bg-card__logo{
        width:64px;
        height:64px;
    }

    .mc-bg-card h3{
        font-size:16px!important;
    }

    .mc-bg-card p{
        font-size:11px!important;
    }

    .mc-bg-card__details{
        font-size:10px;
    }

    .mc-bg-card__button{
        grid-column:1/-1;
        width:100%;
        min-height:39px;
    }

    .mc-bg-filter{
        display:block;
    }

    .mc-bg-filter label{
        margin-top:14px;
    }
}

@media(prefers-reduced-motion:reduce){
    .mc-bg *{
        scroll-behavior:auto!important;
    }
}

/* =========================================================
   AJUSTES FINAIS — v1.2.1
   ========================================================= */

/* Desktop: rompe a limitação do conteúdo da página/tema e usa a viewport. */
@media(min-width:1025px){
    .mc-bg{
        position:relative;
        left:50%;
        width:100vw;
        max-width:100vw;
        margin-left:-50vw;
    }

    .mc-bg__wrap{
        width:calc(100% - 64px);
        max-width:1600px;
    }
}

.mc-bg__sort--random{
    min-height:38px;
    padding:9px 14px;
    border:1px solid #dde1e5;
    border-radius:8px;
    background:#fff;
    color:#555c63;
    font-size:11px;
    font-weight:750;
}

/* Smartphone: mantém campo e botão na mesma linha; apenas dá largura suficiente ao texto. */
@media(max-width:650px){
    .mc-bg__search{
        grid-template-columns:22px minmax(0,1fr) 96px;
    }

    .mc-bg__search button{
        min-width:96px;
        padding:0 10px;
        white-space:nowrap;
        word-break:normal;
        overflow-wrap:normal;
        line-height:1;
    }
}

/* =========================================================
   REFINAMENTOS — v1.2.2
   ========================================================= */

/* Remove o título nativo "Buscar" e o espaço superior criado pelo tema. */
body.mc-bg-page .entry-header,
body.mc-bg-page .page-header,
body.mc-bg-page h1.entry-title,
body.mc-bg-page .entry-title{
    display:none!important;
}

body.mc-bg-page .site-content,
body.mc-bg-page .site-content>.ast-container,
body.mc-bg-page .content-area,
body.mc-bg-page #primary,
body.mc-bg-page .site-main,
body.mc-bg-page article.page,
body.mc-bg-page article.type-page,
body.mc-bg-page .entry-content{
    margin-top:0!important;
    padding-top:0!important;
}

body.mc-bg-page .site-content>.ast-container,
body.mc-bg-page #primary,
body.mc-bg-page .content-area,
body.mc-bg-page .site-main,
body.mc-bg-page article.page,
body.mc-bg-page article.type-page,
body.mc-bg-page .entry-content{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
}

/* No celular, elimina somente o texto curto para compactar os resultados. */
@media(max-width:650px){
    .mc-bg-card p{
        display:none!important;
    }
}



/* BARRA COMPACTA — shortcode [mc_busca] */
.mc-bg-compact,
.mc-bg-compact *{
    box-sizing:border-box;
}

.mc-bg-compact{
    --mc-bg-orange:#F58220;
    --mc-bg-orange-dark:#d9660b;
    width:100%;
    max-width:1180px;
    min-height:56px;
    margin:0 auto;
    padding:5px;
    display:flex;
    align-items:center;
    gap:8px;
    background:#fff;
    border:1px solid #e3e6e9;
    border-radius:14px;
    box-shadow:0 8px 24px rgba(17,20,24,.08);
    font-family:Inter,Arial,Helvetica,sans-serif;
}

.mc-bg-compact__icon{
    flex:0 0 42px;
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    color:var(--mc-bg-orange);
    font-size:27px;
    line-height:1;
}

.mc-bg-compact input[type="search"]{
    flex:1 1 auto;
    min-width:0;
    height:44px;
    padding:0 8px;
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
    background:transparent!important;
    color:#171a1f;
    font-size:16px;
}

.mc-bg-compact input[type="search"]::placeholder{
    color:#777d84;
    opacity:1;
}

.mc-bg-compact button{
    flex:0 0 auto;
    min-height:44px;
    padding:0 24px;
    border:0;
    border-radius:10px;
    background:var(--mc-bg-orange);
    color:#fff;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    transition:background .18s ease,transform .18s ease;
}

.mc-bg-compact button:hover{
    background:var(--mc-bg-orange-dark);
}

.mc-bg-compact button:active{
    transform:translateY(1px);
}

@media (max-width:767px){
    .mc-bg-compact{
        min-height:52px;
        padding:4px;
        gap:4px;
        border-radius:12px;
    }
    .mc-bg-compact__icon{
        flex-basis:34px;
        width:34px;
        height:40px;
        font-size:23px;
    }
    .mc-bg-compact input[type="search"]{
        height:42px;
        font-size:15px;
        padding:0 4px;
    }
    .mc-bg-compact button{
        min-height:42px;
        padding:0 14px;
        font-size:14px;
    }
}
