/**
 * Página de resultados de busca – layout padrão ProAnalise.
 * Container 1140px, 1 coluna, espaço do header, form e grid de produtos.
 */

/* Container e área principal */
body.catalogsearch-result-index .page-main,
body.catalogsearch-result-index main#maincontent,
body.catalogsearch-result-page .page-main,
body.catalogsearch-result-page main#maincontent {
    max-width: 1140px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
}

body.catalogsearch-result-index .columns,
body.catalogsearch-result-page .columns {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.catalogsearch-result-index .column.main,
body.catalogsearch-result-index.page-layout-1column .column.main,
body.catalogsearch-result-page .column.main,
body.catalogsearch-result-page.page-layout-1column .column.main {
    display: block !important;
    width: 100% !important;
    max-width: 1140px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
}

body.catalogsearch-result-index .page-main .content,
body.catalogsearch-result-index .column.main .content,
body.catalogsearch-result-page .page-main .content,
body.catalogsearch-result-page .column.main .content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Wrapper da busca (form + resultados) */
body.catalogsearch-result-index .catalogsearch-result-container,
body.catalogsearch-result-page .catalogsearch-result-container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Container da barra de busca (max-width 1140px, centralizado, espaço do topo) */
body.catalogsearch-result-index .catalogsearch-form-container,
body.catalogsearch-result-page .catalogsearch-form-container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 3rem;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 0;
    box-sizing: border-box;
}

/* Formulário de busca (categoria + termo + botão) */
body.catalogsearch-result-index .search-form-with-category,
body.catalogsearch-result-page .search-form-with-category {
    margin-bottom: 2rem;
}

body.catalogsearch-result-index .search-form-with-category .card,
body.catalogsearch-result-page .search-form-with-category .card {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

body.catalogsearch-result-index .search-form-with-category .catalogsearch-form-category .form-select,
body.catalogsearch-result-index .search-form-with-category .catalogsearch-form-category .form-control,
body.catalogsearch-result-page .search-form-with-category .catalogsearch-form-category .form-select,
body.catalogsearch-result-page .search-form-with-category .catalogsearch-form-category .form-control {
    min-height: 42px;
}

body.catalogsearch-result-index .search-form-with-category .catalogsearch-form-category .btn,
body.catalogsearch-result-page .search-form-with-category .catalogsearch-form-category .btn {
    min-height: 42px;
}

@media (min-width: 768px) {
    body.catalogsearch-result-index .search-form-with-category .catalogsearch-form-category .row,
    body.catalogsearch-result-page .search-form-with-category .catalogsearch-form-category .row {
        flex-wrap: nowrap;
    }
    body.catalogsearch-result-index .search-form-with-category .catalogsearch-form-category .form-select,
    body.catalogsearch-result-page .search-form-with-category .catalogsearch-form-category .form-select {
        min-width: 200px;
    }
}

/* Área de resultados */
body.catalogsearch-result-index .search.results,
body.catalogsearch-result-page .search.results {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Grid de produtos (igual categoria) */
body.catalogsearch-result-index .product-items,
body.catalogsearch-result-page .product-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

body.catalogsearch-result-index .product-item,
body.catalogsearch-result-page .product-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.catalogsearch-result-index .product-item:hover,
body.catalogsearch-result-page .product-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.catalogsearch-result-index .product-item-photo img,
body.catalogsearch-result-page .product-item-photo img {
    max-height: 220px;
    object-fit: contain;
}

body.catalogsearch-result-index .toolbar,
body.catalogsearch-result-page .toolbar {
    margin-bottom: 1rem;
}

/* Mensagem "nenhum resultado" */
body.catalogsearch-result-index .message.notice,
body.catalogsearch-result-page .message.notice {
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    body.catalogsearch-result-index .page-main,
    body.catalogsearch-result-index main#maincontent,
    body.catalogsearch-result-page .page-main,
    body.catalogsearch-result-page main#maincontent {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 2rem !important;
    }
}
