.desktop-header {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
    padding: 10px 20px;
}

.desktop-header-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.desktop-header-left img {
    height: 55px;
}

.desktop-menu ul {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.desktop-menu li {
    list-style: none;
}

.desktop-menu a {
    color: #333;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.desktop-menu li.active a {
    color: #3730a3;
    font-weight: 700;
}

.sidebar-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}

.sidebar-btn i {
    font-size: 22px;
    color: #3730a3;
}

/* هدر دسکتاپ صفحهٔ فید / PDP: جستجو + ورود/پروفایل */
.desktop-header--feed-dashboard {
    padding: 8px 16px;
}

.desktop-header-container--feed {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 16px;
}

body.product-seo-page .desktop-header-container--feed {
    max-width: 1416px;
}

.dfh-start {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.dfh-sidebar-btn {
    margin: 0;
    flex-shrink: 0;
}

.dfh-auth {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.dfh-auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.dfh-auth-link--primary {
    background: #eef2ff;
    color: #3730a3;
    border-color: #e0e7ff;
}

.dfh-auth-link--primary:hover {
    background: #e0e7ff;
    color: #312e81;
}

.dfh-auth-link--primary.is-active {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #312e81;
    box-shadow: inset 0 0 0 1px #c7d2fe;
}

.dfh-auth-link--ghost {
    background: #fff;
    color: #334155;
    border-color: #e2e8f0;
}

.dfh-auth-link--ghost:hover {
    background: #f8fafc;
}

.dfh-auth-link i {
    font-size: 1.25rem;
    line-height: 1;
}

.dfh-search {
    margin: 0;
    min-width: 0;
}

.dfh-search-box {
    display: flex;
    align-items: stretch;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.dfh-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.dfh-search-input:focus {
    outline: none;
    background: #fff;
}

.dfh-search-submit {
    border: none;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dfh-search-submit:hover {
    filter: brightness(1.05);
}

.dfh-search-submit i {
    font-size: 1.1rem;
}

.dfh-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.desktop-logo--compact img {
    height: 40px;
    width: auto;
    display: block;
}

@media (max-width: 900px) {
    .desktop-header-container--feed {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "start logo"
            "search search";
    }

    .dfh-start {
        grid-area: start;
    }

    .dfh-logo-wrap {
        grid-area: logo;
        justify-content: flex-end;
    }

    .dfh-search {
        grid-area: search;
    }
}

/* دسکتاپ: هدر ثابت — هم‌تراز با app.master / header_desktop */
@media (min-width: 768px) {
    .desktop-header {
        position: fixed;
        top: 0;
        inset-inline: 0;
        width: 100%;
        z-index: 1020;
        background: #ffffff;
        box-sizing: border-box;
    }

    body:has(header.desktop-header) {
        padding-top: 76px;
    }

    body:has(header.desktop-header--feed-dashboard) {
        --feed-desk-header-stack: 104px;
        padding-top: var(--feed-desk-header-stack);
    }
}

@media (min-width: 768px) and (max-width: 900px) {
    body:has(header.desktop-header--feed-dashboard) {
        --feed-desk-header-stack: 156px;
        padding-top: var(--feed-desk-header-stack);
    }
}
