/* Shabpush Safe Header V1 */

/* ---------- Shared ---------- */
.bhfb-header .melorin-account-copy{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;
    white-space:nowrap;
    line-height:1.25;
}
.bhfb-header .melorin-account-copy strong{
    font-size:13px;
    font-weight:800;
}
.bhfb-header .melorin-account-copy small{
    margin-top:3px;
    font-size:9px;
    font-weight:500;
    opacity:.62;
}
.bhfb-header .melorin-cart-label{
    font-size:13px;
    font-weight:800;
    white-space:nowrap;
}

.bhfb-header .melorin-product-search-row{
    width:100%;
    box-sizing:border-box;
}
.bhfb-header .melorin-product-search-inner{
    width:100%;
    max-width:1320px;
    margin:0 auto;
    box-sizing:border-box;
}
.bhfb-header .melorin-product-search{
    display:flex;
    direction:rtl;
    width:100%;
    height:50px;
    margin:0;
    padding:0;
    overflow:hidden;
    background:#fff;
    border:1px solid #ded4d8;
    border-radius:13px;
    box-sizing:border-box;
}
.bhfb-header .melorin-product-search input[type="search"]{
    flex:1 1 auto;
    width:100%;
    min-width:0;
    height:48px;
    margin:0;
    padding:0 18px;
    border:0;
    outline:0;
    box-shadow:none;
    background:#fff;
    direction:rtl;
    text-align:right;
    font-family:"EstedadLocal",Arial,Helvetica,sans-serif;
    font-size:13px;
    color:#3c3035;
}
.bhfb-header .melorin-product-search input[type="search"]::placeholder{
    color:#8b7f84;
    opacity:1;
}
.bhfb-header .melorin-product-search button{
    flex:0 0 54px;
    width:54px;
    height:48px;
    margin:0;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:0;
    background:#982e5a;
    color:#fff;
    cursor:pointer;
    box-shadow:none;
}
.bhfb-header .melorin-product-search button:hover{
    background:#7f244b;
}
.bhfb-header .melorin-product-search button svg{
    width:20px;
    height:20px;
    display:block;
}

/* ---------- Desktop ---------- */
@media (min-width:1025px){
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .bhfb-main_header_row{
        padding:12px 0 8px;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .bhfb-main_header_row .container-fluid,
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .melorin-product-search-inner{
        max-width:1320px;
        margin-left:auto;
        margin-right:auto;
        padding-left:24px;
        padding-right:24px;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .bhfb-main_header_row .bhfb-row{
        display:flex;
        direction:rtl;
        align-items:center;
        width:100%;
        gap:18px;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .bhfb-main_header_row .bhfb-column-1{
        width:auto;
        flex:0 0 auto;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .bhfb-main_header_row .bhfb-column-2{
        width:auto;
        flex:0 0 auto;
        margin-inline-start:auto;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .bhfb-main_header_row .bhfb-column-3{
        display:none;
    }

    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .site-branding{
        display:flex;
        align-items:center;
        gap:9px;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .custom-logo{
        width:72px;
        max-width:72px;
        height:72px;
        max-height:72px;
        object-fit:contain;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .site-title{
        margin:0;
        font-size:17px;
        font-weight:800;
        line-height:1.4;
    }

    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .bhfb-component-woo_icons{
        display:flex;
        align-items:center;
        gap:10px;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .wc-account-link{
        display:flex;
        direction:rtl;
        align-items:center;
        gap:10px;
        min-width:174px;
        height:58px;
        padding:7px 13px;
        border:1px solid #e2d7db;
        border-radius:13px;
        background:#fff;
        box-sizing:border-box;
        color:#292126;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .wc-account-link .ws-svg-icon{
        flex:0 0 auto;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .cart-contents{
        display:flex;
        direction:rtl;
        align-items:center;
        gap:8px;
        height:58px;
        padding:7px 13px;
        border:1px solid #e2d7db;
        border-radius:13px;
        background:#fff;
        box-sizing:border-box;
        color:#292126;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .cart-count{
        position:relative;
    }
    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .count-number{
        top:-10px;
        right:-8px;
    }

    .bhfb-header.bhfb-desktop.melorin-safe-header-ready .melorin-product-search-row{
        padding:2px 0 15px;
    }
}

/* ---------- Mobile ---------- */
@media (max-width:1024px){
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-above_header_row{
        padding:8px 0;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-above_header_row .container-fluid{
        padding-left:12px;
        padding-right:12px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-above_header_row .bhfb-row{
        display:flex;
        direction:rtl;
        flex-wrap:wrap;
        align-items:center;
        justify-content:center;
        gap:10px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-above_header_row .bhfb-column-2{
        display:none;
    }

    /* account + cart first */
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-above_header_row .bhfb-column-3{
        order:1;
        width:100%;
        display:flex;
        justify-content:center;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-component-woo_icons{
        display:flex;
        direction:rtl;
        align-items:center;
        justify-content:center;
        gap:8px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .wc-account-link{
        display:flex;
        direction:rtl;
        align-items:center;
        gap:7px;
        min-width:145px;
        height:50px;
        padding:6px 10px;
        border:1px solid #e2d7db;
        border-radius:12px;
        background:#fff;
        box-sizing:border-box;
        color:#292126;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .melorin-account-copy strong{
        font-size:11px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .melorin-account-copy small{
        font-size:7.5px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .cart-contents{
        display:flex;
        align-items:center;
        justify-content:center;
        width:50px;
        height:50px;
        padding:0;
        border:1px solid #e2d7db;
        border-radius:12px;
        background:#fff;
        box-sizing:border-box;
        color:#292126;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .melorin-cart-label{
        display:none;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .cart-count{
        position:relative;
    }

    /* logo second */
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-above_header_row .bhfb-column-1{
        order:2;
        width:100%;
        display:flex;
        justify-content:center;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .site-branding{
        display:flex;
        direction:rtl;
        align-items:center;
        justify-content:center;
        gap:8px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .custom-logo{
        width:62px;
        max-width:62px;
        height:62px;
        max-height:62px;
        object-fit:contain;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .site-title{
        margin:0;
        font-size:15px;
        font-weight:800;
        line-height:1.4;
    }

    /* full width search */
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .melorin-product-search-row{
        padding:5px 12px 8px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .melorin-product-search{
        height:46px;
        border-radius:11px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .melorin-product-search input[type="search"]{
        height:44px;
        font-size:12px;
        padding:0 13px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .melorin-product-search button{
        flex-basis:50px;
        width:50px;
        height:44px;
    }

    /* hamburger row */
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row{
        padding:3px 12px 9px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row .bhfb-row{
        display:flex;
        direction:rtl;
        align-items:center;
        justify-content:flex-start;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row .bhfb-column-2,
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row .bhfb-column-3{
        display:none;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .menu-toggle{
        display:flex;
        align-items:center;
        justify-content:center;
        width:44px;
        height:42px;
        margin:0;
        border-radius:10px;
        background:#982e5a;
        color:#fff;
    }
}

@media (max-width:380px){
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .wc-account-link{
        min-width:132px;
    }
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .melorin-account-copy small{
        display:none;
    }
}

/* Safe Header V1 - mobile hamburger spacing fix */
@media (max-width:1024px){

    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row,
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row .container-fluid,
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row .bhfb-row,
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row .bhfb-column,
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-component-mobile_hamburger{
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
    }

    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row{
        padding:4px 12px 10px!important;
        margin:0!important;
    }

    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row .bhfb-row{
        display:flex!important;
        align-items:center!important;
        justify-content:flex-start!important;
        padding:0!important;
        margin:0!important;
    }

    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-main_header_row .bhfb-column-1{
        display:flex!important;
        align-items:center!important;
        justify-content:flex-start!important;
        width:auto!important;
        flex:0 0 auto!important;
        padding:0!important;
        margin:0!important;
    }

    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .menu-toggle{
        margin:0!important;
    }
}

/* Safe Header V1 - Mobile hierarchy: brand first */
@media (max-width:1024px){

    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-above_header_row{
        padding:8px 0 6px!important;
    }

    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-above_header_row .bhfb-row{
        display:flex!important;
        flex-wrap:wrap!important;
        align-items:center!important;
        justify-content:center!important;
        gap:8px!important;
    }

    /* 1) Logo + store name */
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-above_header_row .bhfb-column-1{
        order:1!important;
        width:100%!important;
        flex:0 0 100%!important;
        display:flex!important;
        justify-content:center!important;
        align-items:center!important;
        margin:0!important;
        padding:0!important;
    }

    /* 2) Account + cart */
    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .bhfb-above_header_row .bhfb-column-3{
        order:2!important;
        width:100%!important;
        flex:0 0 100%!important;
        display:flex!important;
        justify-content:center!important;
        align-items:center!important;
        margin:0!important;
        padding:0!important;
    }

    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .site-branding{
        margin:0 0 2px!important;
    }

    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .custom-logo{
        width:58px!important;
        max-width:58px!important;
        height:58px!important;
        max-height:58px!important;
    }

    .bhfb-header.bhfb-mobile.melorin-safe-header-ready .site-title{
        margin:0!important;
        font-size:15px!important;
        line-height:1.4!important;
    }
}


/* Shabpush Safe Header V1 - native Botiga AJAX results */
.bhfb-header .melorin-product-search{
    position:relative;
    overflow:visible;
}

.bhfb-header .melorin-product-search .botiga-ajax-search__wrapper{
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    left:0;
    z-index:999999;
    max-height:min(70vh,620px);
    overflow-y:auto;
    background:#fff;
    border-radius:12px;
    box-shadow:0 12px 35px rgba(0,0,0,.15);
}

.bhfb-header .melorin-product-search.melorin-ajax-loading:after{
    content:'';
    position:absolute;
    left:52px;
    top:50%;
    width:16px;
    height:16px;
    margin-top:-8px;
    border:2px solid rgba(0,0,0,.15);
    border-top-color:rgba(0,0,0,.65);
    border-radius:50%;
    animation:melorin-search-spin .65s linear infinite;
}

@keyframes melorin-search-spin{
    to{transform:rotate(360deg)}
}

/* SHABPUSH SEARCH BORDER FIX */
@media (min-width:1025px){
    .bhfb-header.bhfb-desktop .melorin-product-search{
        position:relative;
    }

    .bhfb-header.bhfb-desktop .melorin-product-search:before{
        content:"";
        position:absolute;
        inset:0;
        z-index:5;
        pointer-events:none;
        border:1px solid #ded4d8;
        border-radius:13px;
        box-sizing:border-box;
    }
}
