
/* -------------------------------------------------------------------------- */
/*                  this section is for layout of the header                  */
/* -------------------------------------------------------------------------- */
.header {
    min-height: 70px;
    display: flex;
    flex-direction: column;
    margin-inline: auto;
}

.header_Top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo nav tool";
    align-items: center;
    gap: 1.5rem;
    padding-block: 8px;
}

.header_Top_Wrapper {
    background-color: var(--mc5);
}

.header__Logo {
    grid-area: logo;
}

.header__Menu {
    grid-area: nav;
}

.header__Tools_Wrapper {
    grid-area: tool;
    justify-content: flex-end;
    display: flex;
    align-items: center;
}

@media (max-width:991px) {
    .header_Top {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "nav logo";
        align-items: center;
        padding-block: 1.125rem;
    }

    .header__MainLogo {
        display: block;
        margin-right: auto;
    }

    .header_Top {
        display: flex;
    } 

    .header__Tools_Wrapper {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
}


.header__Menu .txt-menu {
    color: var(--tc1);
    font-weight: 400;
    font-size: var(--fz-md);
}

.header__Main_Menu .header__Drop,
.header_Cat_Pane {
    width: 100%;
    position: absolute;
    display: none !important;
    min-width: 867px;
    padding: 1.5rem;
    background: #fff;
    z-index: 99;
    right: 0;
    top: 113px;
    display: block;
}

.header_Cat_Pane.active {
    display: block !important;
}

.header_Cat_Pane .container {
    display: flex;
    justify-content: space-between;
    height: 100%;
}

@media (min-width:991px) {
    #dnn_HeaderCategoryPane {
        border-left: 1px solid #E9E9E9;
    }    
}


.header_Cat_Pane {
    min-height: 450px;
    height: 450px;
}

.header_Cat_Pane .SCat-Main > .SCat-have-sub-menu > .SCat-sub-menu {
    position: absolute;
    display: none;
}

.header_Cat_Pane .SCat-Main > .SCat-have-sub-menu.active > .SCat-sub-menu {
    top: 0;
    right: 100%;
    width: max-content;
    padding-inline: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    flex-wrap: wrap;
    column-gap: 3rem;
    padding-block: 10px;
}

.header_Cat_Pane .SCat-Main > .SCat-have-sub-menu.active > .SCat-sub-menu > li {
    list-style: disc;
    list-style-position: inside;
}

.header_Cat_Pane .SCat-Main > .SCat-have-sub-menu.active > .SCat-sub-menu > li > a {
    font-size: var(--fz-md);
    color: var(--tc2);
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
}

.header_Cat_Pane .SCat-Main > .SCat-have-sub-menu.active > .SCat-sub-menu > li > ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header_Cat_Pane .SCat-Main > .SCat-have-sub-menu.active > .SCat-sub-menu > li > ul > li > a {
    font-size: var(--fz-md);
    font-weight: 400;
    color: var(--tc3);
}

.header_Cat_Pane .SCat-Main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.header_Cat_Pane .SCat-Main > li {
    background-color: #F5F5F5;
    padding-block: 10px;
    padding-inline: 1rem;
    border: 1px solid transparent;
}

.header_Cat_Pane .SCat-Main > li.active {
    background-color: #fff;
    border-color: var(--mc1);
}

.header_Cat_Pane .SCat-Main > li > a {
    font-size: var(--fz-md);
    color: var(--tc2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header_Cat_Pane .SCat-Main > li > a::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 9px;
    background: url(/Portals/0/Images/chev-down.svg) no-repeat;
    margin-right: 1rem;
    transition: var(--transition);
    rotate: 90deg;
    background-size: contain;
}

.header__Menu  li {
    position: relative;
}

@media (min-width:992px) {
    .header__Menu  li::before {
        content: "";
        bottom: -2px;
        position: absolute;
        width: 0;
        height: 2px;
        background: var(--mc1);
        transition: var(--transition);
    }
    
    .header__Menu  li:hover::before {
        width: 100%;
    }
    
}


@media (min-width:992px) {
    .wb__Dropdown_Menu    {
        position: absolute;
        top: 2.25rem;
        width: 120px;
        background: #fff;
        padding-inline: 1rem;
        padding-block: 1rem;
        left: -90%;
        z-index: 2;
        display: none !important;
    }

    .header_Cat_Pane .SCat-Main .SCat-sub-menu  li a:hover {
        color: var(--mc1) !important;
    }

    .wb__Dropdown_Menu.active {
        display: block !important;
    }

    .wb__Dropdown_Menu .nav-pills {
        flex-direction: column;
    }
}

.header__Menu  li:has(span[data-hover='خدمات']) {
    cursor: pointer;
}

.header__Menu  li:has(span[data-hover='خدمات'])::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 9px;
    background: url(/Portals/0/Images/chev-down.svg) no-repeat;
    margin-right: 4px;
    transition: var(--transition);
    background-size: contain;
}

.header__Menu  li:has(span[data-hover='خدمات']:hover)::after {
    rotate: 180deg;
}

.header__Menu:has(.header_Cat_Pane:hover) li:has(span[data-hover='خدمات'])::after {
    rotate: 180deg;
}


span[data-hover='خدمات']::before {
    content: "";
    inset: 0;
    position: absolute;
    width: 150%;
    height: 200%;
    right: 50%;
    translate: 50%;
}

.header__Menu:has(span[data-hover='خدمات']:hover) .header_Cat_Pane.header_Cat_Pane.header_Cat_Pane {
    display: block !important;
}

.header_Cat_Pane:hover {
    display: block !important;
}

/* bottom header */
.header_Bottom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "text logo bottomTool";
    align-items: center;
    padding-block: 8px;
    gap: 1rem;
}

.header__BottomTools_Wrapper {
    grid-area: bottomTool;
}
.header__Logo {
    grid-area: logo;
    display: block;
    margin-inline: auto;
}

.header_24 {
    grid-area: text;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header_24 img {
    filter: brightness(0) saturate(100%) invert(66%) sepia(30%) saturate(2126%) hue-rotate(329deg) brightness(102%) contrast(101%);
}

.header_24 p {
    font-size: var(--fz-md);
    font-weight: 400;
    line-height: 27.2px;
    text-align: right; 
    color: var(--tc2);
} 

/* --------------------------------------- */

@media (max-width:991px) {
    .header__Menu  li:has(span[data-hover='خدمات']) {
        display: none;
    }    
}

.header_Nav_Desktop {
    display: flex;
    align-items: center;  
}

.header__CategoryBtn {
    --icon: 12px;
}

.header__Tools__Item {
    --icon: 1.5rem;
}

.header__Tools_Wrapper a {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.header_Nav_Desktop ul.nav {
    gap: 3rem;
}

.header__BottomTools_Wrapper {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-end;
}

.header_Basket__Wrapper {
    display: flex;
}


/* handle nav menu in mobile and desktop */

@media (max-width:991px) {
    .header_Nav_Desktop {
        display: none;
    }    
}


.Main__Menu li {
    margin-left: 10px;
}

.Main__Menu li.active {
    border-bottom: 1px solid;
}

.header .menu .navbar_out {
    height: 100%;
}

.header .menu .navbar {
    padding: 0;
    height: 100%;
}


@media (max-width:991px) {
    .header__BottomTools_Wrapper {
        display: none !important;
    }

    .header_Bottom .header__Logo {
        display: none !important;
    }

    .header_Bottom {
        display: flex;
        justify-content: center;
    }
}

/* -------------------------------------------------------------------------- */
/*                                  drop down                                 */
/* -------------------------------------------------------------------------- */

.wb_Dropdown__Menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 10rem;
    padding: 0.5rem;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: right;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    opacity: 0;
    transform: translateY(20%);
    transition: all ease-in 0.3s;
    pointer-events: none;
}
.wb_Dropdown__Menu .nav-pills {
    flex-direction: column;
}

.wb_Dropdown__Menu.active {
    opacity: 1;
    transform: translateY(0);
    transition: all ease-in 0.3s;
    pointer-events: auto;
}

.wb__dropdown {
    position: relative;
}

.wb__dropdown i {
    font-size: inherit;
    color: inherit;
}

/* -------------------------------------------------------------------------- */
/*                                  Ajax Basket                               */
/* -------------------------------------------------------------------------- */

.AjaxMiniCartWrapper .icon-cart {
    background: url(../Images/basket.svg) no-repeat center;
    width: 24px;
    max-width: unset;
    margin: 0;
    background-size: 24px !important;
    height: 24px;
}

.AjaxMiniCartWrapper svg {
    display: none;
}

.AjaxMiniCartWrapper #cart {
    padding: 0;
}

.AjaxMiniCartWrapper #cartNum .num {
    top: 20%;
    right: -35%;
    transform: translateY(-50%);
    background-color: var(--tc2);
    color: #fff;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* color: #fff; */
}

.AjaxMiniCartWrapper .cartInfo {
    left: 0;
    right: auto;
    z-index: 999;
    padding-top: 1rem !important;
    top: 25px !important;
}

.AjaxMiniCartWrapper .cartInfo-wrap:after {
    left: 12px;
    right: auto;
}

/* -------------------------------------------------------------------------- */
/*                                 HEADER SEARCH                              */
/* -------------------------------------------------------------------------- */
.searchBoxContainer .search-icon::before {
    content: "";
    background-color: var(--bw-fade-5);
    height: 24px;
    width: 24px;
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    vertical-align: middle;
    mask: url(../Images/search.svg) no-repeat center;
    mask-size: cover;
    -webkit-mask: url(../Images/search.svg) no-repeat center;
    -webkit-mask-size: cover;
    top: 50% !important;
    translate: 0 -50%;
}

.header__Search_Btn:has(.searchBoxContainer.open) .header_Search_Icon {
    display: none;
}

.header_Search_Icon {
    display: flex;
    cursor: pointer;
}

@media all and (min-width: 991px) {
    .header__Search_Btn {
        position: relative;
        margin-inline-end: -0.75rem;
        width: 328px;
        justify-content: flex-end;
    }

    .header__Search_Btn > .WbIcon {
        position: absolute;
        top: 50%;
        left: 0.75rem;
        translate: 0 -50%;
    }

    .header__Search__Content {
        width: 100%;
        position: absolute;
        bottom: -1px;
        left: 0;
        background-color: #fff;
        display: none;
    }

    .header__Search__Content.active {
        display: block;
    }

    .ModWBAdvanceSearchC {
        width: 100%;
        /* max-width: 600px; */
        margin: 0 auto;
        height: 40px;
    }

    .headerSearch__Content::before {
        content: "";
        display: block;
        position: fixed;
        width: 100%;
        height: calc(100% - 80px);
        background: rgba(29, 43, 71, 0.8);
        left: 0;
        bottom: 0;
        z-index: -1;
    }

    .searchBoxContainer {
        display: flex;
        align-items: center;
        column-gap: 1rem;
        background-color: #e9e9e9;
        padding-inline-end: 0.75rem;
        width: 0;
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        border-radius: 0;
        margin-left: 24px;
    }

    .searchBoxContainer.open {
        opacity: 1;
        width: 293px;
        pointer-events: all;
    }

    .searchBoxContainer .search-icon {
        display: block;
        width: var(--icon);
        height: var(--icon);
        min-width: var(--icon);
        min-height: var(--icon);
        mask: url(/Portals/0/Images/search.svg) no-repeat center;
        mask-size: cover;
        -webkit-mask: url(/Portals/0/Images/search.svg) no-repeat center;
        -webkit-mask-size: cover;
        background-color: var(--bw-fade-5);
        cursor: pointer;
    }

    .searchBoxContainer .closeBtn {
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
    }

    .searchBoxContainer .closeBtn img {
        width: 20px;
        height: 20px;
    }

    .searchBoxContainer .search-icon::before {
        display: none;
    }
}

#txtAdvanceSearch {
    text-indent: 0;
    border-radius: 0;
    border: unset;
    box-shadow: unset;
    height: 40px;
    padding-inline-start: 1rem;
    background-color: #e9e9e9 !important;
}

#txtAdvanceSearch::placeholder {
    font-size: var(--fz-sm);
    line-height: 24px;
    color: #595959;
}

#resultAdvanceSearch {
    box-shadow: 0 5px 10px 0px #d2d2d240;
}

#resultAdvanceSearch .category-content,
#resultAdvanceSearch .product-content,
.search-result .category-content .search-name,
.search-result .product-content .product-name {
    color: var(--tc1);
    text-transform: capitalize;
}

#resultAdvanceSearch .product-content img {
    border: 1px solid #dadada;
    border-radius: 5px;
    margin-inline-start: 5px;
}

/* -------------------------------------------------------------------------- */
/*                                 RESPONSIVE                                 */
/* -------------------------------------------------------------------------- */

@media all and (max-width: 991px) {
    .Mobile__Menu_Icon {
        display: flex;
        flex-direction: column;
        width: 18px;
        height: 18px;
        cursor: pointer;
        position: relative;
    }

    /* *header sideMenu */

    .sidebar_header__Logo {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.5rem 0 .5rem;
        border-bottom: var(--mc1) solid 3px;
        margin-bottom: 1rem;
    }

    .menu__ShadowBox {
        width: 110vw;
        height: 110vh;
        position: fixed;
        background-color: black;
        opacity: 0.8;
        top: 0;
        left: 0;
        transform: translate(-5%, -5%);
        z-index: 998;
        display: none;
    }

    .show-effect .menu__ShadowBox {
        display: block;
    }

    .header__ProductCtg .SCat-Main {
        padding: 0rem 1rem;
        height: calc(100vh - 220px);
        max-height: calc(100vh - 220px);
        height: calc(100dvh - 220px);
        max-height: calc(100dvh - 220px);
        overflow-y: scroll;
        overflow-x: hidden;
    }

    .Main__Menu_Mobile {
        visibility: hidden;
        opacity: 0;
        transform: translateX(100%);
        min-width: 100vw;
        width: 100vw;
        z-index: 999;
        position: fixed;
        top: 0px;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        background: var(--white);
        align-content: flex-start;
        transition: var(--transition);
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        padding-bottom: 20%;
        overflow-y: hidden;
    }

    .header__Menu_Close,
    .bottom__Menu_Close {
        position: absolute;
        top: 1.5rem;
        right: 1rem;
        --icon-color: var(--tc1);
    }

    .show-effect .Main__Menu_Mobile {
        opacity: 1;
        visibility: visible;
        transform: translateX(0px);
        overflow-x: hidden;
    }

    .page_Scrolled__Down .Main__Menu_Mobile {
        transform: translate(100%, 100px);
    }

    .page_Scrolled__Down .show-effect .Main__Menu_Mobile {
        transform: translate(0%, 100px);
    }

    .Main__Menu_Mobile .nav.nav-pills > li {
        text-align: right;
        width: 100%;
        margin: 0px;
        font-weight: var(--fw-400);
        padding: 12px 0;
        border-bottom: dashed var(--mc2-fade-4) 1px;
    }

    .header__Menu .nav > li > a {
        display: block;
        margin-bottom: 0;
    }

    .nav.nav-pills {
        display: flex;
        flex-direction: column;
        justify-content: start;
        align-items: center;
        width: 100%;
        padding: 0;
    }

    .nav.nav-pills > li {
        transition: var(--transition);
        display: flex;
        align-items: center;
        width: 100%;
    }

    .nav.nav-pills > li.active {
        font-weight: var(--fw-600);
    }

    /* !header sideMenu End  */

    /*------------------------------------------------*/
    /* Start Submenu Menu */
    /*------------------------------------------------*/

    .Main__Menu li.dropdown > a:after {
        position: absolute;
        left: -15px;
        top: 5px;
        color: #fff;
    }

    .Main__Menu li.dropdown b:after {
        color: #fff;
    }

    .Main__Menu .nav.nav-pills > li.dropdown a {
        pointer-events: none;
    }

    .Main__Menu .nav-pills li.dropdown .dropdown-menu {
        position: relative;
        float: none;
        top: 0;
        background: transparent;
        text-align: center;
        display: none;
    }

    /*------------------------------------------------*/
    /* End Submenu Menu */
    /*------------------------------------------------*/
}
