
/* CASA DA GS — PRODUÇÃO 1.0
   Resultados, Loja, Peças & Reparos e Produto
-------------------------------------------------------------- */

body.cgs-production-page{
    background:#f5f8fb;
    color:#173957;
}
body.cgs-production-page:not(.elementor-editor-active) #masthead,
body.cgs-production-page:not(.elementor-editor-active) .site-header,
body.cgs-production-page:not(.elementor-editor-active) header.ast-primary-header{
    display:none!important;
}

.cgs-internal-hero{
    position:relative;
    padding:62px 0 58px;
    overflow:hidden;
    background:
      radial-gradient(circle at 82% 15%,rgba(72,145,220,.22),transparent 28%),
      linear-gradient(125deg,#0b2948,#123f78 62%,#1e61aa);
}
.cgs-internal-hero:after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:linear-gradient(115deg,transparent 58%,rgba(255,255,255,.045) 58% 59%,transparent 59%);
}
.cgs-internal-hero .cgshc3-wrap{position:relative;z-index:2}
.cgs-internal-hero span{
    display:block;
    margin-bottom:10px;
    color:#a9cce9;
    font-size:10px;
    font-weight:900;
    letter-spacing:.14em;
}
.cgs-internal-hero h1{
    max-width:850px;
    margin:0;
    color:#fff;
    font-size:clamp(38px,4.3vw,58px);
    line-height:1.03;
    letter-spacing:-.035em;
}
.cgs-internal-hero p{
    max-width:720px;
    margin:14px 0 0;
    color:#d2e2ef;
    font-size:16px;
    line-height:1.7;
}

/* Base de conteúdo interno */
body.cgs-production-page #content,
body.cgs-production-page .site-content{
    background:#f5f8fb;
}
body.cgs-production-page .site-content > .ast-container,
body.cgs-production-page #content > .ast-container{
    width:min(1180px,calc(100% - 40px));
    max-width:1180px;
    padding:58px 0 86px!important;
}
body.cgs-production-page .content-area{
    width:100%!important;
    max-width:none!important;
}
body.cgs-production-page .widget-area,
body.cgs-production-page #secondary{
    display:none!important;
}
body.cgs-production-page .site-main{
    width:100%!important;
}
body.cgs-production-page .entry-header:not(.cgs-keep-entry-header),
body.cgs-production-page .page-title.ast-archive-title{
    display:none;
}

/* RESULTADOS DE BUSCA */
body.cgs-search-page .ast-row{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
}
body.cgs-search-page .ast-row article{
    margin:0!important;
    padding:0!important;
    overflow:hidden;
    border:1px solid #dce7ef;
    border-radius:20px;
    background:#fff;
    box-shadow:0 12px 34px rgba(13,50,83,.06);
}
body.cgs-search-page .ast-row article .post-thumb img,
body.cgs-search-page .ast-row article .wp-post-image{
    width:100%;
    height:220px;
    object-fit:cover;
}
body.cgs-search-page .ast-row article .entry-header,
body.cgs-search-page .ast-row article .entry-content,
body.cgs-search-page .ast-row article .entry-summary,
body.cgs-search-page .ast-row article .entry-meta{
    display:block!important;
    padding-left:20px;
    padding-right:20px;
}
body.cgs-search-page .ast-row article .entry-header{padding-top:20px}
body.cgs-search-page .ast-row article .entry-title{
    margin:0 0 8px;
    font-size:20px;
    line-height:1.18;
}
body.cgs-search-page .ast-row article .entry-title a{
    color:#123f78!important;
    text-decoration:none!important;
}
body.cgs-search-page .ast-row article .entry-meta{
    color:#8290a0;
    font-size:10px;
}
body.cgs-search-page .ast-row article .entry-content,
body.cgs-search-page .ast-row article .entry-summary{
    padding-bottom:20px;
    color:#65788b;
    font-size:13px;
    line-height:1.65;
}
body.cgs-search-page .ast-pagination{
    margin-top:32px;
}
body.cgs-search-page .ast-pagination .page-numbers{
    border-radius:10px!important;
}

/* WooCommerce — toolbar */
body.cgs-shop-page .woocommerce .woocommerce-result-count{
    color:#718196;
    font-size:12px;
}
body.cgs-shop-page .woocommerce .woocommerce-ordering select{
    min-height:42px;
    padding:0 38px 0 13px;
    border:1px solid #d6e2eb;
    border-radius:11px;
    background:#fff;
    color:#52687d;
}
body.cgs-shop-page .woocommerce-notices-wrapper{
    margin-bottom:18px;
}

/* Loja / categorias */
body.cgs-shop-page ul.products{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:18px!important;
    margin-top:28px!important;
}
body.cgs-shop-page ul.products:before,
body.cgs-shop-page ul.products:after{display:none!important}
body.cgs-shop-page ul.products li.product{
    width:auto!important;
    margin:0!important;
    padding:0 0 18px!important;
    overflow:hidden;
    border:1px solid #dce7ef;
    border-radius:20px;
    background:#fff;
    box-shadow:0 12px 32px rgba(14,51,84,.055);
    transition:.2s ease;
}
body.cgs-shop-page ul.products li.product:hover{
    transform:translateY(-4px);
    box-shadow:0 22px 48px rgba(14,51,84,.11);
}
body.cgs-shop-page ul.products li.product a img{
    width:100%!important;
    height:230px!important;
    margin:0 0 17px!important;
    object-fit:contain!important;
    padding:18px;
    background:#fff;
    border-bottom:1px solid #edf2f6;
}
body.cgs-shop-page ul.products li.product .woocommerce-loop-product__title{
    min-height:50px;
    padding:0 18px!important;
    color:#153b61;
    font-size:15px!important;
    line-height:1.35;
}
body.cgs-shop-page ul.products li.product .price{
    padding:0 18px;
    color:#123f78!important;
    font-size:15px!important;
    font-weight:850!important;
}
body.cgs-shop-page ul.products li.product .button{
    margin:12px 18px 0!important;
    min-height:42px;
    padding:0 15px!important;
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    border-radius:11px!important;
    background:#123f78!important;
    color:#fff!important;
    font-size:11px!important;
    font-weight:900!important;
}

/* Produto */
body.cgs-product-page .site-content > .ast-container,
body.cgs-product-page #content > .ast-container{
    padding-top:48px!important;
}
body.cgs-product-page div.product{
    display:grid;
    grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);
    gap:52px;
    padding:30px;
    border:1px solid #dde7ef;
    border-radius:26px;
    background:#fff;
    box-shadow:0 18px 50px rgba(12,46,78,.07);
}
body.cgs-product-page div.product .woocommerce-product-gallery,
body.cgs-product-page div.product .summary{
    width:auto!important;
    float:none!important;
    margin:0!important;
}
body.cgs-product-page div.product .woocommerce-product-gallery__wrapper{
    overflow:hidden;
    border-radius:20px;
    background:#f7fafc;
    border:1px solid #e5edf3;
}
body.cgs-product-page div.product .woocommerce-product-gallery__image img{
    width:100%;
    max-height:520px;
    object-fit:contain;
    padding:18px;
}
body.cgs-product-page div.product .product_title{
    margin:0 0 12px!important;
    color:#123f78;
    font-size:clamp(32px,3.2vw,46px);
    line-height:1.06;
    letter-spacing:-.03em;
}
body.cgs-product-page div.product .price{
    color:#1b5da5!important;
    font-size:24px!important;
    font-weight:900;
}
body.cgs-product-page div.product .woocommerce-product-details__short-description{
    margin:18px 0;
    color:#63778b;
    line-height:1.72;
}
body.cgs-product-page div.product form.cart{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
    margin-top:22px!important;
}
body.cgs-product-page div.product form.cart .quantity input{
    min-height:48px;
    border:1px solid #d4e1ea;
    border-radius:10px;
}
body.cgs-product-page div.product .single_add_to_cart_button,
body.cgs-product-page div.product .button{
    min-height:48px;
    padding:0 20px!important;
    border-radius:11px!important;
    background:#123f78!important;
    color:#fff!important;
    font-weight:900!important;
}
body.cgs-product-page .product_meta{
    padding-top:18px;
    border-top:1px solid #e7edf3;
    color:#788899;
    font-size:11px;
}
body.cgs-product-page .woocommerce-tabs,
body.cgs-product-page .related.products,
body.cgs-product-page .up-sells{
    grid-column:1/-1;
    margin-top:28px;
}
body.cgs-product-page .woocommerce-tabs{
    padding-top:10px;
}
body.cgs-product-page .woocommerce-tabs ul.tabs{
    margin:0 0 20px!important;
    padding:0!important;
    border-bottom:1px solid #dfe8ef;
}
body.cgs-product-page .woocommerce-tabs ul.tabs:before{display:none!important}
body.cgs-product-page .woocommerce-tabs ul.tabs li{
    margin:0 8px 0 0!important;
    border:0!important;
    border-radius:10px 10px 0 0!important;
    background:#eef4f9!important;
}
body.cgs-product-page .woocommerce-tabs ul.tabs li a{
    color:#52697e!important;
}
body.cgs-product-page .woocommerce-tabs ul.tabs li.active{
    background:#123f78!important;
}
body.cgs-product-page .woocommerce-tabs ul.tabs li.active a{
    color:#fff!important;
}
body.cgs-product-page .woocommerce-Tabs-panel{
    color:#607487;
    line-height:1.72;
}
body.cgs-product-page .related.products > h2,
body.cgs-product-page .up-sells > h2{
    color:#123f78;
    font-size:27px;
}

/* Peças e Reparos: preserva o conteúdo existente, mas integra ao novo design */
body.cgs-parts-page .entry-content{
    color:#526b80;
    line-height:1.7;
}
body.cgs-parts-page .entry-content h1,
body.cgs-parts-page .entry-content h2,
body.cgs-parts-page .entry-content h3{
    color:#123f78;
    letter-spacing:-.02em;
}
body.cgs-parts-page .entry-content img{
    border-radius:18px;
}
body.cgs-parts-page .entry-content .wp-block-button__link,
body.cgs-parts-page .entry-content .elementor-button{
    border-radius:11px!important;
    background:#123f78!important;
    color:#fff!important;
    font-weight:850!important;
}

/* Mensagens / breadcrumbs */
body.cgs-production-page .woocommerce-breadcrumb{
    margin-bottom:22px!important;
    color:#8493a2;
    font-size:11px;
}
body.cgs-production-page .woocommerce-breadcrumb a{
    color:#1d61aa!important;
}
body.cgs-production-page .woocommerce-message,
body.cgs-production-page .woocommerce-info,
body.cgs-production-page .woocommerce-error{
    border-radius:14px;
    background:#fff;
    border:1px solid #dbe7f0;
    box-shadow:none;
}

/* Paginação */
body.cgs-production-page nav.woocommerce-pagination ul{
    border:0!important;
}
body.cgs-production-page nav.woocommerce-pagination ul li{
    border:0!important;
    margin:0 3px!important;
}
body.cgs-production-page nav.woocommerce-pagination ul li a,
body.cgs-production-page nav.woocommerce-pagination ul li span{
    min-width:38px;
    min-height:38px;
    display:grid!important;
    place-items:center;
    border-radius:9px;
    background:#fff;
    color:#123f78!important;
}
body.cgs-production-page nav.woocommerce-pagination ul li span.current{
    background:#123f78;
    color:#fff!important;
}

@media(max-width:1024px){
    body.cgs-shop-page ul.products{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
    }
    body.cgs-search-page .ast-row{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(max-width:800px){
    body.cgs-product-page div.product{
        grid-template-columns:1fr;
        gap:30px;
        padding:20px;
    }
    body.cgs-shop-page ul.products{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}
@media(max-width:650px){
    .cgs-internal-hero{padding:44px 0}
    .cgs-internal-hero h1{font-size:36px}
    body.cgs-production-page .site-content > .ast-container,
    body.cgs-production-page #content > .ast-container{
        width:calc(100% - 20px);
        padding:38px 0 60px!important;
    }
    body.cgs-search-page .ast-row,
    body.cgs-shop-page ul.products{
        grid-template-columns:1fr!important;
    }
    body.cgs-shop-page ul.products li.product a img{
        height:260px!important;
    }
}


/* ==========================================================
   V1.0.1 HOTFIX — BUSCA / HEADER DUPLICADO
   ========================================================== */

/* O header oficial é injetado pelo plugin.
   Oculta cabeçalhos do Astra e também Theme Builder/Elementor. */
body.cgs-production-page:not(.elementor-editor-active) #masthead,
body.cgs-production-page:not(.elementor-editor-active) .site-header,
body.cgs-production-page:not(.elementor-editor-active) header.ast-primary-header,
body.cgs-production-page:not(.elementor-editor-active) .elementor-location-header,
body.cgs-production-page:not(.elementor-editor-active) header[data-elementor-type="header"],
body.cgs-production-page:not(.elementor-editor-active) [data-elementor-type="header"].elementor{
    display:none!important;
}

/* Astra aplica largura percentual aos artigos de busca.
   Como agora usamos CSS Grid, cada resultado deve ocupar 100% da coluna. */
body.cgs-search-page .ast-row{
    width:100%!important;
    max-width:none!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:20px!important;
    align-items:stretch!important;
}

body.cgs-search-page .ast-row > article,
body.cgs-search-page .ast-row > .ast-article-post,
body.cgs-search-page article.ast-article-post{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    float:none!important;
    flex:none!important;
    margin:0!important;
    display:block!important;
}

/* Corrige wrappers internos que herdavam larguras estreitas do tema. */
body.cgs-search-page .ast-row article .ast-post-format-,
body.cgs-search-page .ast-row article .entry-content,
body.cgs-search-page .ast-row article .entry-summary,
body.cgs-search-page .ast-row article .entry-header,
body.cgs-search-page .ast-row article .post-thumb,
body.cgs-search-page .ast-row article .entry-meta{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    box-sizing:border-box!important;
}

/* Evita quebra de palavras letra por letra. */
body.cgs-search-page .ast-row article,
body.cgs-search-page .ast-row article *{
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
}

body.cgs-search-page .ast-row article .entry-title,
body.cgs-search-page .ast-row article .entry-title a{
    word-break:normal!important;
    overflow-wrap:break-word!important;
}

body.cgs-search-page .ast-row article .entry-content,
body.cgs-search-page .ast-row article .entry-summary{
    white-space:normal!important;
}

/* Card mais consistente quando o resultado não possui imagem. */
body.cgs-search-page .ast-row article{
    min-height:100%;
}
body.cgs-search-page .ast-row article:not(:has(.post-thumb)) .entry-header{
    padding-top:24px!important;
}

/* Breadcrumb / cabeçalho do resultado */
body.cgs-search-page .ast-breadcrumbs-wrapper,
body.cgs-search-page .ast-breadcrumbs{
    margin:0 0 24px!important;
}

/* O título antigo da busca não precisa aparecer abaixo do hero oficial. */
body.cgs-search-page .page-header,
body.cgs-search-page .ast-archive-description{
    display:none!important;
}

@media(max-width:1024px){
    body.cgs-search-page .ast-row{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}
@media(max-width:650px){
    body.cgs-search-page .ast-row{
        grid-template-columns:1fr!important;
    }
}


