/* Busca v4 - Estilos Principais */

/* Reset e variáveis */
:root {
    --primary-color: rgb(110, 170, 36);
    --success-color: #28a745;
    --chip-bg: #6ea924;
    --chip-hover: #5a8a1c;
    --border-color: #dee2e6;
    --bg-light: #f8f9fa;
    --text-muted: #6c757d;
    --text-dark: #212529;
    --sidebar-width: 300px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #212529;
    background-color: #f8f9fa;
}

/* Layout principal */
.container-fluid {
    padding: 0;
    margin: 0;
}

.row {
    margin: 0;
}

.col-md-3, .col-md-9 {
    padding: 0;
}

/* Sidebar de filtros */
.filters-sidebar {
    /*background: #fff;*/
    /*border-right: 1px solid var(--border-color);*/
    padding: 12px;
    /*height: 100vh;*/
    /*overflow-y: auto;*/
    position: sticky;
    top: 0;
}

@media (min-width: 768px) {
    .fito-busca-layout {
        align-items: flex-start;
    }

    .fito-busca-layout > .col-md-3,
    .fito-busca-layout > .col-md-9 {
        align-self: flex-start;
    }

    .fito-busca-layout .filters-sidebar {
        top: 1rem;
    }
}

/* Secao de busca */
.search-section {
    margin-bottom: 10px;
    /*background: white;*/
    padding: 8px 4px;
    border-bottom: 1px solid #e0e0e0;
}

    .search-section .input-group {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
       /* border-radius: 6px;*/
        overflow: visible;
        flex-wrap: nowrap;
        position: relative;
        z-index: 20;
    }

    .search-section .twitter-typeahead {
        display: block !important;
        flex: 1 1 auto;
        width: 1% !important;
        min-width: 0;
    }

    .search-section .form-control {
        border: 1px solid var(--border-color);
        padding: 0 12px;
        font-size: 14px;
        border-right: none;
        height: 40px !important;
        width: 100%;
    }

    .search-section .tt-menu {
        z-index: 1050 !important;
        width: 100%;
        margin-top: 0;
        background: #fff;
        border: 1px solid #d1d1d1;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    }

    .search-section .tt-suggestion {
        padding: 8px 12px;
        color: #111;
        cursor: pointer;
    }

    .search-section .tt-suggestion:hover,
    .search-section .tt-cursor {
        background: #ebf9da;
    }

        .search-section .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: none;
           /* border-radius: 10px;*/
        }

    .search-section .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        padding: 0 12px;
        border: 1px solid var(--primary-color);
        background: var(--primary-color);
        color: white;
    }

        .search-section .btn:hover {
            background: #0056b3;
            border-color: #0056b3;
        }

/* Chips section */
.chips-section {
    margin-bottom: 20px;
    min-height: 40px;
    padding: 8px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-direction: column;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--chip-bg);
    color: white;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: all 0.2s ease;
    margin: 2px 1px 1px 2px;
}

    .chip:hover {
        background: var(--chip-hover);
        transform: translateY(-1px);
    }

    .chip .remove-chip {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        padding: 0;
        margin-left: 4px;
        font-size: 14px;
        line-height: 1;
        opacity: 0.7;
        transition: all 0.2s ease;
        width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

        .chip .remove-chip:hover {
            opacity: 1;
            background: rgba(255,255,255,0.2);
            transform: scale(1.1);
        }

/*chip .remove-chip::before {
            content: '×';
            font-weight: bold;
        }*/

.clear-filters {
    color: #dc3545;
    text-decoration: none;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    background: white;
    border: 1px solid #dc3545;
    font-weight: 500;
    display: inline-block;
}

    .clear-filters:hover {
        color: white;
        background: #dc3545;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
    }

/* Blocos de filtro */
.filter-block {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

    .filter-block:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }

.filter-block-header {
    background: var(--bg-light);
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
}

    .filter-block-header:hover {
        background: #e9ecef;
    }

    .filter-block-header h5 {
        margin: 0;
        font-size: 14px;
        font-weight: 600;
        color: #495057;
        display: flex;
        align-items: center;
        gap: 6px;
    }

.block-count {
    background: #e9ecef;
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.filter-block-header i {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.2s;
}

.filter-block-header.collapsed i {
    transform: rotate(180deg);
}

.filter-block-content {
    padding: 10px;
    transition: all 0.3s ease;
}

    .filter-block-content.collapsed {
        display: none;
    }

/* Busca dentro do filtro */
.search-filter {
    margin-bottom: 8px 8px 8px 4px;
}

    .search-filter .form-control {
        font-size: 13px;
        padding: 6px 8px;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        height: 30px !important;
    }

        .search-filter .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
        }

/* Lista de filtros */
.filter-list {
    max-height: 200px;
    overflow-y: auto;
}

.filtro-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s;
    border-radius: 4px;
    margin: 1px 0;
}

    .filtro-item:last-child {
        border-bottom: none;
    }

    .filtro-item:hover {
        background: var(--bg-light);
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .filtro-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin: 0;
        cursor: pointer;
    }

    .filtro-item label {
        margin: 0;
        cursor: pointer;
        flex: 1;
        font-size: 13px;
        line-height: 1.4;
    }

    .filtro-item a {
        color: #495057;
        text-decoration: none;
        display: block;
    }

        .filtro-item a:hover {
            color: var(--primary-color);
            text-decoration: none;
        }

    .filtro-item.hidden {
        display: none;
    }

/* Ver mais */
.ver-mais-container {
    margin-top: 5px;
    padding-top: 0px;
    border-top: 1px solid #f1f3f4;
    padding-left: 10px;
}

.ver-mais-bloco {
    display: block;
    width: 100%;
    padding: 4px 5px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

    .ver-mais-bloco:hover {
        background: #e9ecef;
        color: var(--primary-color);
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .ver-mais-bloco.expandido {
        background: #dc3545;
        color: white;
        border-color: #dc3545;
    }

        .ver-mais-bloco.expandido:hover {
            background: #c82333;
            color: white;
        }

/* Link "Ver mais" */
.ver-mais {
    color: var(--chip-bg);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 0;
    display: block;
    text-align: center;
    border-top: 1px solid #f1f3f4;
    margin-top: 6px;
    transition: all 0.2s ease;
}

    .ver-mais:hover {
        color: var(--chip-hover);
        background: #f8f9fa;
        text-decoration: none;
    }

/* Botao limpar todos */
.btn-limpar {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

    .btn-limpar:hover {
        background: #5a6268;
        border-color: #5a6268;
        color: white;
        text-decoration: none;
        transform: translateY(-1px);
    }



/* Itens adicionais */
.item-adicional {
    animation: slideIn 0.3s ease-out;
}

/* Mobile search bar */
.mobile-search-bar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

    .mobile-search-bar .form-control {
        font-size: 14px;
        padding: 10px 12px;
    }

    .mobile-search-bar .btn {
        padding: 10px 12px;
    }

.fito-mobile-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fito-mobile-filter-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fito-mobile-filter-button.has-active-filters {
    padding: 6px 16px;
    color: #fff;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 999px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
}

.fito-mobile-filter-button.has-active-filters:hover,
.fito-mobile-filter-button.has-active-filters:focus {
    color: #fff;
    background: var(--chip-hover);
    border-color: var(--chip-hover);
}

.fito-mobile-results-count {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    color: #222;
    font-size: 18px;
    line-height: 1;
    white-space: nowrap;
}

/* area de resultados */
.results-area {
    padding: 20px;
    background: white;
    min-height: 100vh;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.results-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

.results-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* Cards de resultado */
.result-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .result-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        transform: translateY(-1px);
    }

.card-content {
    display: flex;
    gap: 16px;
}

.card-image {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.card-info {
    flex: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    color: #212529;
}

.card-meta {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.card-description {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

.agrolinkfito-products-preview-card {
    background: #fff;
    border-color: #cfe5c1 !important;
    box-shadow: none;
    border-radius: 8px;
    overflow: hidden;
}

.agrolinkfito-products-preview-card .card-body {
    padding: 0;
}

.agrolinkfito-products-preview-ad-card .card-body {
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    padding: 16px;
}

.agrolinkfito-products-preview-ad-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
}

.agrolinkfito-products-preview-ad-content > * {
    margin-right: auto;
    margin-left: auto;
}

.agrolinkfito-products-preview-card .card-body > a {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    color: #111;
}

.agrolinkfito-products-preview-title {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 9px 18px;
    background: linear-gradient(0deg, #ffffff 0%, #ffffff 54%, rgb(213 228 193) 100%);
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    border-bottom: 1px solid rgba(110, 170, 36, 0.24);
}

.agrolinkfito-products-preview-card .card-title {
    display: -webkit-box;
    overflow: hidden;
    width: 100%;
    color: #000 !important;
    font-family: "Inter-Bold", arial;
    font-size: 1.15rem;
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.agrolinkfito-products-preview-title-sm {
    font-size: 1rem !important;
}

.agrolinkfito-products-preview-class {
    display: block;
    width: 100%;
    padding: 7px 18px;
    color: #426a13;
    background: #fff;
    border-top: 0;
    border-bottom: 0;
    font-family: "Inter-Bold", arial;
    font-size: 0.72rem;
    line-height: 1.25;
    text-align: center;
}

.agrolinkfito-products-preview-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px 0;
    background: linear-gradient(180deg, #fff 0%, #fbfdf8 100%);
}

.agrolinkfito-products-preview-card p {
    line-height: 1.35;
}

.agrolinkfito-products-preview-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    padding-bottom: 0;
}

.agrolinkfito-products-preview-info-cultures {
    padding-top: 12px;
    border-top: 1px solid rgba(110, 170, 36, 0.12);
}

.agrolinkfito-products-preview-info small {
    font-size: 0.86rem;
}

.agrolinkfito-products-preview-info > small:first-child {
    color: #7b8970 !important;
    font-family: "Inter-Medium", arial;
    font-size: 0.64rem;
    line-height: 1;
    text-transform: uppercase;
}

.agrolinkfito-products-preview-info > small:last-child {
    color: #24311f;
    font-family: "Inter-Bold", arial;
    font-size: 0.9rem;
    line-height: 1.35;
}

.agrolinkfito-products-preview-card .badge {
    border-radius: 8px;
}

.agrolinkfito-products-preview-footer {
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
    margin-top: 2px;
    margin-right: -18px;
    margin-left: -18px;
    padding: 0 18px;
    background: #f5faef;
    border-top: 1px solid rgba(110, 170, 36, 0.18);
}

.agrolinkfito-products-preview-more {
    display: inline-flex;
    align-items: center;
    color: #6EAA24;
    font-family: "Inter-Medium", arial;
    font-size: 0.82rem;
    line-height: 1;
}

.agrolinkfito-products-preview-more .arrow {
    margin-left: 8px;
    fill: currentColor;
    opacity: 0.72;
}

.agrolinkfito-products-preview-culture {
    padding: 3px 9px;
    color: #405235 !important;
    background: #f8fbf5 !important;
    border-color: rgba(110, 170, 36, 0.28) !important;
    border-radius: 8px !important;
    white-space: break-spaces;
}

.fito-view-mode-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    margin: 0 0 10px;
}

.fito-results-view {
    width: 100%;
}

.fito-results-empty-state {
    padding: 28px 20px;
    margin: 0 0 20px;
    text-align: center;
    background: #fff;
    border: 1px solid #dfe7dc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.fito-results-empty-state h3 {
    margin-bottom: 8px;
    color: #21552e;
    font-size: 22px;
    font-weight: 800;
}

.fito-results-empty-state p {
    margin-bottom: 6px;
    color: #333;
    font-size: 15px;
}

.fito-results-empty-state .fito-results-empty-hint {
    color: #6c757d;
    font-size: 14px;
}

.fito-results-cards-row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 0;
    margin-right: calc(-0.5 * var(--bs-gutter-x));
    margin-left: calc(-0.5 * var(--bs-gutter-x));
}

.fito-results-cards-row .col-blocks {
    margin-bottom: 1rem;
}

.fito-results-banner-block {
    margin-bottom: 1rem;
    text-align: center;
}

.fito-results-banner-placeholder,
.fito-results-banner-host {
    text-align: center;
}

.fito-results-banner-row td {
    padding: 16px 14px;
    background: #fff;
}

.fito-results-table tbody tr.fito-results-banner-row:hover {
    background: #fff;
}

@media (min-width: 768px) {
    .fito-results-banner-desktop-hidden {
        display: none !important;
    }
}

.fito-view-mode-label {
    color: #495057;
    font-size: 13px;
    font-weight: 600;
}

.fito-view-mode-actions {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #cfd8c5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.fito-view-mode-btn {
    border: 0;
    border-right: 1px solid #cfd8c5;
    background: #fff;
    color: #33521f;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 10px 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fito-view-mode-btn:last-child {
    border-right: 0;
}

.fito-view-mode-btn:hover,
.fito-view-mode-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.fito-view-mode-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.fito-results-view-table {
    display: none;
}

html[data-fito-view-mode="table"] .fito-results-view-cards {
    display: none !important;
}

html[data-fito-view-mode="table"] .fito-results-view-table {
    display: block !important;
}

html[data-fito-view-mode="cards"] .fito-results-view-table {
    display: none !important;
}

.fito-results-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #dfe7dc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.fito-results-table {
    width: 100%;
    min-width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    color: #111;
    font-size: 14px;
}

.fito-results-table th,
.fito-results-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #e4e7e2;
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.fito-results-table th {
    background: #f8faf7;
    color: #111;
    font-weight: 800;
    white-space: nowrap;
}

.fito-results-table tbody tr:last-child td {
    border-bottom: 0;
}

.fito-results-table tbody tr:hover {
    background: #fbfdf9;
}

.fito-results-table-title a {
    color: #111;
    font-weight: 700;
    text-decoration: none;
}

.fito-results-table-title a:hover {
    color: var(--primary-color);
}

.fito-results-class-badge,
.fito-results-culture-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 5px 8px;
    white-space: normal;
}

.fito-results-class-badge {
    color: #fff;
}

.fito-results-culture-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.fito-results-culture-badge {
    background: #dff3d9;
    color: #183d13;
}

.fito-results-action-link {
    color: #12320f;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.fito-results-action-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Scrollbar customizada */
.filter-list::-webkit-scrollbar {
    width: 6px;
}

.filter-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

    .filter-list::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

/* Animacoes */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */
.mobile-bar {
    display: none;
    background: white;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Chips section mobile */
.chips-section-mobile {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 10px;
    min-height: 40px;
}

    .chips-section-mobile .container-fluid {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

#chips-container-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

/* Ocultar secao de chips mobile quando vazia */
.chips-section-mobile:not(:has(.chip)) {
    display: none;
}

.clear-filters-mobile {
    color: #dc3545;
    text-decoration: none;
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    background: white;
    border: 1px solid #dc3545;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
}

    .clear-filters-mobile:hover {
        color: white;
        background: #dc3545;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
    }

/* Responsividade */
@media (max-width: 767px) {
    .mobile-bar {
        display: block;
    }

    .filters-sidebar {
        display: none;
    }

    .results-area {
        padding: 8px;
    }

    .result-card {
        padding: 10px;
        margin-bottom: 8px;
    }

    .card-content {
        gap: 12px;
    }

    .card-image {
        width: 60px;
        height: 60px;
    }

    .card-title {
        font-size: 14px;
    }

    .chip {
        font-size: 11px;
        padding: 4px 8px;
    }

    .chips-section {
        margin-bottom: 8px;
        padding: 6px;
    }

    .fito-view-mode-toolbar {
        justify-content: space-between;
        margin-bottom: 12px;
        padding: 0;
    }

    .fito-results-table-wrapper {
        border-radius: 6px;
    }

    .fito-results-table {
        min-width: 760px;
    }

    .fito-results-table th:nth-child(4),
    .fito-results-table td:nth-child(4) {
        display: none;
    }

    .fito-results-banner-placeholder,
    .fito-results-banner-host {
        text-align: center;
    }

    .fito-results-banner-row .fito-results-banner-placeholder {
        display: flex;
        justify-content: center;
        width: 100%;
        max-width: 100%;
    }

    .fito-results-banner-row .fito-results-banner-host {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .fito-results-banner-row .fito-results-banner-host > *,
    .fito-results-banner-row .fito-results-banner-host div[id^="agk_"],
    .fito-results-banner-row .fito-results-banner-host iframe {
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .fito-results-banner-row td {
        display: block;
        position: sticky;
        left: calc(((100vw - 320px) / 2) - 20px);
        width: 320px !important;
        min-width: 320px;
        max-width: 320px;
        padding-right: 0;
        padding-left: 0;
    }

    .agrolinkfito-products-preview-info-cultures {
        margin-bottom: 10px;
    }

    .filter-block {
        margin-bottom: 8px;
    }
}

/* Estados especiais */
.filtro-item.selecionado {
    background: #e3f2fd;
    border-left: 3px solid var(--primary-color);
    font-weight: 500;
}

.block-count.atualizado {
    background: var(--chip-bg);
    color: white;
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Modal Mobile Customizado */
.modal-dialog-mobile-custom {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    height: auto;
    width: 70%;
    max-width: none;
    margin: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.modal.show .modal-dialog-mobile-custom {
    transform: translateX(0);
}

.modal-dialog-mobile-custom .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-dialog-mobile-custom .modal-header {
    position: relative;
    padding: 5px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.modal-dialog-mobile-custom .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.btn-close-custom {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .btn-close-custom:hover {
        background: #e9ecef;
        color: #495057;
    }

.modal-dialog-mobile-custom .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}

.modal-dialog-mobile-custom .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    flex-shrink: 0;
    padding: 10px 20px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

@supports (-webkit-touch-callout: none) {
    .modal-dialog-mobile-custom {
        height: 100%;
    }

    .modal-dialog-mobile-custom .modal-content {
        min-height: -webkit-fill-available;
    }
}

.btn-aplicar-mobile {
    /*width: 100%;*/
    padding: 4px 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
}

/* Backdrop customizado para modal mobile */
#modalFiltros .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.4);
}

/* Ajustes para mobile filters dentro do modal */
.modal-dialog-mobile-custom .mobile-filters {
    padding: 16px 20px;
}

.mobile-filters .search-filter {
    padding: 0px 7px 2px;
}

.modal-dialog-mobile-custom .filter-block {
    margin-bottom: 16px;
}

.modal-dialog-mobile-custom .filter-block-header {
    padding: 12px 10px;
}

.modal-dialog-mobile-custom .filter-block-content {
    padding-left: 0;
}

/* Responsividade para telas muito pequenas */
@media (max-width: 480px) {
    .modal-dialog-mobile-custom {
        width: 85%;
    }
}

@media (max-width: 360px) {
    .modal-dialog-mobile-custom {
        width: 95%;
    }
}



/* Estilo para a sobreposicao (backdrop) */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

    #loading-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    #loading-overlay p {
        color: white;
        margin-top: 15px;
        font-size: 1.2em;
    }




