.sc-search-ready{
    position:relative;
    z-index:300;
}

.sc-search-panel{
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    right:0;
    background:#fff;
    border:1px solid #dfe9e4;
    border-radius:14px;
    box-shadow:0 18px 45px rgba(20,45,35,.16);
    overflow:hidden;
    max-height:min(620px,72vh);
    overflow-y:auto;
    z-index:1200;
}

.sc-search-panel[hidden]{
    display:none !important;
}

.sc-search-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:11px 14px;
    background:#f7faf8;
    border-bottom:1px solid #e5ece8;
    font-size:12px;
}

.sc-search-heading strong{
    text-transform:uppercase;
    letter-spacing:.08em;
    color:#167657;
}

.sc-search-heading span{
    color:#718078;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.sc-search-item{
    display:grid;
    grid-template-columns:52px minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    padding:11px 14px;
    text-decoration:none;
    color:#17221d;
    background:#fff;
    border-bottom:1px solid #edf1ef;
    transition:background .15s ease;
}

.sc-search-item:hover,
.sc-search-item.is-active{
    background:#f3faf6;
}

.sc-search-image{
    width:52px;
    height:52px;
    border:1px solid #e5ece8;
    border-radius:9px;
    background:#fff;
    display:grid;
    place-items:center;
    overflow:hidden;
}

.sc-search-image img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.sc-search-placeholder{
    font-size:23px;
    font-weight:900;
    color:#0f8f63;
}

.sc-search-info{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:3px;
}

.sc-search-info strong{
    display:block;
    font-size:14px;
    line-height:1.3;
    overflow:hidden;
    text-overflow:ellipsis;
}

.sc-search-category{
    font-size:10px;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:#0f8f63;
    font-weight:800;
}

.sc-search-generic{
    display:block;
    color:#697870;
    font-size:11px;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.sc-search-price{
    min-width:90px;
    text-align:right;
    display:flex;
    flex-direction:column;
    gap:4px;
}

.sc-search-price strong{
    font-size:13px;
    white-space:nowrap;
}

.sc-search-stock{
    font-size:10px;
    font-weight:700;
    color:#18855e;
}

.sc-search-stock.is-out{
    color:#9a4d4d;
}

.sc-search-all{
    display:block;
    padding:13px 15px;
    text-align:center;
    text-decoration:none;
    font-size:13px;
    font-weight:800;
    color:#0f7958;
    background:#f7faf8;
}

.sc-search-all:hover{
    background:#edf7f1;
}

.sc-search-loading,
.sc-search-empty{
    padding:22px 16px;
    text-align:center;
    color:#68766f;
}

.sc-search-loading{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    font-size:13px;
}

.sc-search-loading span{
    width:16px;
    height:16px;
    border:2px solid #d6e5de;
    border-top-color:#0f8f63;
    border-radius:50%;
    animation:scSearchSpin .7s linear infinite;
}

.sc-search-empty strong{
    display:block;
    color:#24312b;
    margin-bottom:5px;
}

.sc-search-empty small{
    display:block;
    color:#75827c;
}

@keyframes scSearchSpin{
    to{
        transform:rotate(360deg);
    }
}

@media(max-width:700px){

    .sc-search-panel{
        left:-5px;
        right:-5px;
        max-height:68vh;
    }

    .sc-search-item{
        grid-template-columns:44px minmax(0,1fr);
        padding:10px;
    }

    .sc-search-image{
        width:44px;
        height:44px;
    }

    .sc-search-price{
        grid-column:2;
        min-width:0;
        text-align:left;
        flex-direction:row;
        align-items:center;
        gap:9px;
    }

    .sc-search-generic{
        max-width:100%;
    }
}


/* =========================================================
   SPEEDACURE LARGE PREDICTIVE SEARCH OVERLAY
   ========================================================= */

body.sc-search-open{
    overflow:hidden;
}

.sc-search-backdrop{
    position:fixed;
    inset:0;
    background:rgba(17,31,25,.52);
    backdrop-filter:blur(2px);
    z-index:4998;
}

.sc-search-backdrop[hidden],
.sc-search-shell[hidden]{
    display:none !important;
}

.sc-search-shell{
    position:fixed;
    top:82px;
    left:50%;
    transform:translateX(-50%);
    width:min(920px,calc(100vw - 30px));
    max-height:calc(100vh - 110px);
    background:#fff;
    border-radius:16px;
    box-shadow:
        0 24px 75px rgba(10,35,25,.28);
    overflow:hidden;
    z-index:5000;
}

.sc-search-shell-header{
    min-height:72px;
    padding:14px 18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    background:#fff;
    border-bottom:1px solid #e4ebe7;
}

.sc-search-shell-title{
    min-width:0;
    display:flex;
    align-items:center;
    gap:12px;
}

.sc-search-shell-icon{
    width:40px;
    height:40px;
    flex:0 0 40px;
    display:grid;
    place-items:center;
    border-radius:10px;
    background:#eef8f3;
    color:#0f8f63;
    font-size:23px;
    font-weight:900;
}

.sc-search-shell-title div{
    min-width:0;
}

.sc-search-shell-title strong{
    display:block;
    font-size:16px;
    color:#1d3027;
}

.sc-search-shell-title small{
    display:block;
    margin-top:2px;
    color:#78847e;
    font-size:11px;
}

.sc-search-shell-close{
    width:38px;
    height:38px;
    flex:0 0 38px;
    display:grid;
    place-items:center;
    padding:0;
    border:0;
    border-radius:50%;
    background:#f2f5f3;
    color:#50615a;
    font-size:25px;
    line-height:1;
    cursor:pointer;
}

.sc-search-shell-close:hover{
    background:#e6efea;
    color:#0f7958;
}


/*
 * Override the original little dropdown.
 */

.sc-search-shell .sc-search-panel{
    position:relative !important;
    top:auto !important;
    left:auto !important;
    right:auto !important;
    width:100%;
    max-height:calc(100vh - 190px);
    border:0;
    border-radius:0;
    box-shadow:none;
    overflow-y:auto;
    background:#f4f7f8;
}


/* GROUP SECTIONS */

.sc-search-shell .sc-predict-group{
    padding:14px 16px 16px;
    margin:0;
    background:#f4f7f8;
    border-bottom:1px solid #dfe6e3;
}

.sc-search-shell .sc-predict-title{
    padding:0 2px 10px;
    font-size:12px;
    font-weight:800;
    color:#607384;
}


/* MATCHING SEARCHES */

.sc-search-shell .sc-predict-searches{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.sc-search-shell .sc-predict-chip{
    min-height:34px;
    padding:7px 13px;
    border:1px solid #dde5e2;
    border-radius:18px;
    background:#fff;
    box-shadow:0 1px 3px rgba(0,0,0,.03);
}


/* MATCHING PRODUCTS */

.sc-search-shell .sc-predict-products{
    display:grid;
    grid-template-columns:
        repeat(2,minmax(0,1fr));
    gap:9px;
}

.sc-search-shell .sc-search-item{
    min-width:0;
    border:1px solid #dfe7e3;
    border-radius:10px;
    background:#fff;
    box-shadow:
        0 1px 3px rgba(20,50,36,.04);
}

.sc-search-shell .sc-search-item:hover,
.sc-search-shell .sc-search-item.is-active{
    border-color:#acd4c2;
    background:#f7fcf9;
    box-shadow:
        0 4px 12px rgba(20,70,45,.08);
}


/* MATCHING CATEGORIES */

.sc-search-shell .sc-predict-categories{
    display:grid;
    grid-template-columns:
        repeat(2,minmax(0,1fr));
    gap:9px;
}

.sc-search-shell .sc-predict-category{
    min-height:58px;
    border:1px solid #dfe7e3;
    background:#fff;
    box-shadow:
        0 1px 3px rgba(20,50,36,.04);
}

.sc-search-shell .sc-predict-category:hover{
    border-color:#acd4c2;
    background:#f7fcf9;
}


/* VIEW ALL */

.sc-search-shell .sc-search-all{
    display:block;
    padding:15px;
    border-top:1px solid #dde6e1;
    background:#fff;
    color:#0f7958;
    font-size:13px;
    font-weight:800;
    text-align:center;
}

.sc-search-shell .sc-search-all:hover{
    background:#f2faf6;
}


/* TABLET */

@media(max-width:760px){

    .sc-search-shell{
        top:65px;
        width:calc(100vw - 18px);
        max-height:calc(100vh - 80px);
        border-radius:13px;
    }

    .sc-search-shell-header{
        min-height:62px;
        padding:11px 13px;
    }

    .sc-search-shell-title small{
        display:none;
    }

    .sc-search-shell .sc-search-panel{
        max-height:calc(100vh - 145px);
    }

    .sc-search-shell .sc-predict-products,
    .sc-search-shell .sc-predict-categories{
        grid-template-columns:1fr;
    }

    .sc-search-shell .sc-predict-group{
        padding:12px;
    }
}


/* SMALL MOBILE */

@media(max-width:480px){

    .sc-search-shell{
        top:8px;
        width:calc(100vw - 12px);
        max-height:calc(100vh - 16px);
    }

    .sc-search-shell .sc-search-panel{
        max-height:calc(100vh - 80px);
    }

    .sc-search-shell-title strong{
        font-size:14px;
    }

    .sc-search-shell-icon{
        width:34px;
        height:34px;
        flex-basis:34px;
    }
}
