/* Autosuggestion box container */
.unx-autosuggest-box {
    display: flex;
    flex-direction: row;
    overflow: hidden;
    height: 400px;
    width: 600px;
    max-width: 100%;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

/* Product grid */
.unx-autosuggest-box .unx-popular-products {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 12px;
}

.unx-popular-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    width: 100%;
}

/* Suggestions column */
.unx-suggestions {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    border-left: 1px solid #e2e8f0;
    padding: 12px;
    overflow-y: auto;
    background: #f8fafc;
}

/* Product card */
.unx-popular-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.unx-popular-product:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Product image */
.unx-popular-product img {
    width: 100%;
    max-width: 120px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 8px;
}

/* Product title */
.unx-popular-product > div:first-of-type {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    text-align: center;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product price */
.unx-popular-product > div:nth-of-type(2) {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
}

/* Add to cart button */
.unx-add-to-cart-btn {
    width: 100%;
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    margin-top: 4px;
}

/* Section labels */
.unx-infield-suggestions::before,
.unx-keyword-suggestions::before,
.unx-promoted-suggestions::before,
.unx-top-search-queries::before,
.unx-trending-searches::before {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #ddd;
}

.unx-infield-suggestions::before { content: "Recent Searches"; }
.unx-keyword-suggestions::before { content: "Suggestions"; }
.unx-promoted-suggestions::before { content: "Promoted"; }
.unx-top-search-queries::before { content: "Top Queries"; }
.unx-trending-searches::before { content: "Trending Searches"; }

/* Trending searches section */
.unx-trending-searches {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.unx-trending-search {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 14px;
    color: #334155;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.unx-trending-search:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Suggestion items */
.unx-infield-suggestions > div,
.unx-keyword-suggestions > div,
.unx-promoted-suggestions > div,
.unx-top-search-queries > div,
.unx-trending-searches > div {
    padding: 6px 10px;
    margin-bottom: 2px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.unx-infield-suggestions > div:hover,
.unx-keyword-suggestions > div:hover,
.unx-promoted-suggestions > div:hover,
.unx-top-search-queries > div:hover,
.unx-trending-searches > div:hover {
    background: #f1f5f9;
}

/* Infield row with chips */
.unx-infield-suggestions > div.unx-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin-bottom: 2px;
    cursor: pointer;
    font-size: 14px;
}

.unx-infield-suggestions > div.unx-item > span.unx-item {
    display: inline-block;
    padding: 2px 6px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

/* Section spacing */
.unx-infield-suggestions,
.unx-promoted-suggestions,
.unx-top-search-queries,
.unx-trending-searches {
    margin-bottom: 12px;
}

.unx-keyword-suggestions {
    margin-top: 8px;
}
