/* =========================================================
   Busca compacta
   - Chips na MESMA linha de "Sugestões:" (abaixo do input)
   - Aparecem/somem via .is-hidden (controlado pelo JS)
   - Lista de produtos inline (abaixo dos chips)
   - Botão/lupa oculto
   ========================================================= */

:root {
    --violet: #3a2e85;
    --violet-2: #2b1f63;
    --dash: #cfc7f2;
}

/* Oculta eventual botão/lupa do tema (Enter ainda envia o form) */
.search-style-2 form button[type="submit"] {
    display: none !important;
}

/* Utilitária geral */
.is-hidden {
    display: none !important;
}

/* ====== BLOCO DE SUGESTÕES (embaixo do input) ====== */
.search-style-2 .search-suggest-box {
    width: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    background: #fff;
    border: 1px dashed var(--dash);
    border-radius: 8px;

    /* Mesma linha: label + chips */
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
}

/* Se estiver oculto, garante que some mesmo contra regras com !important */
.search-style-2 .search-suggest-box.is-hidden {
    display: none !important;
}

/* Label discreta, sem quebrar linha */
.search-style-2 .ss-label {
    font-weight: 700;
    font-size: .9rem;
    color: var(--violet-2);
    white-space: nowrap;
    margin: 0;
    line-height: 1.2;
    flex: 0 0 auto;
}

/* Chips na mesma linha, com scroll horizontal se faltar espaço */
.search-style-2 .ss-chips {
    display: flex !important;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: thin;
    scrollbar-color: var(--dash) #fff;
}

.search-style-2 .ss-chips::-webkit-scrollbar {
    height: 6px;
}

.search-style-2 .ss-chips::-webkit-scrollbar-thumb {
    background: var(--dash);
    border-radius: 6px;
}

/* Chip compacto */
.search-style-2 .ss-chip {
    flex: 0 0 auto !important;
    max-width: 200px;
    padding: 2px 8px;
    font-size: .875rem;
    line-height: 1.35;
    color: #333;
    background: #fff;
    border: 1px solid #e3defa;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .15s ease, border-color .15s ease, transform .06s ease;
}

.search-style-2 .ss-chip:hover {
    background: #f6f4ff;
    border-color: #d9d3fb;
}

.search-style-2 .ss-chip:active {
    transform: scale(.98);
}

.search-style-2 .ss-chip:focus-visible {
    outline: 2px solid rgba(58, 46, 133, .35);
    outline-offset: 2px;
}

/* ====== LISTA DE PRODUTOS (abaixo dos chips) ====== */
.search-style-2 .suggest-below {
    margin-top: 8px;
}

.search-style-2 .j_term_content--inline {
    position: static;
    width: 100%;
    background: #fff;
    border: 1px dashed var(--dash);
    border-radius: 8px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .05);
    max-height: 260px; /* compacto para caber no header */
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--dash) #fff;
}

.search-style-2 .j_term_content--inline::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.search-style-2 .j_term_content--inline::-webkit-scrollbar-thumb {
    background: var(--dash);
    border-radius: 8px;
}

/* Item */
.search-style-2 .j_term_content--inline .j_term_content_item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    transition: background-color .12s ease;
}

.search-style-2 .j_term_content--inline .j_term_content_item:hover {
    background-color: rgba(0, 0, 0, .03);
}

/* Imagem compacta à esquerda */
.search-style-2 .j_term_content--inline .j_term_content_item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex: 0 0 56px;
}

/* Coluna direita */
.search-style-2 .j_term_content--inline .j_term_content_item_description {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.search-style-2 .j_term_content--inline .product-title {
    font-size: .95rem;
    font-weight: 700;
    color: #333;
    line-height: 1.25;
    text-decoration: none;
    margin: 0 0 2px 0;
}

.search-style-2 .j_term_content--inline .product-title:hover {
    color: var(--violet-2);
    text-decoration: underline;
}

.search-style-2 .j_term_content--inline .price {
    font-size: .95rem;
    font-weight: 700;
    color: var(--violet);
}

.search-style-2 .j_term_content--inline .old-price {
    font-size: .85rem;
    color: #888;
    text-decoration: line-through;
    margin-right: 6px;
}

.search-style-2 .j_term_content--inline .new-price {
    font-size: .95rem;
    color: #0cc3ce;
    font-weight: 700;
}

/* Compat: se o tema tiver regras antigas com <p> + span.price lado a lado */
.search-style-2 .j_term_content_item_description p {
    margin: 0;
    display: block;
}

.search-style-2 .j_term_content_item_description p .price,
.search-style-2 .j_term_content_item_description p span.price {
    display: block;
    gap: 0;
    align-items: flex-start;
}

/* Responsivo */
@media (max-width: 480px) {
    .search-style-2 .j_term_content--inline .j_term_content_item img {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .search-style-2 .j_term_content--inline .product-title,
    .search-style-2 .j_term_content--inline .price {
        font-size: .9rem;
    }
}