/* app/static/css/resultado_pesquisa.css */

/* Estilos gerais para a página de resultados da pesquisa */
.main-search-results-page {
    display: flex;
    background-color: transparent;
    gap: 10px;
    align-items: flex-start;
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 20px !important;
}

/* Área de conteúdo principal (lado direito da sidebar) */
.content-area {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Contêiner para o cabeçalho da área de resultados, incluindo o select de ordenação */
.results-header {
    display: flex;
    justify-content: flex-end; /* Alinha o conteúdo à direita */
    align-items: center;
    margin-bottom: 20px;
    padding: 5px 0;
    width: 100%; /* Garante que ocupe a largura total do content-area */
    box-sizing: border-box;
}

/* --- ESTILO: Botão para abrir/fechar filtros (Mobile) com ÍCONE FA --- */
.filter-toggle-button {
    /* CORRIGIDO: Oculta por padrão em desktop, o 'display: flex' foi movido para o @media */
    display: none;
    padding: 10px 15px;
    background-color: var(--azul-selecao);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
    margin-right: auto; /* Empurra o botão de ordenação para a direita */
    position: relative;
    /* As regras de alinhamento devem ir para o @media, ou ele aparecerá */
}

.filter-toggle-button:hover {
    background-color: #0056b3;
}

/* Estilo para o ícone Font Awesome dentro do botão */
.filter-toggle-button .fas.fa-filter {
    font-size: 1.1rem; /* Tamanho do ícone de funil */
    color: white; /* Garante a cor branca */
    transition: transform 0.3s ease;
}

/* Rotação do ícone quando o painel de filtros está aberto */
.filter-toggle-button.active .fas.fa-filter {
    transform: rotate(180deg); /* Gira o ícone do funil 180 graus */
}

/* --- FIM ESTILO BOTÃO FA --- */

.search-results-title {
    display: none;
}

/* --- ESTILOS DO SELECT CUSTOMIZADO (MANTIDOS) --- */
.custom-select {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #555;
    cursor: pointer;
}

.custom-select .select-label {
    margin-right: 5px;
}

.custom-select .select-selected {
    background-color: transparent;
    border: none;
    padding: 0 20px 0 0;
    cursor: pointer;
    color: inherit;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s ease;
}

.custom-select .select-selected:after {
    content: '\276F';
    font-size: 0.8rem;
    color: #555;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transition: color 0.2s ease;
}

.custom-select:hover .select-selected {
    color: var(--azul-padrao);
}

.custom-select:hover .select-selected:after {
    color: var(--azul-padrao);
}

.custom-select.active .select-selected:after {
    transform: translateY(-50%) rotate(-90deg);
}

.select-items {
    position: absolute;
    background-color: #fff;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    border: 1px solid #ccc;
    border-top: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 0 0 5px 5px;
    min-width: max-content;
}

.select-items button {
    color: #333;
    padding: 8px 20px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.select-items button:last-child {
    border-bottom: none;
}

.select-items button:hover, .select-items .same-as-selected {
    background-color: var(--azul-padrao);
    color: #fff;
}

.select-hide {
    display: none;
}
/* --- FIM DOS ESTILOS DO SELECT CUSTOMIZADO --- */


.search-results-container {
    width: 100%;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

#search-term {
    color: var(--azul-padrao);
    font-weight: bold;
}

/* Grid para exibir os produtos */
.product-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Estilos para cada item de produto no grid, aprimorados (MANTIDOS) */
.product-item {
    flex-shrink: 0;
    width: 100%;
    max-width: 885px;
    height: auto;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    text-align: left;
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
}

/* Remove a borda inferior do último item para não ter uma linha extra no final */
.product-grid .product-item:last-child {
    border-bottom: none;
}

.product-item:hover {
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: row;
    width: 100%;
    padding: 15px;
}

.product-image-wrapper {
    width: 196px;
    height: 196px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border-radius: 0;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Adicionado para garantir que a tag picture ocupe todo o espaço do wrapper caso esteja sendo usada */
.product-image-wrapper picture {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block;
}

.product-details {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.product-name {
    font-size: 18px;
    margin: 0 0 8px 0;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 500;
    color: var(--azul-padrao);
}

.product-item:hover .product-name {
    color: #3483fa;
}

.product-old-price {
    font-size: 14px;
    color: #666;
    margin-bottom: 2px;
}

.product-old-price s {
    text-decoration: line-through;
}

.product-current-price-container {
    display: flex;
    align-items: baseline;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.product-current-price {
    font-size: 28px;
    font-weight: 400;
    color: #333;
    font-family: 'Roboto', sans-serif;
    white-space: nowrap;
}

.product-current-price .integer {
    margin-left: 2px;
}

.product-current-price .centavos {
    font-size: 14px;
    vertical-align: super;
}

.product-discount {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #16883f;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    flex-shrink: 0;
}

.product-installments {
    font-size: 15px;
    color: #000000e6;
    margin-bottom: 3px;
}

.product-installments-value {
    color: #00a650;
    font-weight: bold;
}

.product-installments-info {
    color: #00a650;
}

.product-shipping {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 25px;
    margin-top: 7px;
    padding: 4px 9px;
    border: 1px solid #cce8d6;
    border-radius: 999px;
    background: #eaf7ef;
    color: #0f6d32;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.product-shipping::before {
    content: '✓';
    margin-right: 5px;
    font-weight: 900;
}

/* --- ESTILOS SIDEBAR (MANTIDOS) --- */
.sidebar {
    width: 300px;
    padding: 0 1rem;
    background-color: transparent;
    border-right: none;
    box-shadow: none;
    flex-shrink: 0;
    border-radius: 0;
    align-self: flex-start;
    position: sticky;
    top: 10px;
    height: fit-content;
    /* Adicionado para transição suave */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* NOVO: Estilo para o botão de fechar a sidebar em mobile */
.close-sidebar-button {
    display: none; /* Oculto em desktop */
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    color: var(--azul-selecao); /* Cor azul para o 'X' */
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    z-index: 101;
    padding: 5px;
}


.sidebar h2 {
    display: none;
}

.filter-section {
    margin-bottom: 2rem;
    margin-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-section:first-of-type {
    margin-top: 50px !important;
}

.filter-section h3 {
    color: #555;
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
}

.breadcrumb {
    font-size: 0.95rem;
    color: #777;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.breadcrumb a {
    text-decoration: none;
    color: #007bff;
    padding: 0 3px;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #bbb;
}

.breadcrumb .active {
    font-weight: bold;
    color: #333;
    pointer-events: none;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.price-range label {
    font-size: 0.9rem;
    color: #666;
}

.price-range input[type="number"] {
    width: 90px;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    -moz-appearance: textfield;
}

.price-range input[type="number"]::-webkit-outer-spin-button,
.price-range input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-range button {
    display: none;
}

.brand-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.brand-list input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.brand-list label {
    color: #444;
    cursor: pointer;
}

.update-button-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-bottom: 1rem;
}

.update-button {
    padding: 0.8rem 2rem;
    background-color: var(--azul-selecao);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
    width: 100%;
}

.update-button:hover {
    background-color: #0056b3;
}


/* --- RESPONSIVIDADE ATUALIZADA --- */

@media (max-width: 900px) {
    /* Exibir o botão em mobile */
    .close-sidebar-button {
        display: block;
    }

    .main-search-results-page {
        flex-direction: column;
        padding: 5px 15px;
        gap: 15px;
        max-width: 100%;
        margin-top: 0;
        position: relative; /* Necessário para a sidebar se posicionar corretamente */
    }

    /* 1. Sidebar escondida por padrão em mobile */
    .sidebar {
        width: 100%;
        position: fixed; /* Fixa no topo para funcionar como overlay */
        top: 0;
        left: 0;
        z-index: 100; /* Garante que fique acima de todo o conteúdo */
        height: 100vh;
        overflow-y: auto; /* Permite scroll no conteúdo dos filtros */
        background-color: #fff; /* Fundo branco completo para o painel */
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
        padding: 60px 20px 20px 20px; /* Espaço para o botão fechar */

        /* Oculta a sidebar para a esquerda */
        transform: translateX(-100%);
    }

    /* 2. Classe para MOSTRAR a sidebar quando o botão é clicado (via JS) */
    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    /* 3. Retorna o display do botão de filtro no header em mobile */
    .filter-toggle-button {
        /* CORRIGIDO: Agora o display: flex só aparece em telas menores */
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .results-header {
        /* Garante que o botão de filtro e o select de ordenação fiquem lado a lado */
        justify-content: space-between;
        flex-direction: row;
        align-items: center;
    }

    /* Ajustes menores para produtos */
    .content-area {
        max-width: 100%;

    }
    .product-grid {
        gap: 0;
    }
    .product-item {
        max-width: 100%;
    }
    .product-link {
        padding: 10px;
    }
    .product-image-wrapper {
        width: 150px;
        height: 150px;
        margin-right: 10px;
    }
    .product-name {
        font-size: 16px;
    }
    .product-current-price {
        font-size: 24px;
    }
    .product-old-price, .product-discount, .product-installments, .product-shipping {
        font-size: 13px;
    }
}

@media (max-width: 500px) {
    .results-header {
        flex-direction: row; /* Mantém na linha para o botão e select */
        justify-content: space-between;
    }

    /* Garante que o painel de filtro ocupe toda a largura */
    .sidebar {
        width: 100vw;
    }

    /* Quebra o produto em coluna para telas muito pequenas */
    .product-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0;
    }

    .product-image-wrapper {
        width: 120px;
        height: 120px;
        margin-right: 0;
        margin-bottom: 10px;
    }
    .product-link {
        flex-direction: row;
    }
    .product-details {
        text-align: left;
        align-items: flex-start;
    }
    .product-current-price-container {
        justify-content: center;
    }
}
.product-image-wrapper,.product-image-wrapper picture{background:#fff}.product-image{object-fit:contain!important;object-position:center;background:#fff}

/* =========================================================
   LISTAGEM COMPARTILHADA: PESQUISA + CATEGORIA
   ========================================================= */
.listing-page-host {
    width: 100%;
    min-height: 440px;
}

.listing-page-host [hidden] {
    display: none !important;
}

.listing-page-content {
    width: 100%;
    box-sizing: border-box;
}

.select-items button {
    width: 100%;
    margin: 0;
    background: #fff;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    font: inherit;
    text-align: left;
}

.select-items button:focus-visible,
.select-selected:focus-visible,
.filter-toggle-button:focus-visible,
.close-sidebar-button:focus-visible,
.update-button:focus-visible {
    outline: 3px solid rgba(0, 91, 187, 0.25);
    outline-offset: 2px;
}

.close-sidebar-button svg,
.filter-toggle-button svg {
    display: block;
    flex: 0 0 auto;
}

.no-results-message {
    max-width: 700px;
    margin: 40px auto;
    padding: 24px;
    color: #555;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    line-height: 1.6;
}

.brand-list-empty {
    color: #777;
    font-size: 0.92rem;
}

.product-image-wrapper {
    position: relative;
}

.product-review-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 8px;
    color: #fff;
    background: var(--azul-selecao);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.product-review-kicker {
    display: block;
    margin-bottom: 5px;
    color: #d87900;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.product-review-rating {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
}

.product-review-stars {
    display: inline-flex;
    align-items: center;
    color: #f39c12;
}

.review-star {
    margin-right: 2px;
}

.product-review-score {
    color: #333;
    font-size: 13px;
    font-weight: 700;
}

.product-review-link {
    margin-top: auto;
    color: var(--azul-link);
    font-size: 14px;
    font-weight: 600;
}

/* Skeleton exclusivo das listagens. Cada include controla sua volume
   e estrutura, mas ambos espelham o resultado horizontal final. */
.listing-page-skeleton {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px !important;
    box-sizing: border-box;
}

.listing-skeleton-sidebar {
    position: relative;
    flex: 0 0 300px;
    width: 300px;
    min-height: 360px;
    padding: 50px 16px 16px;
    box-sizing: border-box;
}

.listing-skeleton-results {
    flex: 1 1 auto;
    min-width: 0;
}

.listing-skeleton-sort {
    width: 172px;
    height: 18px;
    margin: 10px 0 27px auto;
    border-radius: 5px;
}

.listing-skeleton-result-row {
    display: flex;
    width: 100%;
    min-height: 226px;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    box-sizing: border-box;
}

.listing-skeleton-result-row:last-child {
    border-bottom: 0;
}

.listing-skeleton-image {
    flex: 0 0 196px;
    width: 196px;
    height: 196px;
    margin-right: 15px;
    border-radius: 6px;
}

.listing-skeleton-copy {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 5px;
}

.listing-skeleton-line,
.listing-skeleton-price-row i,
.listing-skeleton-sort,
.listing-skeleton-image {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e9edf2;
}

.listing-skeleton-line::after,
.listing-skeleton-price-row i::after,
.listing-skeleton-sort::after,
.listing-skeleton-image::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: listing-skeleton-shimmer 1.35s ease-in-out infinite;
}

.listing-skeleton-line {
    height: 13px;
    margin-bottom: 14px;
    border-radius: 5px;
}

.listing-skeleton-line--heading {
    width: 88px;
    height: 15px;
    margin-top: 12px;
}

.listing-skeleton-line--query,
.listing-skeleton-line--category {
    width: 78%;
}

.listing-skeleton-line--category {
    width: 62%;
}

.listing-skeleton-price-row {
    display: flex;
    gap: 8px;
    margin: 8px 0 28px;
}

.listing-skeleton-price-row i {
    width: 90px;
    height: 38px;
    border-radius: 5px;
}

.listing-skeleton-line--brand {
    width: 70%;
}

.listing-skeleton-line--brand-short {
    width: 48%;
}

.listing-skeleton-line--button {
    width: 100%;
    height: 43px;
    margin-top: 28px;
    border-radius: 5px;
}

.listing-skeleton-line--title {
    width: min(540px, 82%);
    height: 18px;
    margin-bottom: 9px;
}

.listing-skeleton-line--title-short {
    width: min(370px, 58%);
    height: 18px;
    margin-bottom: 25px;
}

.listing-skeleton-line--price {
    width: 150px;
    height: 29px;
    margin-top: 24px;
}

.listing-skeleton-line--detail {
    width: 210px;
    height: 14px;
    margin-top: 12px;
}

.listing-page-skeleton--search .listing-skeleton-line--price {
    margin-top: 34px;
}

.listing-page-skeleton--category .listing-skeleton-result-row {
    min-height: 226px;
}

@keyframes listing-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .listing-skeleton-line::after,
    .listing-skeleton-price-row i::after,
    .listing-skeleton-sort::after,
    .listing-skeleton-image::after {
        animation: none;
    }
}

@media (max-width: 900px) {
    .listing-page-skeleton {
        display: block;
        max-width: 100%;
        padding: 5px 15px !important;
    }

    .listing-skeleton-sidebar {
        display: none;
    }

    .listing-skeleton-sort {
        width: 100%;
        max-width: 285px;
        height: 42px;
        margin: 5px 0 15px auto;
    }

    .listing-skeleton-result-row {
        min-height: 170px;
        padding: 10px;
    }

    .listing-skeleton-image {
        flex-basis: 150px;
        width: 150px;
        height: 150px;
        margin-right: 10px;
    }

    .listing-skeleton-line--title,
    .listing-skeleton-line--title-short {
        height: 16px;
    }

    .listing-skeleton-line--price {
        width: 125px;
        height: 25px;
        margin-top: 15px;
    }
}

@media (max-width: 500px) {
    .custom-select {
        font-size: 0.9rem;
    }

    .custom-select .select-label {
        display: none;
    }

    .listing-skeleton-result-row {
        min-height: 140px;
    }

    .listing-skeleton-image {
        flex-basis: 120px;
        width: 120px;
        height: 120px;
    }

    .listing-skeleton-line--title-short {
        display: none;
    }

    .listing-skeleton-line--price {
        margin-top: 15px;
    }

    .product-review-rating {
        flex-wrap: wrap;
    }
}

/* =========================================================
   FILTROS PREMIUM — LISTAGEM COMPARTILHADA
   Ícones são SVG inline: nenhuma requisição externa adicional.
   ========================================================= */
.main-search-results-page {
    gap: 24px;
    padding: 24px 20px !important;
}

.sidebar {
    width: 300px;
    padding: 0;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(16, 38, 64, 0.08);
    overflow: hidden;
    top: 16px;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.filter-panel-heading {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 18px 17px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.18), transparent 32%),
        linear-gradient(135deg, var(--azul-padrao, #063970), var(--azul-selecao, #0878d1));
}

.filter-panel-heading__icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.filter-panel-heading__copy {
    min-width: 0;
}

.filter-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar .filter-panel-heading h2 {
    display: block;
    margin: 0;
    color: #fff;
    font-size: 1.13rem;
    line-height: 1.25;
}

.filter-panel-heading p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.78rem;
    line-height: 1.4;
}

.close-sidebar-button {
    top: 13px;
    right: 12px;
    display: none;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.13);
}

.close-sidebar-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.filter-panel-scroll {
    max-height: calc(100vh - 275px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #c8d4e1 transparent;
}

.filter-panel-scroll::-webkit-scrollbar {
    width: 6px;
}

.filter-panel-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c8d4e1;
}

.filter-context-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 14px 4px;
    padding: 12px;
    border: 1px solid #dce9f6;
    border-radius: 13px;
    background: linear-gradient(135deg, #f6faff, #edf6ff);
}

.filter-context-card__icon {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    color: var(--azul-selecao, #0878d1);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(8, 120, 209, 0.1);
}

.filter-context-card__label {
    display: block;
    margin-bottom: 2px;
    color: #708197;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.breadcrumb {
    display: block;
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.35;
}

.breadcrumb a {
    display: -webkit-box;
    overflow: hidden;
    padding: 0;
    color: #17324d;
    font-weight: 700;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.breadcrumb a:hover {
    color: var(--azul-selecao, #0878d1);
    text-decoration: none;
}

.filter-section {
    margin: 0 14px;
    padding: 18px 0;
    border-bottom: 1px solid #edf0f4;
}

.filter-section:first-of-type {
    margin-top: 0 !important;
}

.filter-section:last-of-type {
    margin-bottom: 0;
    border-bottom: 0;
}

.filter-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 13px;
}

.filter-section-heading__icon {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    color: var(--azul-selecao, #0878d1);
    border-radius: 10px;
    background: #eef6ff;
}

.sidebar .filter-section h3 {
    display: block;
    margin: 0;
    color: #18324b;
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.25;
}

.filter-section-heading p {
    margin: 3px 0 0;
    color: #7b8a9a;
    font-size: 0.74rem;
    line-height: 1.35;
}

.price-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 9px;
}

.price-field {
    min-width: 0;
}

.price-field__label {
    display: block;
    margin: 0 0 5px 2px;
    color: #647486;
    font-size: 0.72rem;
    font-weight: 700;
}

.price-input-wrap {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 42px;
    overflow: hidden;
    border: 1px solid #d8e0e8;
    border-radius: 11px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.price-input-wrap:focus-within {
    border-color: var(--azul-selecao, #0878d1);
    box-shadow: 0 0 0 3px rgba(8, 120, 209, 0.11);
}

.price-input-wrap > span {
    padding-left: 10px;
    color: #5f7082;
    font-size: 0.75rem;
    font-weight: 800;
}

.price-range input[type="number"] {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 8px 0 5px;
    color: #19324a;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
}

.price-input-wrap:has(input.is-invalid) {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.price-filter-error {
    margin: 8px 0 0;
    color: #b42318;
    font-size: 0.72rem;
    line-height: 1.35;
}

.quick-price-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
}

.quick-price-button {
    padding: 7px 9px;
    color: #536579;
    border: 1px solid #dae2ea;
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.quick-price-button:hover {
    color: var(--azul-selecao, #0878d1);
    border-color: #a9cbed;
    transform: translateY(-1px);
}

.quick-price-button.is-active {
    color: #fff;
    border-color: var(--azul-selecao, #0878d1);
    background: var(--azul-selecao, #0878d1);
}

.filter-benefit-option {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid #e2e8ef;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-benefit-option:last-child {
    margin-bottom: 0;
}

.filter-benefit-option:hover,
.filter-benefit-option.is-selected {
    border-color: #b9d7f3;
    background: #f7fbff;
    box-shadow: 0 5px 15px rgba(8, 84, 145, 0.06);
}

.filter-benefit-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.filter-benefit-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.filter-benefit-icon--shipping {
    color: #047a44;
    background: #eaf9f1;
}

.filter-benefit-icon--offer {
    color: #b45d00;
    background: #fff4e4;
}

.filter-benefit-copy {
    min-width: 0;
}

.filter-benefit-copy strong,
.filter-benefit-copy small {
    display: block;
}

.filter-benefit-copy strong {
    color: #20384f;
    font-size: 0.82rem;
    line-height: 1.25;
}

.filter-benefit-copy small {
    margin-top: 2px;
    color: #7a8998;
    font-size: 0.67rem;
    line-height: 1.3;
}

.filter-switch {
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #cfd8e2;
    transition: background-color 0.2s ease;
}

.filter-switch i {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.filter-benefit-option input:checked ~ .filter-switch {
    background: var(--azul-selecao, #0878d1);
}

.filter-benefit-option input:checked ~ .filter-switch i {
    transform: translateX(16px);
}

.filter-benefit-option:focus-within {
    outline: 3px solid rgba(8, 120, 209, 0.16);
    outline-offset: 2px;
}

.brand-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 11px;
    color: #8291a0;
    border: 1px solid #d8e0e8;
    border-radius: 11px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.brand-search:focus-within {
    color: var(--azul-selecao, #0878d1);
    border-color: var(--azul-selecao, #0878d1);
    box-shadow: 0 0 0 3px rgba(8, 120, 209, 0.1);
}

.brand-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #20384f;
    background: transparent;
    font: inherit;
    font-size: 0.8rem;
}

.brand-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 9px 1px 7px;
    color: #7a8998;
    font-size: 0.68rem;
}

.brand-toggle-button {
    padding: 0;
    color: var(--azul-selecao, #0878d1);
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.69rem;
    font-weight: 800;
    cursor: pointer;
}

.brand-list {
    max-height: 240px;
    overflow-y: auto;
    padding-right: 3px;
    scrollbar-width: thin;
    scrollbar-color: #d2dbe4 transparent;
}

.brand-list li {
    margin: 0;
}

.brand-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 35px;
    padding: 5px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.brand-option:hover {
    background: #f3f7fb;
}

.brand-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.brand-option__check {
    display: grid;
    place-items: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: transparent;
    border: 1.5px solid #bdc9d5;
    border-radius: 5px;
    background: #fff;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.brand-option input:checked + .brand-option__check {
    color: #fff;
    border-color: var(--azul-selecao, #0878d1);
    background: var(--azul-selecao, #0878d1);
}

.brand-option input:focus-visible + .brand-option__check {
    outline: 3px solid rgba(8, 120, 209, 0.16);
    outline-offset: 2px;
}

.brand-option__name {
    overflow: hidden;
    color: #334b62;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-list-empty,
.brand-list-no-match {
    padding: 10px 5px;
    color: #7a8998;
    font-size: 0.75rem;
    line-height: 1.4;
}

.filter-actions {
    position: relative;
    z-index: 2;
    padding: 13px 14px 14px;
    border-top: 1px solid #e9eef3;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 20px rgba(16, 38, 64, 0.04);
}

.update-button-container {
    display: none;
}

.update-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(8, 120, 209, 0.2);
}

.update-button[aria-busy="true"] {
    cursor: wait;
    opacity: 0.75;
}

.clear-filters-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 34px;
    margin-top: 6px;
    padding: 0 10px;
    color: #617285;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.clear-filters-button:hover:not(:disabled) {
    color: #b42318;
    background: #fff3f2;
}

.clear-filters-button:disabled,
.clear-filters-inline:disabled {
    cursor: default;
    opacity: 0.4;
}

.filter-count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    color: var(--azul-padrao, #063970);
    background: #fff;
    font-size: 0.67rem;
    line-height: 1;
}

.results-header {
    justify-content: space-between;
    gap: 14px;
    min-height: 48px;
    margin-bottom: 14px;
    padding: 0;
}

.results-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #718093;
    font-size: 0.83rem;
}

.results-summary__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: var(--azul-selecao, #0878d1);
    border-radius: 9px;
    background: #eef6ff;
}

.results-summary strong {
    color: #18324b;
    font-size: 0.92rem;
}

.custom-select {
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    color: #536579;
    border: 1px solid #dfe6ed;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(16, 38, 64, 0.05);
}

.custom-select .select-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 0;
    color: #7a8998;
    font-size: 0.76rem;
}

.custom-select .select-selected {
    font-weight: 750;
}

.select-items {
    top: calc(100% + 7px);
    left: auto;
    right: 0;
    overflow: hidden;
    min-width: 180px;
    border: 1px solid #e0e7ee;
    border-radius: 11px;
    box-shadow: 0 14px 30px rgba(16, 38, 64, 0.14);
}

.filter-toggle-button {
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 13px;
    border-radius: 11px;
    box-shadow: 0 7px 16px rgba(8, 120, 209, 0.18);
}

.active-filters-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #e0e9f2;
    border-radius: 12px;
    background: #f8fbfe;
}

.active-filters-bar__title {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #536579;
    font-size: 0.72rem;
    font-weight: 800;
}

.active-filter-chips {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 6px;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 4px 8px 4px 10px;
    color: #165485;
    border: 1px solid #cce1f4;
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.active-filter-chip:hover {
    color: #b42318;
    border-color: #f0c5c1;
    background: #fff7f6;
}

.clear-filters-inline {
    padding: 5px 7px;
    color: var(--azul-selecao, #0878d1);
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.71rem;
    font-weight: 800;
    cursor: pointer;
}

.listing-page-content.is-updating .search-results-container {
    opacity: 0.52;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.listing-page-content.is-updating .results-summary__icon {
    animation: listing-filter-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes listing-filter-pulse {
    to { transform: scale(0.9); opacity: 0.55; }
}

.listing-filter-backdrop {
    display: none;
}

/* Skeleton do painel refinado, mantendo pesquisa e categoria em includes separados. */
.listing-skeleton-sidebar {
    min-height: 640px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e6ebf2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(16, 38, 64, 0.07);
}

.listing-skeleton-filter-head {
    height: 100px;
    padding: 20px 18px;
    background: #dfeaf5;
    box-sizing: border-box;
}

.listing-skeleton-filter-head .listing-skeleton-line {
    background: #c9d8e6;
}

.listing-skeleton-filter-body {
    padding: 14px;
}

.listing-skeleton-filter-card {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #edf1f5;
    border-radius: 12px;
}

.listing-skeleton-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.listing-skeleton-toggle-row i {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e9edf2;
}

.listing-skeleton-toggle-row .listing-skeleton-line {
    flex: 1 1 auto;
    margin: 0;
}

@media (max-width: 900px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .main-search-results-page {
        gap: 14px;
        padding: 8px 15px 18px !important;
    }

    .listing-filter-backdrop:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: block;
        background: rgba(9, 24, 38, 0.48);
        backdrop-filter: blur(2px);
    }

    .sidebar {
        z-index: 1001;
        width: min(390px, 92vw);
        max-width: 390px;
        height: 100dvh;
        padding: 0;
        border: 0;
        border-radius: 0 20px 20px 0;
        box-shadow: 20px 0 44px rgba(8, 28, 46, 0.25);
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .close-sidebar-button {
        display: grid;
    }

    .filter-panel-heading {
        padding-right: 58px;
    }

    .filter-panel-scroll {
        max-height: calc(100dvh - 228px);
    }

    .filter-actions {
        position: sticky;
        bottom: 0;
    }

    .results-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    .results-summary {
        grid-column: 1 / -1;
    }

    .filter-toggle-button {
        display: inline-flex;
        justify-self: start;
        margin-right: 0;
    }

    .custom-select {
        justify-self: end;
    }

    .listing-skeleton-sidebar {
        display: none;
    }
}

@media (max-width: 500px) {
    .sidebar {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
    }

    .filter-panel-scroll {
        max-height: calc(100dvh - 223px);
    }

    .results-header {
        margin-bottom: 10px;
    }

    .custom-select {
        min-height: 40px;
        padding: 0 9px;
    }

    .custom-select .select-label {
        display: none;
    }

    .active-filters-bar {
        align-items: flex-start;
        padding: 9px;
    }

    .active-filters-bar__title {
        width: 100%;
    }

    .clear-filters-inline {
        margin-left: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .listing-page-content.is-updating .results-summary__icon {
        animation: none;
    }
}
/* Tipo de conteúdo e estados disponíveis */
.content-type-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.content-type-options label{position:relative;cursor:pointer}.content-type-options input{position:absolute;opacity:0;pointer-events:none}.content-type-options span{display:flex;align-items:center;justify-content:center;min-height:39px;padding:6px;border:1px solid #dfe7ed;border-radius:10px;background:#fbfcfd;color:#60727f;font-size:.74rem;font-weight:750;text-align:center;transition:border .18s,background .18s,color .18s}.content-type-options input:checked+span{border-color:#6da5ce;background:#eaf4fb;color:#1e6596;box-shadow:inset 0 0 0 1px rgba(52,126,181,.08)}.content-type-options input:focus-visible+span{outline:3px solid rgba(43,122,180,.16);outline-offset:2px}.filter-benefit-option.is-unavailable{opacity:.48;cursor:not-allowed}.filter-benefit-option.is-unavailable input{pointer-events:none}.filter-benefit-option.is-unavailable .filter-benefit-copy small::after{content:" · indisponível"}.filter-section--brands.is-unavailable .brand-search,.filter-section--brands.is-unavailable .brand-list-meta{display:none}

/* Produto marcado como destaque no painel administrativo. */
.product-card-featured-badge {
    position: absolute;
    z-index: 3;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid rgba(0, 86, 179, .18);
    border-radius: 999px;
    background: linear-gradient(135deg, #eef7ff 0%, #f8fbff 100%);
    color: #075b95;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .02em;
    box-shadow: 0 3px 9px rgba(7, 91, 149, .08);
    pointer-events: none;
}

.product-card-featured-badge::before {
    content: '✓';
    margin-right: 4px;
    color: #0b6fb8;
    font-size: 10px;
    font-weight: 900;
}
/* Padronização final dos botões de filtros/listagem */
.update-button,
.filter-toggle-button.is-active,
.quick-price-button.is-active {
    background: #0056b3 !important;
    color: #ffffff !important;
    border-color: #0056b3 !important;
}

.update-button:hover,
.update-button:focus-visible {
    background: #004a9c !important;
    color: #ffffff !important;
}


/* Correção final dos botões de filtros */
.update-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border-color: #0056b3 !important;
    background: #0056b3 !important;
    color: #ffffff !important;
}

.update-button :where(span, strong, small, i),
.update-button svg {
    color: inherit !important;
    stroke: currentColor !important;
}

.update-button:hover,
.update-button:focus-visible {
    border-color: #004a9c !important;
    background: #004a9c !important;
    color: #ffffff !important;
}


/* =========================================================
   Categoria/Pesquisa - respiro lateral do cabeçalho de resultados
   ========================================================= */
.content-area {
    min-width: 0;
}

.results-header {
    padding: 0 14px !important;
    box-sizing: border-box !important;
}

.results-summary,
.custom-select {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .results-header {
        padding: 0 6px !important;
    }
}

@media (max-width: 500px) {
    .results-header {
        padding: 0 4px !important;
    }
}

/* Cards de artigo na busca/listagem mista */
.product-item--article .product-article-description{margin:8px 0 0;color:#667085;font-size:12px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.product-item--article .product-review-badge{background:#0f766e}.product-item--article .product-review-kicker{color:#0f766e}

/* Vida Elite v5 - listagens compactas e filtros */
.content-type-options{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.content-type-options span{min-height:34px!important;padding:5px 7px!important;font-size:.68rem!important;line-height:1.1!important;word-break:normal;overflow-wrap:anywhere;}
.content-type-options label:last-child{grid-column:1 / -1;}
.product-item{max-width:100%!important;border-radius:0!important;}
.product-link{padding:12px 16px!important;align-items:center!important;}
.product-image-wrapper{width:142px!important;height:112px!important;margin-right:18px!important;border-radius:10px!important;}
.product-review-badge{top:8px!important;left:8px!important;padding:3px 7px!important;font-size:9px!important;}
.product-details{min-height:112px!important;justify-content:center!important;}
.product-review-kicker{margin-bottom:4px!important;font-size:11px!important;}
.product-name{font-size:1.03rem!important;line-height:1.32!important;margin-bottom:7px!important;max-height:2.7em!important;}
.product-review-rating{margin-bottom:6px!important;gap:6px!important;}
.product-review-score{font-size:12px!important;color:#4b5563!important;}
.product-review-link{margin-top:6px!important;font-size:.86rem!important;font-weight:850!important;}
.results-header{justify-content:flex-end!important;}
.results-summary{margin-right:auto!important;}
.custom-select{margin-left:auto!important;}
.custom-select .select-label svg{width:16px;height:16px;}
@media(max-width:900px){.product-image-wrapper{width:126px!important;height:104px!important}.product-link{padding:10px 12px!important}.product-name{font-size:.96rem!important}.results-header{justify-content:space-between!important}.results-summary{margin-right:0!important}}
@media(max-width:560px){.product-link{align-items:flex-start!important}.product-image-wrapper{width:104px!important;height:96px!important;margin-right:12px!important}.product-review-badge{display:none!important}.product-review-kicker{font-size:10px!important}.product-name{font-size:.9rem!important}.product-review-score{display:none}.product-review-link{font-size:.82rem!important}}
