#header {
    width: var(--base-width);
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    align-items: center;
}
#header nav {
    display: flex;
    align-items: center;
}
#header nav #logo {
    width: 220px;
}

#header nav #menu {
    display: flex;
    align-items: center;
    list-style-type: none;
}
#header nav #menu a {
    color: var(--nav-link-color);
    font-size: 1.3rem;
    text-decoration: none;
    margin-right: 20px;
    font-family: "AvenirNext Demi", sans-serif;
}
#header nav #menu a:hover,
#header nav #menu a:focus {
    color: var(--nav-link-hover-color);
    text-decoration: underline;
}

#header #minibasket {
    margin-left: auto;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}
#header #minibasket img {
    width: 25px;
    filter: var(--base-icon-color);
    grid-row: 1/1;
    grid-column: 1/1;
    z-index: 1;
}
#header #basket-count {
    grid-row: 1/1;
    grid-column: 1/1;
    z-index: 2;
    border-radius: 50%;
    background: var(--basket-count-bg-color);
    color: var(--basket-count-color);
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    font-weight: normal;
    transform: translate(5px, 9px);
    justify-self: end;
    align-self: end;
}

#header #mobilmenu {
    display: none;
}


@media screen and (max-width: 768px) {
    #header {
        flex-direction: column;
        gap: 10px;
    }
    #header nav {
        flex-direction: column;
        gap: 10px;
    }
    #header #minibasket {
        margin-left: 0;
    }
}

@media screen and (max-width: 550px) {
    #header {
        gap: 0;
    }
    #header nav #menu {
        display: block;
        max-height: 0;
        transition: var(--base-transition);
        overflow: hidden;
    }
    #header nav #menu.open {
        max-height: 1000px;
    }
    #header nav #menu li {
        text-align: center;
        padding: 5px 0;
    }
    #header nav #menu a {
        margin-right: 0;
    }
    #header #mobilmenu {
        display: block;
    }
    #header #mobilmenu img {
        width: 25px;
        filter: var(--base-icon-color);
    }
}