.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;

    h1 {
        font-size: 3.0625rem;
        color: var(--primary-text);
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

    .form-group.row {
        margin-bottom: 0;
    }
}

#id_sort_by {
    border-radius: 1000px;
    border: 1px solid #8991A7;
    color: var(--primary-text);
}

label[for="id_sort_by"] {
    color: var(--primary-text);
    font-weight: 700;
}

/* Filter Accordion Styles */
#filterAccordion .card {
    border: none;
    border-bottom: 1px solid #D6D8E1;

    &:last-child {
        border-bottom: none;
    }
}

#filterAccordion .card-header {
    padding: 0;
    margin-bottom: 0;
    border: none;
    background-color: #fff;
}

#filterAccordion .btn-link {
    color: var(--primary-text) !important;
    padding: 8px 0;
    border: none;
    background: #fff;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;

    svg {
        transition: transform 0.3s ease;
        transform-origin: center;
    }

    &:not(.collapsed) {
        svg {
            transform: rotate(180deg);
        }
    }
}

#filterAccordion .btn-link:focus {
    text-decoration: none;
    box-shadow: none;

    &:focus-visible {
        text-decoration: underline;
    }
}

#filterAccordion .card-body {
    padding: 0;
}

.facet-options .custom-control {
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 2rem;
}

.facet-options .custom-control-label {
    color: var(--primary-text);
    font-size: 0.875rem;
    cursor: pointer;

    &:hover {
        &::before {
            border-color: #3C4150;
        }
    }
}

.facet-options .custom-control-input:checked~.custom-control-label {
    &::after {
        background-color: #E42127;
        border-radius: 0.25rem;
    }
}

.facet-options .custom-control-label a {
    color: inherit;
}

.facet-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: #E42127;
    margin-bottom: 0.75rem;
}

.clearance-banner {
    position: relative;
    margin-bottom: 24px;
    color: var(--primary-text);
    background-image: url('/static/img/chalk-backgrounds/blue_light.png');
}

.clearance-banner__grid {
    position: relative;
    z-index: 2;
}

.clearance-banner__apple {
    position: absolute;
    top: 38px;
    right: 0;
    z-index: 1;
    pointer-events: none;
}

.clearance-banner__headline-wrap {
    padding: 29px 0 32px 40px;
}

.clearance-banner__eyebrow {
    margin: 0;
    font-size: 25px;
    line-height: 36px;
}

.clearance-banner__headline {
    font-size: 61px;
    font-family: 'Billy Bold';
    margin-bottom: 0;
    line-height: 64px;
}

.clearance-banner__details {
    display: flex;
    align-items: center;
    gap: 78px;
    padding: 23px 61px 20px 40px;
    border-radius: 0 50px 0 0;
    background-image: url('/static/img/chalk-backgrounds/blue_regular.png');
}

.clearance-banner__subhead {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 36px;
}

.clearance-banner__tiers {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.clearance-tier {
    display: flex;
    flex-direction: column;
}

.clearance-tier__percent {
    border-radius: 1000px;
    border: 1px solid #FFE401;
    background: #FAFF86;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
}

.clearance-tier__hint {
    font-size: 16px;
}

@media (max-width: 1439.98px) {
    .page-header {
        h1 {
            font-size: 1.8125rem;
        }
    }

    .clearance-banner__eyebrow {
        font-size: 20px;
        font-weight: 600;
        line-height: 28px;
    }

    .clearance-banner__headline {
        font-size: 32px;
        line-height: 36px;
    }

    .clearance-banner__details {
        flex-direction: column;
        align-items: normal;
        gap: 12px;
        padding: 20px 20px 20px 19px;
    }

    .clearance-banner__tiers {
        flex-direction: column;
        gap: 8px;
    }

    .clearance-tier {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .clearance-banner__subhead {
        font-size: 16px;
        line-height: 20px;
    }

    .clearance-tier__percent {
        font-size: 14px;
        height: 28px;
        padding: 4px 10px;
    }

    .clearance-banner__headline-wrap {
        padding: 19px 20px 17px 19px;
    }

    .clearance-tier__hint {
        font-size: 14px;
    }

    .clearance-banner__apple {
        top: 52px;
        height: 159px;
    }
}