/* Algolia-powered "Popular Suggestions" / "Popular Products" panel added
   below the site's existing header search box (#search-popup / #searchitem).
   Classes are namespaced "aj-" so they can never collide with theme styles,
   and nothing here touches .site-search / .search-drawer / .closeSearch —
   the theme's own JS keeps controlling when the drawer opens and closes. */
.aj-panel{max-width:1200px;margin:0 auto;max-height:70vh;overflow-y:auto;box-sizing:border-box}
.aj-panel *{box-sizing:border-box}
.aj-panel-rule{border-top:1px solid #e3e3e3;margin:20px 0}
.aj-panel-body{display:flex;gap:50px;align-items:flex-start;padding-bottom:24px}

/* No font-family is set anywhere below — every piece of text in this panel
   inherits whatever font the header/theme already applies, so it always
   matches the surrounding header instead of a hardcoded font. */
.aj-suggestions{width:200px;flex-shrink:0}
.aj-suggestions h3,.aj-results h3{font-size:12px;letter-spacing:.09em;text-transform:uppercase;font-weight:700;margin:0 0 16px;color:#1a1a1a}
#ajSuggestionsList{list-style:none;margin:0;padding:0}
.aj-suggestion-link{display:flex;align-items:center;gap:10px;background:none;border:0;padding:8px 0;cursor:pointer;font-size:14px;color:#1c2b63;text-align:left;width:100%}
.aj-suggestion-link svg{flex-shrink:0;color:#555}
.aj-suggestion-link:hover{text-decoration:underline}

.aj-results{flex:1;min-width:0}
.aj-results-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 22px}
.aj-card{display:flex;flex-direction:column}
.aj-card-link{text-decoration:none;color:inherit;display:block}
.aj-card-img{display:block;width:100%;aspect-ratio:1/1;background:#f1f1f1;overflow:hidden;margin-bottom:10px}
.aj-card-img img,.aj-card-img video{width:100%;height:100%;object-fit:contain}
.aj-card-name{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;font-size:13px;color:#1c2b63;line-height:1.3}
.aj-card-link:hover .aj-card-name{text-decoration:underline}
.aj-card-price{display:block;font-size:13px;color:#1a1a1a;margin-top:4px;font-weight: 700;}
.aj-stars{display:block;color:#1a1a1a;font-size:12px;letter-spacing:2px;margin-top:2px}

.aj-empty{color:#777;font-size:13px}

@media(max-width:900px){
 .aj-panel-body{flex-direction:column;gap:20px}
 .aj-suggestions{width:100%}
 .aj-results-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 14px}
}
