/* ================================================================
   Мактаба — Шапка модуля (паттерн как ifta-header).
   Слева — название раздела, центр — логотип (→ главная), справа — аккаунт.
   ================================================================ */

.mkt-header {
    text-align: center;
    padding: 13px 20px;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mkt-header-inner {
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
}

.mkt-header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

/* Название раздела по-арабски (المكتبة) */
.mkt-title {
    font-family: var(--font-arabic-display, 'Amiri', serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--emerald);
    direction: rtl;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

/* Дублирующее название кириллицей — справа от арабского, помельче */
.mkt-title-ru {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--medium-gray);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Центральный логотип */
.mkt-header-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mkt-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 50px;
    height: 50px;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.mkt-logo-link:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.mkt-logo-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.22));
    transition: filter 0.2s ease;
}

.mkt-logo-link:hover img {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

/* Правая часть — аккаунт */
.mkt-header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

/* Стили .header-auth-btn, .user-menu-wrap, .user-avatar, .user-dropdown
   наследуются из css/layout.css — там они единые для всей платформы. */

/* ── Адаптив шапки ──────────────────────────────────────── */
@media (max-width: 767px) {
    .mkt-header {
        padding: 10px 12px;
    }
    .mkt-header-inner {
        gap: 8px;
        padding: 0 8px;
    }
    .mkt-title {
        font-size: 22px;
    }
    .mkt-title-ru {
        display: none;
    }
    .mkt-logo-link {
        width: 40px;
        height: 40px;
    }
    .header-auth-btn span {
        display: none;
    }
    .header-auth-btn {
        padding: 8px 10px;
    }
}
