/* StraganUI 0.25.0 — header product autocomplete + search-surface polish */
.so-site-search{position:relative;isolation:isolate;z-index:30}

/* The autocomplete is an overlay owned by the search form. It must never
   participate in header grid sizing or push the navigation/content down. */
.so-search-suggest{
    position:absolute;
    left:0;
    right:0;
    top:calc(100% + 8px);
    z-index:10050;
    display:none;
    width:100%;
    max-height:min(560px,calc(100vh - 150px));
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:7px;
    border:1px solid var(--so-border);
    border-radius:15px;
    background:#fff;
    box-shadow:0 20px 48px rgba(20,50,30,.18);
    color:var(--so-text);
    font-family:var(--so-font-body);
    scrollbar-width:thin;
    scrollbar-color:#becbc1 transparent;
}
.so-search-suggest.is-open{display:block}
.so-search-suggest::-webkit-scrollbar{width:8px}.so-search-suggest::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background:#becbc1;background-clip:padding-box}

.so-search-suggest__section{padding:2px 0 6px}
.so-search-suggest__section+.so-search-suggest__section{margin-top:2px;padding-top:8px;border-top:1px solid #edf1ee}
.so-search-suggest__label{display:block;padding:5px 8px 6px;color:#7c8980;font-size:9px;font-weight:800;line-height:1.2;letter-spacing:.1em;text-transform:uppercase}

.so-search-item{
    display:grid!important;
    grid-template-columns:46px minmax(0,1fr) auto;
    align-items:center;
    gap:9px;
    min-height:58px;
    margin:0!important;
    padding:6px 8px!important;
    border:0!important;
    border-radius:10px!important;
    background:transparent!important;
    color:var(--so-text)!important;
    text-decoration:none!important;
    box-shadow:none!important;
}
.so-search-item:hover,.so-search-item.is-active,.so-search-item[aria-selected="true"]{background:#f2f7f3!important;color:var(--so-green-dark)!important}
.so-search-item img,.so-search-item__placeholder{display:block!important;width:46px!important;height:46px!important;max-width:46px!important;max-height:46px!important;margin:0!important;border-radius:7px;background:#f7f9f7;object-fit:contain!important}
.so-search-item__placeholder{border:1px solid #edf1ee}
.so-search-item strong{display:-webkit-box;min-width:0;overflow:hidden;color:inherit!important;font-size:11.5px!important;font-weight:700!important;line-height:1.3!important;text-decoration:none!important;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.so-search-item small{justify-self:end;margin:0!important;color:var(--so-green-dark)!important;font-size:10.5px!important;font-weight:800!important;line-height:1.2!important;white-space:nowrap}

.so-search-category{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    min-height:38px;
    margin:0!important;
    padding:7px 9px!important;
    border:0!important;
    border-radius:9px!important;
    background:transparent!important;
    color:#28332b!important;
    font-size:11.5px!important;
    font-weight:650!important;
    line-height:1.25!important;
    text-decoration:none!important;
    box-shadow:none!important;
}
.so-search-category:hover,.so-search-category.is-active,.so-search-category[aria-selected="true"]{background:#f2f7f3!important;color:var(--so-green-dark)!important}
.so-search-category span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.so-search-category small{display:inline-flex;min-width:24px;height:22px;align-items:center;justify-content:center;padding:0 6px;border-radius:999px;background:#eef4ef;color:#68756c;font-size:9px!important;font-weight:800!important;white-space:nowrap}

.so-search-suggest__empty{padding:13px 10px;color:var(--so-muted);font-size:11px;line-height:1.4;text-align:center}
.so-search-all{
    display:flex!important;
    min-height:40px;
    align-items:center;
    justify-content:center;
    margin:4px -1px -1px!important;
    padding:9px 12px!important;
    border:0!important;
    border-top:1px solid #e7ede8!important;
    border-radius:0 0 10px 10px!important;
    background:#fbfcfb!important;
    color:var(--so-green-dark)!important;
    font-size:10.8px!important;
    font-weight:800!important;
    line-height:1.25!important;
    text-align:center!important;
    text-decoration:none!important;
    box-shadow:none!important;
}
.so-search-all:hover,.so-search-all.is-active,.so-search-all[aria-selected="true"]{background:#eef5ef!important;color:var(--so-green-dark)!important}

/* Search results page itself uses the canonical product archive template; this
   only normalizes ordinary WordPress search wrappers that may remain around it. */
.straganui-search-page .site-main{width:min(var(--so-container),calc(100% - 48px))!important;margin:20px auto 48px!important}

@media(max-width:820px){
    .so-site-search{z-index:60}
    .so-search-suggest{top:calc(100% + 6px);max-height:min(480px,58vh);padding:6px;border-radius:13px;box-shadow:0 16px 34px rgba(20,50,30,.2)}
    .so-search-item{grid-template-columns:44px minmax(0,1fr) auto;min-height:56px;padding:6px!important}
    .so-search-item img,.so-search-item__placeholder{width:44px!important;height:44px!important;max-width:44px!important;max-height:44px!important}
}
@media(max-width:520px){
    .so-search-suggest{left:0;right:0;width:100%;max-height:54vh}
    .so-search-item{grid-template-columns:42px minmax(0,1fr);gap:8px;min-height:58px}
    .so-search-item img,.so-search-item__placeholder{grid-row:1/3;width:42px!important;height:42px!important;max-width:42px!important;max-height:42px!important}
    .so-search-item strong{grid-column:2;font-size:11px!important;-webkit-line-clamp:2}
    .so-search-item small{grid-column:2;justify-self:start;margin-top:-3px!important;font-size:9.8px!important}
    .so-search-category{min-height:40px;font-size:11px!important}
    .so-search-all{font-size:10.4px!important}
    .straganui-search-page .site-main{width:calc(100% - 28px)!important}
}
