/* ==========================================================================
   Header Desktop Styles - Kimashop
   ========================================================================== */

.bottom_header .container-fluid {
    padding-left: 20px;
    padding-right: 20px;
}

.header-top-row {
    display: flex;
    align-items: center;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.header-bottom-row {
    border-top: none !important;
    min-height: 40px;
    position: relative;
    z-index: 20;
}

.header-logo-section { flex: 0 0 auto; }
.nav-logo img { max-height: 45px; width: auto; display: block; }

.header-search-section {
    flex: 0 1 620px !important;
    margin-right: 60px !important;
    margin-left: auto !important;
}

.search-wrapper {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 5px 6px 5px 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.search-wrapper:hover { background: #ebebeb; }
.search-placeholder { flex-grow: 1; color: #888; font-size: 13px; text-align: right; user-select: none; }
.search-wrapper i {
    width: 32px; height: 32px; margin-left: 10px;
    display: flex; align-items: center; justify-content: center;
    background: #ff2d55; color: #fff; border-radius: 8px;
    font-size: 14px; transition: background 0.2s;
}

.header-actions-section { flex: 0 0 auto; }
.bottom-head-icon { display: flex; align-items: center; gap: 30px !important; }
.btn-header-action { display: flex; align-items: center; flex-direction: row-reverse; gap: 10px; text-decoration: none !important; }
.action-icon-container { display: flex; align-items: center; justify-content: center; position: relative; }
.action-icon-container i { font-size: 24px; color: #333; }
.action-text-container { display: flex; flex-direction: column; justify-content: center; text-align: right; }
.action-label-top { font-size: 12px; color: #777; margin-bottom: 1px; font-weight: 500; }
.action-label-bottom { font-size: 10px; font-weight: 700; color: #111; white-space: nowrap; }
.cart_cunt {
    position: absolute; top: -6px !important; right: -6px !important;
    min-width: 18px; height: 18px; line-height: 18px;
    border-radius: 50%; background: #ff2d55; color: #fff;
    text-align: center; font-size: 10px; font-weight: 700;
}

.bottom_header .navbar { position: relative; padding-top: 0; padding-bottom: 0; }
.bottom_header .navbar-nav { align-items: center; }
.header-bottom-row .nav-link { font-size: 14px; font-weight: 600; padding: 10px 15px !important; color: #222; }
.bottom_header .menu-icon { margin-left: 8px; vertical-align: middle; }
.navbar .navbar-nav li { transition: all 0.3s ease 0s; }
ul.navbar-nav > li:hover > a { color: var(--bg-color-1) !important; }

.dropdown-toggle::after {
    display: inline-block; margin-right: 5px; vertical-align: middle;
    content: "\f078"; font-family: 'Font Awesome 5 Pro', 'Font Awesome 5 Free';
    font-weight: 900; font-size: 0.7rem; border: none;
}

/* Mega Menu Structure */
.mega-menu-layout { display: flex; align-items: stretch; width: 100%; min-height: 380px; direction: rtl; }
.mega-menu-level-2 { width: 280px; min-width: 280px; background: #fafafa; border-left: 1px solid #ececec; padding: 14px 0; }
.mega-menu-level-3 { flex: 1; background: #fff; padding: 22px 24px; min-width: 0; position: relative; }
.mega-level-2-link {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 12px 18px; font-size: 14px; font-weight: 600;
    color: #333; text-decoration: none; transition: all 0.2s ease;
}
.mega-level-2-item.is-active .mega-level-2-link { color: var(--bg-color-1, #ff2d55); background: #fff; font-weight: 700; }
.mega-panel { display: none; animation: fadeInMega 0.2s ease-in-out; }
.mega-panel.is-active { display: block; }
.mega-submenu { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 10px 18px; list-style: none; }

/* Normal Dropdown Styles */
.bottom_header .dropdown-menu:not(.mega-menu-wrapper) {
    min-width: 220px; border: 1px solid #ececec; border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); padding: 8px 0;
}

.bottom_header .navbar-toggler {
    display: none !important;
}

/**/


/* =========================
   Dropdown base
   ========================= */
.bottom_header .dropdown-menu {
    display: none;
    min-width: 220px;
    border: 1px solid #ececec;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 8px 0;
}

/* فقط در حالت باز */
.bottom_header .dropdown-menu.show {
    display: block;
}

/* =========================
   Mega Menu
   ========================= */
.bottom_header .dropdown-mega-menu {
    position: static !important;
}

.bottom_header .dropdown-mega-menu > .mega-menu-wrapper {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 0;
    width: 100% !important;
    border: 1px solid #eaeaea;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 0;
    z-index: 9999;
}

.bottom_header .dropdown-mega-menu > .mega-menu-wrapper.show {
    display: block !important;
}

/* جلوگیری از بهم ریختگی hover روی خود آیتم */
.bottom_header .dropdown-mega-menu:hover > .mega-menu-wrapper {
    display: block;
}
/**/

.bottom_header .header-bottom-row {
    position: relative;
    z-index: 1000;
}

.bottom_header .navbar {
    position: static;
}

.bottom_header .dropdown-mega-menu {
    position: static !important;
}

.bottom_header .dropdown-mega-menu > .mega-menu-wrapper {
    position: absolute;
    right: 0;
    left: 0;
    margin-top: 0 !important;
    transform: none !important;
    z-index: 9999;
}

.bottom_header .header-bottom-row {
    padding-bottom: 0 !important;
}

.bottom_header .navbar-nav {
    margin-bottom: 0 !important;
}

.bottom_header .dropdown-mega-menu > .mega-menu-wrapper {
    margin-top: -2px !important;
}

/**/

#navbarSupportedContent
ul.navbar-nav
> li.dropdown-mega-menu
> div.dropdown-menu.mega-menu-wrapper {
    top: 55px !important;
}

/* =========================================================
   Fixed Header
========================================================= */

.bottom_header {
    position: static !important;
        float: none;
        width: 100%;
        min-width: 100%;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transform: none !important;
}

/* جلوگیری از تغییر حالت هدر در اسکرول */
.bottom_header.sticky,
.bottom_header.scrolled,
.bottom_header.is-sticky,
.bottom_header.sticky-header {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

/* جلوگیری از قرارگرفتن محتوای صفحه زیر هدر */
body {
    padding-top: 135px;
}



/* ==========================================================================
   شماره پشتیبانی دسکتاپ
   ========================================================================== */
.header-support-phone {
    align-items: center;
    white-space: nowrap;
}

.header-support-phone a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--header-text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-support-phone a:hover {
    color: var(--header-primary);
}

.header-support-phone i {
    color: var(--header-primary);
    font-size: 16px;
}



