﻿/* دکمه همبرگری */
.navbar-light .navbar-toggler {
    border: none;
    outline: none !important;
    background: transparent;
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
    color: #ff6d34;
    z-index: 2;
    position: relative;
}

/* آیکون همبرگری */
.navbar-light .navbar-toggler-icon {
    width: 1.5em;
    height: 1.5em;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 109, 52, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

@media (max-width: 991px) {
    .navbar-toggler {
        margin-top: 5px;
        margin-left: auto;
    }

    #searchInput {
        width: 180px;
    }
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#navbarSearchResult {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 4px;
}

.navbar-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

    .navbar-search-item img {
        width: 40px;
        height: 40px;
        object-fit: cover;
        border-radius: 4px;
    }

    .navbar-search-item:hover {
        background-color: #f5f5f5;
    }

/* ---------------- Dropdown ها ---------------- */

/* دسکتاپ: باز شدن با هاور */
@media (min-width: 992px) {
    /* منوهای داخل navbar */
    .navbar-nav .dropdown-menu {
        margin-top: 0;
    }

    /* با هاور روی آیتم، منو باز شود */
    .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block;
        visibility: visible;
        opacity: 1;
    }
}

/* موبایل: نمایش بر اساس کلاس show که با JS اضافه می‌کنیم */
@media (max-width: 991.98px) {

    /* پیش‌فرض: منوهای کشویی مخفی باشند */
    .navbar-nav .dropdown-menu {
        display: none;
        position: static; /* داخل خود منوی باز شده قرار بگیرد */
        float: none;
        width: 100%; /* زیرمنو هم عرض آیتم مادر در موبایل */
    }

    /* وقتی روی li.dropdown کلاس show بخورد، منو دیده شود */
    .navbar-nav .dropdown.show > .dropdown-menu {
        display: block;
    }
}

/* حذف فلش کنار آیتم‌های کشویی (اختیاری) */
.navbar .dropdown-toggle::after {
    display: none;
}
