main {
    margin-top: 0 !important;
}

:root :where(.is-layout-flow) > * {
    margin-block-start: 0 !important;
}

.sub-header {
    position: relative;
    z-index: 20;

    .container {
        z-index: 2;
        left: 50%;
        transform: translateX(-50%);
        position: absolute;
        max-width: 1400px;
        width: 100%;
        background: white;
        padding: 2rem 0;
        border-bottom-left-radius: 25px;
        border-bottom-right-radius: 25px;
        display: flex;
        align-items: center;
        justify-content: space-between;

        @media screen and (max-width: 768px) {
            flex-direction: column;
            gap: 1rem;
        }

        .logo {
            padding-left: 2rem;
            height: 3rem;

            @media screen and (max-width: 768px) {
                padding-left: 0;
            }

            img {
                width: 100%;
                height: 100%;
                object-fit: contain;
            }
        }

        .content {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding-right: 2rem;

            @media screen and (max-width: 768px) {
                padding-right: 0;
            }

            .menu {
                cursor: pointer;
                white-space: nowrap;
                border: none;
                background: var(--color-accent);
                border-radius: 100px;
                color: white;
                font-weight: 600;
                font-size: 1rem;
                display: flex;
                align-items: center;
                gap: 0.5rem;
                padding: 0.5rem 0.75rem;

                @media screen and (max-width: 1400px) {
                    .label {
                        display: none;
                    }
                }

                svg {
                    width: 1.5rem;
                    height: 1.5rem;
                }
            }

            .nav-item {
                white-space: nowrap;
                text-decoration: none;
                font-weight: 600;
                font-size: 1rem;

                @media screen and (max-width: 1400px) {
                    display: none;
                }
            }

            form {
                display: flex;
                align-items: center;
                position: relative;
                input {
                    position: relative;
                    padding: 0.75rem 1rem 0.75rem 3rem;
                    border-radius: 100px;
                    border: 1px solid black;
                }

                button {
                    z-index: 10;
                    position: absolute;
                    left: 0.5rem;
                    top: 50%;
                    transform: translateY(-50%);
                    background: none;
                    border: none;
                    padding: 0;
                    margin-top: 0;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    cursor: pointer;
                    svg {
                        width: 1.5rem;
                        height: 1.5rem;
                    }
                }
            }

            .site-header__account {
                display: flex;
                width: fit-content;
                border-radius: 100px;
                border: 1px solid black;
                padding: 0.5rem;

                @media screen and (max-width: 768px) {
                    display: none;
                }

                svg {
                    width: 1.5rem;
                    height: 1.5rem;
                }
            }

            .site-header__favourites {
                display: flex;
                width: fit-content;
                border-radius: 100px;
                border: 1px solid black;
                padding: 0.5rem;

                @media screen and (max-width: 768px) {
                    display: none;
                }

                svg {
                    width: 1.5rem;
                    height: 1.5rem;
                }
            }

            .site-header__cart {
                display: flex;
                width: fit-content;
                border-radius: 100px;
                border: 1px solid black;
                padding: 0.5rem;

                .cart__inner {
                    display: flex;
                    width: fit-content;
                    position: relative;
                    text-decoration: none;
                    svg {
                        width: 1.5rem;
                        height: 1.5rem;
                    }

                    .site-header__cart-count {
                        font-size: 0.5rem;
                        position: absolute;
                        top: 0;
                        right: 0;
                        background: red;
                        border-radius: 100px;
                        border: 1px solid white;
                        color: white;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        width: fit-content;
                        line-height: 1;
                        padding: 0.1rem;
                    }
                }
            }
        }
    }

    .mega-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 1400px;
        background: white;
        border-radius: 0 0 25px 25px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        padding-top: 5.5rem;
        margin-top: 0;

        &[hidden] {
            display: none;
        }

        .mega-menu__inner {
            padding-inline: 2rem;
            padding-bottom: 2rem;
            padding-top: 2rem;
        }

        .mega-menu__categories {
            display: grid;
            grid-template-columns: repeat(var(--columns, 4), 1fr);
            gap: 2rem;

            @media screen and (max-width: 768px) {
                grid-template-columns: repeat(2, 1fr);
                padding-top: 3rem;
            }
        }

        .mega-menu__category-title {
            font-size: 1rem;
            font-weight: 700;
            margin-bottom: 0.75rem;

            a {
                text-decoration: none;
                color: black;

                &:hover {
                    color: var(--color-accent);
                }
            }
        }

        .mega-menu__category-children {
            margin: 0;
            padding: 0;
            list-style: none;
            display: flex;
            flex-direction: column;

            a {
                text-decoration: none;
                color: #555;
                font-size: 0.9rem;
                font-weight: 500;

                &:hover {
                    color: var(--color-accent);
                }
            }
        }
    }
}