﻿
.navbar_3 {
    background: #fff;
    display: flex;
    justify-content: center;
    border-top:2px solid black;
    margin-top:.5rem;

}

.nav-3 {
    width: 1200px;
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 0px;
    margin-bottom: 0px;
    justify-content:center;
}

.nav-item {
    list-style: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    user-select: none;
}
.nav-icon-1 {
    font-size: 20px;
    color: orange;
}

.nav-icon {
    font-size: 14px;
    color: orange;
}

.arrow {
    font-size: 11px;
    margin-right: 4px;
    transition: .3s;
}

.nav-link-3 {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    cursor: pointer;
    padding: .6rem;
}

    .nav-link-3:hover {
        color: chocolate;
    }

.has-mega .nav-link-3 {
    display: flex;
    align-items: center;
    gap: 6px;
}


.mega-menu {
    position: absolute;
    top: 100%;
    right: -5%; 
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    width: 1000px; 
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,.18);
    z-index: 1000;
}


.nav-item.has-mega.open .mega-menu {
    display: grid !important;
}

.mega-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 6px;
    white-space: nowrap;
    transition: .15s;
}

    .mega-item i {
        font-size: 11px;
        color: orange;
    }

    .mega-item:hover {
        background: #f1f5f9;
        color: #2563eb;
    }

.mega-item-parent {
    position: relative; 
}

.sub-mega-menu {
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    flex-direction: column;
    gap: 4px;
    padding: 6px 10px;
    background: #f9fafb;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    z-index: 1000;
    min-width: 180px;
}
.mega-item-parent:hover .sub-mega-menu {
    display: flex;
}


.sub-mega-item {
    padding: 4px 6px;
    border-radius: 6px;
    text-decoration: none;
    color: #334155;
    transition: .15s;
}

    .sub-mega-item:hover {
        background: #f1f5f9;
        color: #2563eb;
    }


.has-mega.open .arrow {
    transform: rotate(180deg);
}
:root {
    --orange: #FF9800;
    --bg-gray: #f5f5f5;
}

.main-header {
    background: #fff;
    direction: rtl;
    padding-top: 10px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.icon-orange {
    color: var(--orange) !important;
    font-size: 30px;
}


.header-top-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 10px;
    margin: auto;
    max-width: 1000px;
}


.header-logo img {
    width: 150px;
    height: auto;
}

@media (min-width: 992px) {
    .header-logo img {
        width: 250px;
    }
}



.search-box-wrap {
    display: flex;
    background: var(--bg-gray);
    border-radius: 8px;
    overflow: hidden;
    max-width: 1000px;
    margin: auto;
}

    .search-box-wrap input {
        border: none;
        background: transparent;
        width: 100%;
        padding: 8px 15px;
        outline: none;
        font-size: 14px;
        max-width: 1000px;
    }

    .search-box-wrap button {
        border: none;
        background: var(--orange);
        color: #fff;
        padding: 0 15px;
    }


.header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tool-link {
    text-decoration: none;
    color: #444;
    font-size: 30px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge-cart {
    position: absolute;
    top: -8px;
    right: -8px;
    background: red;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
}


.desktop-nav {
    border-top: 1px solid #eee;
    margin-top: 5px;
}

.nav-menu-list {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-link-main {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
}

    .nav-link-main:hover {
        color: var(--orange);
    }

.admin-item {
    border-right: 1px solid #eee;
    margin-right: 10px;
}


@media (max-width: 991px) {
    .header-top-row {
        padding-bottom: 5px;
    }

    .mobile-search-row {
        padding: 10px 0;
    }

    .mobile-menu-btn {
        font-size: 24px;
        color: #333;
    }

    .icon-orange {
        font-size: 20px;
    }

    .main-header {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
}

.header-search {
    position: relative;
}

.search-results-popover {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border-radius: 0 0 12px 12px;
    margin-top: 5px;
    z-index: 1100;
    display: none;
    max-height: 450px;
    overflow-y: auto;
    border: 1px solid #eee;
    max-width: 1000px;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f8f8f8;
    transition: 0.2s;
}

    .search-item:hover {
        background: #f9f9f9;
    }

    .search-item img {
        width: 50px;
        height: 50px;
        border-radius: 8px;
        object-fit: cover;
        margin-left: 12px;
    }

.search-item-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.search-item-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.search-item-price {
    font-size: 12px;
    color: #2ecc71;
    font-weight: bold;
}

.search-item-old-price {
    font-size: 11px;
    color: #aaa;
    text-decoration: line-through;
    margin-left: 5px;
}

.view-all-link {
    display: block;
    padding: 12px;
    text-align: center;
    background: #f1f5f9;
    color: #2563eb;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}

    .view-all-link:hover {
        background: #e2e8f0;
    }


.search-results-popover::-webkit-scrollbar {
    width: 5px;
}

.search-results-popover::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}