
:root {
    --viewer-sticky-header-height: 132px;
}

.viewer-category-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: var(--viewer-sticky-header-height);
    background-image:
        linear-gradient(90deg, rgba(5, 28, 55, .92), rgba(7, 41, 78, .76)),
        var(--viewer-header-image);
    background-position: center 44%;
    background-size: cover;
    box-shadow: 0 8px 24px rgba(3, 20, 39, .22);
    color: #fff;
}

.viewer-category-header__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,.06), transparent 45%),
        linear-gradient(90deg, rgba(0,0,0,.16), transparent 38%);
    pointer-events: none;
}

.viewer-category-header__inner {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    max-width: 1500px;
    min-height: var(--viewer-sticky-header-height);
    margin: 0 auto;
    padding: 1rem 2rem;
}

.viewer-category-header__brand {
    display: flex;
    align-items: flex-end;
    align-self: stretch;
    text-decoration: none;
}

.viewer-category-header__brand img {
    width: 92px;
    max-height: 112px;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 7px 12px rgba(0,0,0,.28));
}

.viewer-category-header__content {
    min-width: 0;
}

.viewer-category-header__title {
    margin-bottom: .65rem;
    color: #fff;
    font-size: clamp(1.9rem, 3.4vw, 3.15rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.035em;
    text-shadow: 0 3px 16px rgba(0,0,0,.38);
}

.viewer-category-header__nav {
    display: flex;
    flex-wrap: wrap;
    gap: .42rem;
}

.viewer-category-header__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: .42rem .72rem;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    backdrop-filter: blur(7px);
}

.viewer-category-header__nav a:hover,
.viewer-category-header__nav a.is-active {
    border-color: #fff;
    background: #fff;
    color: #0b3768;
}

.viewer-category-header__back {
    align-self: center;
    padding: .65rem .85rem;
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 10px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    backdrop-filter: blur(7px);
}

.viewer-category-header__back:hover {
    background: #fff;
    color: #0b3768;
}

/*
 * De content scrollt onder de plakkende header.
 */
.viewer-shell {
    position: relative;
    z-index: 1;
    padding-top: 1.25rem;
}

@media (max-width: 900px) {
    :root {
        --viewer-sticky-header-height: 116px;
    }

    .viewer-category-header__inner {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: .8rem;
        padding: .7rem 1rem;
    }

    .viewer-category-header__brand img {
        width: 72px;
        max-height: 94px;
    }

    .viewer-category-header__title {
        margin-bottom: .5rem;
        font-size: clamp(1.55rem, 7vw, 2.25rem);
    }

    .viewer-category-header__nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: .2rem;
        scrollbar-width: none;
    }

    .viewer-category-header__nav::-webkit-scrollbar {
        display: none;
    }

    .viewer-category-header__back {
        display: none;
    }
}

@media (max-width: 560px) {
    :root {
        --viewer-sticky-header-height: 104px;
    }

    .viewer-category-header__inner {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .viewer-category-header__brand img {
        width: 58px;
        max-height: 82px;
    }

    .viewer-category-header__nav a {
        min-height: 30px;
        padding: .38rem .62rem;
        font-size: .72rem;
    }
}
