/* Header tiers and layout */
.header-top {
    background-color: #F8F8F8;
    border-bottom: 1px solid #E5E7EB;
    padding: 8px 0;
}
.header-top-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #6B7280;
}
.header-top .socials a {
    color: #6B7280;
    margin-left: 10px;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}
.header-top .socials a:hover {
    color: #10B981; /* vibrant brand color */
}
/* Desktop language dropdown */
.desktop-lang-dropdown {
    position: relative;
}
.desktop-lang-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    color: #18181B;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.2s ease;
}
.desktop-lang-btn:hover {
    color: #10B981;
}

/* Unified dropdown menus (desktop + mobile) */
.lang-dropdown-menu,
.mobile-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    background: #FFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    min-width: 140px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 1050;
}
.lang-dropdown-menu.show,
.mobile-lang-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown items */
.lang-dropdown-item,
.mobile-lang-option {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    text-decoration: none;
    color: #18181B;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.15s, color 0.15s;
}
.lang-dropdown-item:hover,
.mobile-lang-option:hover {
    background-color: #F3F4F6;
}
.lang-dropdown-item.active,
.mobile-lang-option.active {
    background-color: #E5E7EB;
    font-weight: 600;
}

.header-middle {
    background-color: #FFFFFF;
    padding: 18px 0;
    border-bottom: 1px solid #E5E7EB;
}
.header-middle-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.header-middle .logo-area img, .header-middle .logo-area span {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -1px;
}
.header-middle .search-bar {
    flex: 1;
    position: relative;
}
.header-middle .search-bar input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid #E5E7EB;
    background-color: #F8F8F8;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #111827;
    outline: none;
    transition: border-color 0.2s;
}
.header-middle .search-bar input:focus {
    border-color: #10B981;
}
.header-middle .cart-btn {
    background-color: #10B981;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}
.header-middle .cart-btn:hover {
    background-color: #059669;
}

/* Bottom tier (dark nav) */
.header-bottom {
    background-color: #111827;
    border-bottom: 1px solid #374151;
}

/* درووستکردنی ڕاپەرێکی نوێ بۆ ڕاگرتنی سەهمەکە */
.header-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.header-bottom-inner {
    flex: 1;
    padding: 0 16px;
    padding-right: 60px;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    white-space: nowrap;
    
    /* شاردنەوەی سکڕۆڵ بە تەواوی */
    scrollbar-width: none; /* بۆ فایەرفۆکس */
    -ms-overflow-style: none; /* بۆ ئێدج */
    -webkit-overflow-scrolling: touch;
}

/* شاردنەوەی سکڕۆڵ لە کڕۆم و سەفاری */
.header-bottom-inner::-webkit-scrollbar {
    display: none;
}

.header-bottom-inner a {
    color: #E5E7EB;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 14px 4px;
    display: inline-block;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.header-bottom-inner a.active,
.header-bottom-inner a:hover {
    color: #10B981;
    border-bottom-color: #10B981;
}

/* دیزاینی سەهمەکە */
.more-categories-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    /* درووستکردنی سێبەرێکی تاریک لەپشت سەهمەکە تاوەکو تێکستەکان ون بن لەژێریدا */
    background: linear-gradient(to left, #111827 50%, rgba(17, 24, 39, 0));
    border: none;
    color: #FFFFFF;
    padding: 0 12px 0 16px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    z-index: 10;
}

.more-categories-btn:hover {
    color: #10B981;
}

/* RTL adjustments */
[dir="rtl"] .header-bottom-inner {
    padding-right: 16px;
    padding-left: 60px;
}
[dir="rtl"] .more-categories-btn {
    right: auto;
    left: 0;
    background: linear-gradient(to right, #111827 50%, rgba(17, 24, 39, 0));
    padding: 0 16px 0 12px;
}

/* Mobile sticky header — friend-style */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    height: 56px;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.mobile-header .mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
    text-decoration: none;
}
.mobile-header .mobile-logo-img {
    height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: inline-block;
    border-radius: 8px;
}
.mobile-header .mobile-logo-text {
    display: none;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mobile-header .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.mobile-header .mobile-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #374151;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
    position: relative;
}
.mobile-header .mobile-header-btn:hover,
.mobile-header .mobile-header-btn:focus {
    background-color: #F3F4F6;
    color: #111827;
    outline: none;
}
.mobile-header .mobile-cart-btn {
    color: #10B981;
}
.mobile-header .mobile-cart-btn:hover {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.mobile-header .mobile-lang-wrap {
    position: relative;
}

/* Mobile search bar (collapsible) */
.mobile-search-bar {
    display: none;
    position: sticky;
    top: 56px;
    z-index: 999;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 10px 16px;
}
.mobile-search-bar.open {
    display: block;
    animation: mobile-search-slide 0.2s ease;
}
@keyframes mobile-search-slide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.mobile-search-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #F3F4F6;
    border-radius: 24px;
    padding: 0 12px;
    height: 40px;
}
.mobile-search-icon {
    color: #6B7280;
    font-size: 16px;
    flex-shrink: 0;
}
.mobile-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #111827;
    outline: none;
    height: 100%;
    min-width: 0;
}
.mobile-search-input::placeholder {
    color: #9CA3AF;
}
.mobile-search-close {
    background: none;
    border: none;
    color: #6B7280;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, color 0.15s;
}
.mobile-search-close:hover {
    background-color: #E5E7EB;
    color: #111827;
}

/* Mobile category pills */
.mobile-categories {
    display: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 16px;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    gap: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.mobile-categories::-webkit-scrollbar {
    display: none;
}
.mobile-categories .pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #E5E7EB;
    background-color: #F8F8F8;
    color: #374151;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}
.mobile-categories .pill.active {
    background-color: #10B981;
    color: #FFFFFF;
    border-color: #10B981;
}

/* Side drawer */
.side-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 270px;
    height: 100vh;
    background-color: #111827;
    z-index: 1100;
    transition: left 0.3s ease;
    padding-top: 60px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.2);
    overflow-y: auto;
}
.side-drawer.open {
    left: 0;
}
.side-drawer a {
    display: block;
    padding: 14px 20px;
    color: #E5E7EB;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    border-bottom: 1px solid #374151;
    transition: color 0.2s;
}
.side-drawer a:hover {
    color: #10B981;
}
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1050;
    display: none;
}
.drawer-overlay.open {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .header-top, .header-middle, .header-bottom {
        display: none;
    }
    .mobile-header {
        display: flex;
    }
    .mobile-categories {
        display: flex;
    }
}

/* Firefox Scrollbar for Side Drawer */
.side-drawer {
    scrollbar-width: thin;
    scrollbar-color: #374151 transparent;
}

/* WebKit (Chrome/Safari/Edge) Scrollbar for Side Drawer */
.side-drawer::-webkit-scrollbar {
    width: 5px;
}

.side-drawer::-webkit-scrollbar-track {
    background: transparent;
}

.side-drawer::-webkit-scrollbar-thumb {
    background-color: #374151;
    border-radius: 10px;
}

.side-drawer::-webkit-scrollbar-thumb:hover {
    background-color: #10B981;
}


/*
 * Search Suggestions Dropdown → css/search.css
 */
