:root {
    --collection-title-color: var(--collection-title-color, var(--text-default-color));

    --collection-navigation-background-color: var(--collection-navbar-background-color, var(--default-background-color));
    --collection-navigation-link-color: var(--collection-navbar-navlink-color, var(--link-color));
    --collection-navigation-link-color-active: var(--collection-navbar-navlink-color-focus, var(--link-color-focus));
}

.collection-section {
    margin-bottom: var(--default-space-between);
}
.collection-body .collection-section:last-child {
    margin-bottom: 0;
}

.collection-section-splitter {
    border-bottom: 1px solid var(--default-border-color);
    margin-bottom: var(--default-space-between);
}

.collection-section:first-child.header-blocks,
.header-blocks .jumbotron-image-block {
    /* margin is handled by the content blocks, remove the default margin of the body */
    margin-top: calc(-1 * var(--default-space-between));
}

.collection-section:last-child.footer-blocks,
.footer-blocks .jumbotron-image-block {
    /* margin is handled by the content blocks, remove the default margin of the body */
    margin-bottom: calc(-1 * var(--default-space-between));
}

.header-blocks h1 {
    color: var(--collection-title-color);
}

.filter-button-placeholder {
    display: none;
    margin-bottom: var(--default-space-between);
}
.btn-filter {
    position: relative;
    border: 1px solid var(--default-border-color);
    border-radius: 0 !important;
    padding: .5rem .75rem;
    display: flex;
    align-items: center;
    font-weight: 600;
}
.btn-filter .btn-text {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
}
.btn-filter .filter-count {
    font-weight: 300;
    margin-left: 4px;
    margin-top: 1px;
    font-size: smaller;
}
.btn-filter:hover {
    border-color: var(--default-border-color-active);
    background-color: var(--default-background-color-active);
}
.btn-filter.active {
    border-color: var(--success-color);
    color: var(--success-color);
}
.btn-filter.active .btn-icon {
    font-weight: 400;
}

.collection-main {
    display: flex;
}

.filtering {
    flex-shrink: 0;
    width: 190px;
    margin-right: calc(2 * var(--default-space-between));
}

.filter {
    margin-bottom: var(--default-space-between);
    font-size: 13px;
}
.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--default-border-color);
    margin-bottom: 6px;
    padding-bottom: 4px;
}
.filter-title {
    font-weight: 600;
    text-transform: uppercase;
    font-size: inherit;
}
.filter-tooltip {
    margin-left: 2px;
    font-size: 14px !important;
    cursor: help;
}
button.filter-reset {
    font-size: 20px;
    font-weight: 400;
    padding-right: 4px;
    padding-left: 4px;
    margin-right: -4px;
}
.filter-items {
    margin-bottom: -2px;
}
.filter-item {
    display: flex;
    align-items: center;
    padding-top: 2px;
    padding-bottom: 2px;
}
.filter-item-check {
    margin-right: 8px;
}
.filter-item-value {
    display: flex;
    align-items: center;
}
.filter-item-count {
    font-weight: 300;
    font-size: 12px;
    color: var(--text-muted-color);
    margin-left: 8px;
}

.products {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: minmax(min-content, max-content);
    grid-gap: var(--default-space-between);
    scroll-margin-top: 135px;
    /* approximate height header and filter button combined */
}

.products-grid .product-item-image {
    height: 130px;
    margin-bottom: var(--default-space-between);
}
.products-grid .product-item-image img {
    max-height: 100%;
}
.products-grid .product-item-title,
.products-grid .product-item-description {
    text-align: center;
}
.products-grid .product-item-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
.products-grid .product-item-offer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.products-grid .product-item-offer .product-item-price {
    order: 2;
    margin-left: auto;
}

.products-menu {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.products-menu .product-item {
    flex-flow: row nowrap;
}
.products-menu .product-item-image {
    order: 2;
    width: 100px;
    margin-left: var(--default-space-between);
}
.products-menu .product-item-image img {
    max-height: 100px;
    border-radius: var(--default-border-radius);
}

.products-sidebyside {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.products-sidebyside .product-item {
    flex-flow: row nowrap;
}
.products-sidebyside .product-item-image {
    width: 45%;
    margin-right: var(--default-space-between);
}
.products-sidebyside .product-item-image img {
    max-height: 180px;
}

.products-list {
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 0;
    margin-top: calc(-1 * var(--default-space-between));
    margin-bottom: calc(-1 * var(--default-space-between));
}
.products-list .product-item {
    flex-flow: row nowrap;
    padding-right: 0;
    padding-left: 0;
    border-left-width: 0;
    border-top-width: 0;
    border-right-width: 0;
}
.products-list .product-item:last-child {
    border-bottom-width: 0;
}
.products-list .product-item:focus {
    border-color: var(--default-border-color);
}
@media (hover: hover) and (pointer: fine) {
    .products-list .product-item:hover {
        border-color: var(--default-border-color);
    }
}
.products-list .product-item-image {
    width: 20%;
    margin-right: var(--default-space-between);
}
.products-list .product-item-image img {
    max-height: 80px;
}
.products-list .product-item-body {
    display: grid;
    grid-template-areas:
        "title offer"
        "description offer";
    grid-template-columns: 1fr minmax(min-content, max-content);
    grid-auto-rows: minmax(min-content, max-content);
}
.products-list .product-item-body .product-item-title {
    grid-area: title;
}
.products-list .product-item-body .product-item-description {
    grid-area: description;
}
.products-list .product-item-body .product-item-offer {
    grid-area: offer;
    padding-top: 0;
    margin-top: 0;
    margin-left: var(--default-space-between);
    display: flex;
    flex-flow: column;
    align-items: flex-end;
}
.products-list .product-item-offer .product-item-measurement {
    padding-top: 2px;
}

.children {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: minmax(min-content, max-content);
    grid-gap: var(--default-space-between);
}

.children-grid .collection-item-image {
    height: 100px;
    margin-bottom: 10px;
}
.children-grid .collection-item-image img {
    max-height: 100%;
}
.children-grid .collection-item-body {
    margin-top: auto;
    /* align bottom */
}
.children-grid .collection-item-body .collection-item-title {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navigation {
    position: sticky;
    margin-top: calc(-1 * var(--default-space-between));
    background-color: var(--collection-navigation-background-color);
    /* The HEADER has the 'sticky-top' class with a z-index of 1020. Giving this element a z-index of 1019
    will make it scroll beneath the HEADER in stead of on top of the HEADER. */
    z-index: 1019;
}
.navigation nav {
    justify-content: center;
}
.navigation nav .nav-item.active {
    font-weight: 600;
}
.navigation .nav-link {
    color: var(--collection-navigation-link-color);
    transition: all 0.15s ease-in-out;
}
.navigation .nav-link:focus {
    color: var(--collection-navigation-link-color-active);
}
@media (hover: hover) and (pointer: fine) {
    .navigation .nav-link:hover {
        color: var(--collection-navigation-link-color-active);
    }
}

@media (max-width:575.98px)
/* extra small */
    {
    .filter-button-placeholder {
        display: block;
    }

    .collection-main {
        flex-direction: column;
    }

    .filtering {
        display: none;
        margin: 0;
        width: 100%;
    }

    .products {
        grid-template-columns: repeat(1, 1fr);
    }

    .children {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* The list with filter items has an initial max visible of 5.
When the "show more" link is clicked, all list items become visible. */

.filter-items li:nth-child(n+6) {
    display: none;
}
.attribute-filter > input {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}
.attribute-filter .attribute-filter-show-more {
    display: none;
    margin-top: 6px;
    font-weight: normal;
    color: var(--link-color);
}
.attribute-filter .filter-items.truncated ~ .attribute-filter-show-more {
    display: block;
}
.attribute-filter > input:checked ~ .attribute-filter-show-more {
    display: none !important;
}
.attribute-filter > input:checked ~ .filter-items li {
    display: flex;
}
