
/* BuyListas UI 2.0 — Phase 18.1 Smart Search */

.blui2-hero-search{
    overflow:visible!important;
}

.blui2-live-search-field{
    position:relative!important;
    z-index:30!important;
}

.blui2-live-search-panel{
    position:fixed;
    left:0;
    top:0;
    width:420px;
    z-index:2147483000;
    overflow:hidden;
    border:1px solid #e2e5ea;
    border-radius:16px;
    background:#fff;
    color:#282c34;
    box-shadow:0 24px 65px rgba(0,0,0,.22);
}

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

.blui2-live-search-heading{
    min-height:43px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:0 14px;
    border-bottom:1px solid #eef0f3;
    background:#fafbfc;
}

.blui2-live-search-heading strong{
    font-size:10px;
    font-weight:950;
}

.blui2-live-search-heading button{
    min-height:auto!important;
    padding:5px 8px!important;
    border:0!important;
    border-radius:8px!important;
    background:#fff0e3!important;
    color:#e86600!important;
    box-shadow:none!important;
    font-size:8px!important;
    font-weight:900!important;
}

.blui2-live-search-content{
    max-height:365px;
    overflow:auto;
    overscroll-behavior:contain;
}

.blui2-live-search-item{
    display:grid;
    grid-template-columns:58px minmax(0,1fr) auto;
    align-items:center;
    gap:11px;
    min-height:75px;
    padding:9px 13px;
    border-bottom:1px solid #f0f1f3;
    color:#292d35;
    text-decoration:none;
}

.blui2-live-search-item:hover,
.blui2-live-search-item.is-active{
    background:#fff8f1;
}

.blui2-live-search-image{
    width:58px;
    height:58px;
    display:grid;
    place-items:center;
    overflow:hidden;
    border-radius:12px;
    background:linear-gradient(135deg,#fff0e3,#ffe2c8);
    color:#ff7100;
    font-size:24px;
}

.blui2-live-search-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.blui2-live-search-copy{
    min-width:0;
}

.blui2-live-search-copy strong{
    display:block;
    overflow:hidden;
    color:#2b2f37;
    font-size:11px;
    line-height:1.35;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.blui2-live-search-copy small{
    display:block;
    overflow:hidden;
    margin-top:5px;
    color:#9298a2;
    font-size:8px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.blui2-live-search-price{
    color:#ff7100;
    font-size:10px;
    font-weight:950;
    white-space:nowrap;
}

.blui2-live-search-all{
    min-height:45px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:0 14px;
    background:#fff;
    color:#e86600;
    font-size:9px;
    font-weight:950;
    text-decoration:none;
}

.blui2-live-search-all:hover{
    background:#fff7ef;
}

.blui2-search-empty{
    padding:28px 18px;
    text-align:center;
}

.blui2-search-empty span{
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    margin:0 auto 10px;
    border-radius:14px;
    background:#fff0e3;
    color:#ff7100;
    font-size:22px;
}

.blui2-search-empty strong{
    display:block;
    font-size:12px;
}

.blui2-search-empty p{
    margin:6px 0 0;
    color:#8a9099;
    font-size:9px;
    line-height:1.55;
}

.blui2-recent-searches{
    padding:8px;
}

.blui2-recent-search{
    width:100%;
    min-height:39px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    padding:0 10px!important;
    border:0!important;
    border-radius:10px!important;
    background:#fff!important;
    color:#41464f!important;
    box-shadow:none!important;
    font-size:9px!important;
    text-align:left!important;
}

.blui2-recent-search:hover{
    background:#fff5eb!important;
    color:#e86600!important;
}

.blui2-recent-search span:last-child{
    color:#a0a5ad;
}

.blui2-search-skeleton{
    display:grid;
    grid-template-columns:58px minmax(0,1fr);
    gap:11px;
    padding:9px 13px;
}

.blui2-search-skeleton::before{
    content:"";
    width:58px;
    height:58px;
    border-radius:12px;
    background:linear-gradient(90deg,#f1f2f4,#fafafa,#f1f2f4);
    background-size:200% 100%;
    animation:blui2SearchShimmer 1.15s linear infinite;
}

.blui2-search-skeleton-lines{
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:9px;
}

.blui2-search-skeleton-lines i{
    height:9px;
    display:block;
    border-radius:999px;
    background:linear-gradient(90deg,#f1f2f4,#fafafa,#f1f2f4);
    background-size:200% 100%;
    animation:blui2SearchShimmer 1.15s linear infinite;
}

.blui2-search-skeleton-lines i:first-child{
    width:75%;
}

.blui2-search-skeleton-lines i:last-child{
    width:46%;
}

@keyframes blui2SearchShimmer{
    from{background-position:200% 0}
    to{background-position:-200% 0}
}

@media(max-width:760px){
    .blui2-live-search-panel{
        position:fixed;
        left:10px;
        right:10px;
        top:74px;
        max-height:calc(100vh - 92px);
    }

    .blui2-live-search-content{
        max-height:calc(100vh - 190px);
    }

    .blui2-live-search-item{
        grid-template-columns:52px minmax(0,1fr);
    }

    .blui2-live-search-image{
        width:52px;
        height:52px;
    }

    .blui2-live-search-price{
        grid-column:2;
        margin-top:-4px;
    }
}

@media(prefers-reduced-motion:reduce){
    .blui2-search-skeleton::before,
    .blui2-search-skeleton-lines i{
        animation:none;
    }
}


/* ==========================================================
   Phase 18.1.4 — Clean portal-based Live Search
   ========================================================== */

/*
 * The results panel is moved to <body> by JavaScript and positioned
 * with viewport coordinates. Therefore the Hero needs no z-index,
 * overflow or width overrides.
 */
.blui2-live-search-panel{
    right:auto!important;
    margin:0!important;
    max-width:calc(100vw - 20px)!important;
    box-sizing:border-box!important;
    isolation:isolate;
}

.blui2-live-search-field{
    position:relative!important;
    z-index:auto!important;
}

.blui2-hero-search{
    overflow:hidden!important;
}

/* Restore the exact original Hero behaviour from template.css. */
.blui2-home-hero{
    position:relative;
    overflow:hidden!important;
}

/* Never block clicks in following sections. */
.blui2-home-hero,
.blui2-home-hero-inner,
.blui2-hero-search,
.blui2-live-search-field{
    pointer-events:auto;
}

.blui2-home-hero::before,
.blui2-home-hero::after{
    pointer-events:none!important;
}

/* Header remains naturally clickable without extreme stacking contexts. */
.blui2-header{
    position:relative;
    z-index:1600;
}

/* The real bottom menu keeps its original template.css design. */
@media(max-width:900px){
    .blui2-bottom-nav{
        position:fixed!important;
        left:10px!important;
        right:10px!important;
        bottom:max(10px,env(safe-area-inset-bottom))!important;
        width:auto!important;
        max-width:none!important;
        margin:0!important;
        transform:none!important;
    }
}

@media(max-width:760px){
    .blui2-live-search-panel{
        left:10px!important;
        width:calc(100vw - 20px)!important;
        max-width:calc(100vw - 20px)!important;
    }
}
