/*
    Merkpagina's (FAL-101): de kop van een merk (brandheader) en het overzicht van alle merken (brandoverview, brandtile).
    Niet in een bundel: de servers hebben hun eigen bundellijsten, dus Brand.cshtml en Brands.cshtml laden hem zelf.
*/

/* START BRANDHEADER */
.brandheader {
    margin: 2rem 0 5rem;
}

/* Twee vlakken in één paneel: links de tekst op het lichtblauw van de site, rechts het logo op wit */
.brandheader__panel {
    display: grid;
    grid-template-columns: minmax(0, 9fr) minmax(0, 3fr);
    min-height: 26rem;
    border: .2rem solid var(--blue-light);
    border-radius: 2rem;
    overflow: hidden;
    background-color: var(--white);
}

.brandheader__logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

    .brandheader__logo picture {
        display: contents;
    }

    /* width: een svg zonder eigen maat krijgt anders geen breedte */
    .brandheader__logo img {
        width: 100%;
        height: auto;
        max-height: 12rem;
        object-fit: contain;
    }

.brandheader__content {
    display: flex;
    flex-flow: column;
    justify-content: center;
    padding: 4rem 5rem;
    background-color: var(--blue-light);
}

.brandheader__title {
    margin: 0;
}

.brandheader__text {
    max-width: 72rem;
    margin-top: 1.5rem;
    font-size: 1.6rem;
    line-height: 2.8rem;
}

    .brandheader__text p:last-child {
        margin-bottom: 0;
    }

    .brandheader__text a {
        color: inherit;
        text-decoration: underline;
    }

/* min-height: het aantal komt pas met de producten binnen, zo verspringt er niets */
.brandheader__results {
    min-height: 2rem;
    margin: 1.5rem 0 0;
    font-size: 1.2rem;
    line-height: 2rem;
    color: var(--grey-text);
}

.brandheader--nologo .brandheader__panel {
    grid-template-columns: minmax(0, 1fr);
}

.brandheader--compact .brandheader__panel {
    min-height: 15rem;
}

.brandheader--compact .brandheader__content {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.brandheader--compact .brandheader__logo {
    padding: 2rem 3rem;
}

    .brandheader--compact .brandheader__logo img {
        max-height: 8rem;
    }

@media (max-width: 991px) {
    .brandheader__content {
        padding: 3rem;
    }
}

@media (max-width: 767px) {
    .brandheader {
        margin: 1rem 0 2rem;
    }

    .brandheader__panel,
    .brandheader--compact .brandheader__panel {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    /* Onder elkaar: het logo boven de tekst */
    .brandheader__logo {
        order: -1;
    }

    .brandheader__logo,
    .brandheader--compact .brandheader__logo {
        padding: 2rem 3rem;
    }

        .brandheader__logo img,
        .brandheader--compact .brandheader__logo img {
            max-height: 7rem;
        }

    .brandheader__content,
    .brandheader--compact .brandheader__content {
        padding: 2.5rem 2rem;
    }

    .brandheader__text {
        font-size: 1.4rem;
        line-height: 2.6rem;
    }
}
/* END BRANDHEADER */

/* START BRANDOVERVIEW */
.brandoverview {
    margin: 2rem 0 6rem;
}

.brandoverview__title {
    margin-bottom: 1.5rem;
}

.brandoverview__text {
    max-width: 72rem;
    font-size: 1.6rem;
    line-height: 2.8rem;
}

.brandoverview__items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3rem;
    margin: 4rem 0 0;
    padding: 0;
    list-style: none;
}

.brandtile {
    display: flex;
    flex-flow: column;
    height: 100%;
    border: .2rem solid var(--blue-light);
    border-radius: 2rem;
    overflow: hidden;
    color: var(--black);
}

.brandtile__logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 16rem;
    padding: 3rem 4rem;
}

    .brandtile__logo picture {
        display: contents;
    }

    .brandtile__logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.brandtile__fallback {
    font-family: Changa;
    font-weight: 800;
    font-size: 2.6rem;
    line-height: 3rem;
    text-align: center;
    color: var(--grey-text);
}

.brandtile__title {
    padding: 2rem 2rem 0;
    font-size: 1.6rem;
    font-weight: 600;
    background-color: var(--blue-light);
}

.brandtile__count {
    flex-grow: 1;
    padding: 0 2rem 2rem;
    font-size: 1.2rem;
    color: var(--grey-text);
    background-color: var(--blue-light);
}

.brandtile:focus-visible {
    outline: .3rem solid var(--blue);
    outline-offset: .3rem;
}

@media (hover: hover) and (pointer: fine) {
    .brandtile {
        transition: var(--transition-default);
    }

        .brandtile:hover {
            border-color: var(--blue);
            color: var(--black);
            text-decoration: none;
        }
}

@media (prefers-reduced-motion: reduce) {
    .brandtile {
        transition: none;
    }
}

@media (max-width: 1199px) {
    .brandoverview__items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .brandoverview__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
        margin-top: 2.5rem;
    }

    .brandtile__logo {
        height: 11rem;
        padding: 2rem;
    }
}
/* END BRANDOVERVIEW */
