@media (min-width: 931px) {
    header .main-cats {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .header__top {
        flex-wrap: wrap;
        padding: 0.5rem 3rem;
    }
}

@media (max-width: 930px) {
    header .main-cats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .header__top {
        flex-wrap: wrap;
        padding: 0.5rem 1.5rem;
    }

    header .logo {
        order: 0;
        width: 100%;
    }

    header .search {
        order: 1;
        margin-top: 15px;
        margin-bottom: calc(15px - 0.3rem);
    }

    header .user {
        order: 2;
    }
}

.header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header {
    background: white url("https://lh3.googleusercontent.com/p/AF1QipOcISzMLYT8W5KlcLeOB8ORm_5vXPeh64_yVbwi=s680-w680-h510") no-repeat center 60%/cover;
}

header .search {
    display: flex;
    align-items: center;
}

header .search__input {
    box-sizing: border-box;
    width: 9rem;
    padding: 4px;
    border: 1px solid black;
    border-radius: 3px;
    outline: none;
}

header .search__bth {
    padding: 3px;
    margin-left: 2px;
    font-size: 0.9rem;
    cursor: pointer;
    color: white;
    background: none;
    border: none;
    outline: none;
}

header .search__bth:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

header .logo {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4rem;
    text-decoration: none;
    color: #e28e00;
}

header .logo__img {
    height: 100%;
    width: auto;
}

header .logo__text {
    font-size: 1.5rem;
    margin-left: 0.8rem;
}

header .user {
    display: flex;
    align-items: center;
    color: white;
}

header .user a {
    color: white;
}

.user .login__btn,
.user .logout-btn {
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    color: white;
    cursor: pointer;
}

.header__links {
    min-height: 1rem;
    background-color: green;
}

header .links__wrapper {
    margin: 0 auto;
    padding: 0.2rem 0;
    max-width: 1000px;
    box-sizing: border-box;
}

header .links__wrapper ul {
    list-style: none;
}

header .main-cats {
    display: flex;
    align-items: center;
}

header .main-cat {
    position: relative;
}

header .main-cat ul {
    display: none;
    min-width: 100%;
}

header .main-cats li {
    display: flex;
    align-items: end;
    justify-content: space-between;
}

header .main-cat li {
    align-items: center;
}

header .main-cat:hover .sub-cats,
header .main-cat:active .sub-cats,
header .main-cat:focus .sub-cats {
    display: block;
}

header .sub-cats {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    list-style: none;
    background-color: #fdc7aa;
}

header .sub-cat {
    position: relative;
}

header .sub-cat .links {
    position: absolute;
    top: 0;
    left: 100%;
    background-color: #7a92fd;
}

header .sub-cat:hover .links {
    display: block;
    min-width: 100px;
}

.header__link {
    display: flex;
    text-decoration: none;
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.links-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 18px;
}

.sub-cats .header__link {
    white-space: normal;
}

.main-cat,
.sub-cat,
.sub-cat .link {
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    color: white;
}

.main-cat:hover,
.sub-cat:hover,
.sub-cat .link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}