:root {
    --primary: #0ea5e9;
    --primary-dark: #0369a1;
    --secondary: #f97316;
    --secondary-color: #0984e3;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --success: #10b981;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 14px;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --glass: rgba(255, 255, 255, 0.92);
    --border-glass: rgba(255, 255, 255, 0.2);
}

.topbar-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1500;
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    padding: 0 30px;
    transition: var(--transition);
    /* animation: fadeIn 0.5s ease-out; */
}

.topbar-inner {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    position: relative;
}

/* لوگو */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
    padding-inline-start: 10px;
}

.logo-main {
    font-weight: 800;
    font-size: 1.6rem;
    color: black;
    /* background: linear-gradient(to left, var(--primary), var(--secondary)); */
    /* -webkit-background-clip: text; */
    /* -webkit-text-fill-color: transparent; */
    /* background-clip: text; */
    line-height: 1.2;
}

@media (max-width: 1200px) {
    .logo-main {
        font-size: 1.3rem;
    }

    .logo-sub {
        display: none;
    }
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
}

/* بخش کنترلی سمت چپ */
.control-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* دکمه فروشگاه */
.shop-btn {
    background: linear-gradient(135deg, var(--secondary), #ea580c);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 15px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3);
    position: relative;
    overflow: hidden;
}

.shop-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.6s;
}

.shop-btn:hover::before {
    left: 100%;
}

.shop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.4);
}

.shop-btn i {
    font-size: 1.1rem;
}

/* منوی همبرگری برای موبایل */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* background: var(--gray-light); */
    color: white;
    background: var(--primary);
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;

}

/* استایل‌های واکنش‌گرا */
@media (max-width: 1200px) {
    .nav-menu {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .topbar-inner {
        justify-content: space-between;
    }

    .shop-btn span {
        display: none;
    }

    .shop-btn {
        padding: 12px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }

    .topbar-modern {
        padding: 0 16px;
    }

    .nav-link i {
        display: none;
    }
}

@media (max-width: 768px) {}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.elegant-navbar {
    transition: all 0.25s ease;
}

.elegant-navbar .nav-link {
    color: #000000 !important;
    margin: 0 20px;
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0.5px;
    position: relative;
    transition: all 0.3s ease;
}

.elegant-navbar .nav-link::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #0d6efd;
    transition: width 0.3s ease;
}

.elegant-navbar .nav-link:hover {
    color: #0d6efd !important;
}

.elegant-navbar .nav-link:hover::after {
    width: 100%;
}

.mega-menu {
    width: 720px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.mega-section {
    background: #f8f9fb;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    padding: 14px 14px;
    height: 100%;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.mega-section:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.mega-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111827;
    font-size: 0.95rem;
}

.mega-title svg {
    width: 18px;
    height: 18px;
    opacity: .75;
}

.mega-menu .dropdown-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: .45rem .6rem;
    border-radius: 8px;
    color: #1f2937;
    transition: background-color .15s ease, padding-right .15s ease, color .15s ease;
}

.mega-menu .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0d6efd;
    padding-right: .85rem;
}

.mega-menu .dropdown-item small {
    display: block;
    font-size: .75rem;
    line-height: 1.2;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mega-menu .dropdown-item.small-2line small {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mega-feature {
    background: linear-gradient(135deg, #0d6efd0f, #11182708);
    border: 1px dashed rgba(13, 110, 253, 0.25);
}

.mega-feature .feature-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #0d6efd;
    color: #fff;
    font-size: .72rem;
    margin-bottom: 8px;
}

.mega-feature p {
    font-size: .86rem;
    color: #374151;
    margin-bottom: 10px;
    line-height: 1.7;
}

.mega-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

.mega-action-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #111827;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.mega-action-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
    border-color: rgba(13, 110, 253, 0.35);
    color: #0d6efd;
}

.mega-action-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(13, 110, 253, 0.08);
    display: grid;
    place-items: center;
    flex: 0 0 34px;
}

.mega-action-icon svg {
    width: 18px;
    height: 18px;
    opacity: .85;
}

.mega-action-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.mega-action-title {
    font-weight: 700;
    font-size: .9rem;
}

.mega-action-sub {
    font-size: .75rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    background: #f1f2f6;
    border-radius: 20px;
    overflow: hidden;
    direction: rtl;
}

@media (max-width: 1200px) {
    .lang-switcher {
        display: none;
    }
}

.lang-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 40px;
    /* padding: 3px 10px 3px 20px; */
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.lang-btn.active {
    background: var(--secondary-color);
    color: white !important;
}

@media (max-width: 1200px) {
    .mega-actions {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {



    .nav-item.dropdown {
        position: relative;
    }

    .nav-item.dropdown>.dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(12px) scale(0.98);
        transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
        margin-top: .75rem;
    }

    .nav-item.dropdown.show>.dropdown-menu,
    .nav-item.dropdown>.dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .nav-item.dropdown>.dropdown-menu.mega-menu {
        width: 300px;
        max-width: calc(100vw - 32px);
        left: 50%;
        right: auto;
        --mega-shift-x: 0px;
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(calc(-50% + var(--mega-shift-x))) translateY(12px) scale(0.98);
        transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
        margin-top: .75rem;
    }

    .nav-item.dropdown.show>.dropdown-menu.mega-menu,
    .nav-item.dropdown>.dropdown-menu.mega-menu.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(calc(-50% + var(--mega-shift-x))) translateY(0) scale(1);
    }
}

@media (max-width: 992px) {

    .navbar-nav .dropdown-menu {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
        display: block;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transform: translateY(-6px);
        padding: 0 !important;
        margin-top: 0 !important;
        border: 0 !important;
        visibility: hidden;
        pointer-events: none;
        --dd-maxh: 0px;
        transition: max-height .28s ease, opacity .2s ease, transform .2s ease, padding .2s ease, margin-top .2s ease;
        box-shadow: none;
        border-radius: 12px;
    }

    .navbar-nav .dropdown-menu.show {
        max-height: var(--dd-maxh);
        opacity: 1;
        transform: translateY(0);
        padding: .75rem 1rem !important;
        margin-top: .35rem !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        visibility: visible;
        pointer-events: auto;
    }

    .dropdown-menu {
        width: 100% !important;
        max-width: 100% !important;
        display: none;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        pointer-events: auto !important;
        box-shadow: none;
    }

    .dropdown-menu.show {
        display: block;
    }

    .mega-menu {
        position: static !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        margin-top: .5rem;
        width: 100% !important;
    }

    .mega-section {
        padding: 12px;
    }
}

/* ساختار کلی Offcanvas */
.mobile-menu {
    height: 100vh;
    width: 250px !important;
    background: #ffffff;
    /* border-radius: 12px 0 0 12px; */
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
}

.mobile-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.5) transparent;
}

.mobile-menu .offcanvas-body {
    padding: 0 0 80px 0;
}

.mm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px 5px 10px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.mm-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: red;
    line-height: 1;
}

.mm-search {
    position: relative;
    padding: 12px 16px;
}

.mm-search>i {
    position: absolute;
    inset-inline-start: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #9ca3af;
    pointer-events: none;
    opacity: 0.6;
}

.mm-search input {
    width: 100%;
    padding: 10px 50px 10px 45px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-size: 16px;
    transition: all 0.2s ease;
}

.mm-search input:focus {
    border-color: #6366f1;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.mm-search-btn {
    position: absolute;
    inset-inline-end: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    padding: 0;
    cursor: pointer;
    color: white;
    font-size: 1.1rem;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mm-search-btn:hover {
    color: #374151;
}

.mm-items {
    padding: 0 0 20px 0;
}

.mm-item a,
.mm-item .mm-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 0.95rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.2s;
}

.mm-item a:hover,
.mm-item .mm-link:hover {
    background: #f3f4f6;
}

.mm-item i {
    font-size: 1.2rem;
}










/* آکاردئون */
.mm-accordion {
    margin-top: 4px;
}

.mm-acc-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s;
}

.mm-acc-btn:hover {
    background: #f3f4f6;
}

.mm-acc-btn .acc-arrow {
    margin-right: auto;
    transition: transform 0.25s ease;
    opacity: 0.7;
}

/* محتوای آکاردئون */
.mm-acc-content {
    max-height: 0;
    overflow: hidden;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
    transition: max-height 0.35s ease;
    padding: 0 12px;
}

/* دو ستونه */
.mm-acc-content.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    padding: 12px 16px;
}

.mm-acc-content.two-col a {
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mm-acc-content.two-col a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

/* حالت باز */
.mm-accordion.active .mm-acc-content {
    max-height: 600px;
    /* کافی برای دو ستون */
}

.mm-accordion.active .acc-arrow {
    transform: rotate(180deg);
}

/* Language Section */
.mm-lang {
    padding: 12px 16px 4px;
    margin-bottom: 8px;
}

.mm-lang-title {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Options container */
.mm-lang-options {
    display: flex;
    gap: 10px;
    direction: rtl;
}

/* Each language button */
.mm-lang-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    text-decoration: none;
}

.mm-lang-btn img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Hover */
.mm-lang-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Active (selected) */
.mm-lang-btn.active {
    background: #eef2ff;
    border-color: #6366f1;
    color: #3730a3;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}