
/* Categories - Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.categories {
    background-color: var(--grey-50);
    min-height: calc(100vh - 8.5rem);
}

.categories__header {
    padding: 1.5rem 0 1rem 0;
}

.categories__title {
    font-size: var(--text-lg);
}

.categories__description {
    margin: 0.5rem 0 0 0;
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--grey-600);
}

.categories__layout {
    display: flex;
    padding-bottom: 3rem;
}

.categories__main {
    padding: 0;
    flex: 1;
    position: relative;
}

.categories__sidebar {
    width: 25%;
    max-width: 20rem;
    font-size: var(--text-sm);
    padding: 0 2rem 0 0;
}

@media only screen and (min-width: 769px) {
    .categories__header {
        padding: 2rem 0 1rem 0;
    }
}

/* Sidebar - Filters
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.filters__top {
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--grey-200);
    display: flex;
    justify-content: space-between;
}

.filters__reset {
    color: var(--grey-600);
    font-weight: 400;
}

.filters__reset:hover {
    color: var(--grey-700);
}

.filter__section {
    padding: 1rem 0.25rem;
    width: 100%;
    color: var(--grey-700);
    border-bottom: 1px solid var(--grey-200);
}

.filter__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 1rem;
    font-weight: 700;
}

.filter__heading:hover {
    color: var(--grey-900);
}

.filter__heading.expanded {
    margin-bottom: 0.75rem;
}

.filter__icon {
    color: var(--grey-400);
}

.filter__content {
    display: none;
}

.filter__content.expanded {
    display: block;
}

.filter__content.expanded :first-child {
    margin-top: 0;
}

.filter__attribute {
    /*margin-top: 1rem;*/
    margin-left: 0.75rem;
    /*margin-bottom: 0.25rem;*/
    color: var(--grey-700);
    position: relative;
    padding: 0.75rem 1rem;
}

.filter__attribute:hover {
    /*color: var(--grey-500);*/
    background-color: var(--grey-50);
    border-radius: 4px;
    color: var(--slate-950);
}

.filter__link {
    position: absolute;
    display: block;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.filter__checkbox {
    margin-right: 0.5rem;
}

.filter__checkbox--square-check {
    display: none;
    color: var(--primary-blue);
}

.filter__attribute.active .filter__checkbox--square {
    display: none;
}

.filter__attribute.active .filter__checkbox--square-check {
    display: inline;
}

/* Categories Grid
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.main__grid {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
}

.main__box {
    text-align: center;
    font-size: var(--text-xs);
    color: var(--grey-700);
    --main-items: 2;
    position: relative;
    box-sizing: border-box;
    border: 1px solid var(--grey-200);
    padding: 1rem;
    gap: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc((100% / var(--main-items)) - (((var(--main-items) - 1) / var(--main-items)) * 1rem));
    background-color: var(--white);
    border-radius: 4px;
}

.main__box:hover {
    border: 1px solid var(--primary-blue);
}

.main__img {
    width: 55%;
    aspect-ratio: 1/1;
    object-fit: contain;
}

.main__link {
    position: absolute;
    display: block;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

@media only screen and (min-width: 769px) {
    .main__box {
        --main-items: 4;
        font-size: var(--text-sm);
    }
}

@media only screen and (min-width: 993px) {
    .main__box {
        --main-items: 5;
    }
}

/* Items
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.items__container {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.items__top-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
}

.items__top-controls--mobile {
    justify-content: flex-start;
}

.items__search {
    width: 100%;
    flex-basis: 100%;
}

.items__search-container {
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.items__search-input {
    font-size: var(--text-sm);
    appearance: none;
    width: 100%;
    height: 2.5rem;
    display: inline-flex;
    padding: 0 0.875rem;
    background-color: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 4px;
    box-shadow: none;
    box-sizing: border-box;
}

.items__search-input:focus {
    outline: none;
    border: 1px solid var(--primary-blue);
}

.search-suffix {
    appearance: none;
    position: absolute;
    display: inline-flex;
    right: 1rem;
    background-color: white;
    border: none;
}

.items__search-submit {
    appearance: none;
    position: absolute;
    right: 0;
    width: 4rem;
    height: 100%;
    border: none;
    background-color: transparent;
    cursor: pointer;
    border-left: none;
    border-radius: 0 4px 4px 0;
}

.items__view-as {
    flex-grow: 1;
    display: flex;
    gap: 1rem;
    height: 2.5rem;
}

.items__view-link {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--grey-200);
    cursor: pointer;
    border-radius: 4px;
}

.items__view-link:hover {
    border: 1px solid var(--primary-blue);
}

.items__view-link.active {
    border: 1px solid var(--primary-blue);
}

.items__sort {
    position: relative;
    display: flex;
    align-items: center;
    height: 2.5rem;
    width: 50%;
    flex-basis: 50%;
}

.items__sort-form {
    height: 100%;
    width: 100%;
}

.items__select {
    font-size: var(--text-sm);
    appearance: none;
    width: 100%;
    height: 100%;
    padding: 0 0.875rem;
    border: 1px solid var(--grey-200);
    background-color: var(--grey-50);
}

.items__filter-btn {
    height: 2.5rem;
    width: 50%;
    flex-basis: 50%;
}

@media only screen and (min-width: 769px) {
    .items__sort {
        width: 30%;
        flex-basis: 30%;
    }

    .items__filter-btn {
        width: 30%;
        flex-basis: 30%;
    }
}


@media only screen and (min-width: 993px) {
    .items__search {
        width: 75%;
        flex-basis: 75%;
    }

    .items__sort {
        flex-grow: 1;
        width: auto;
        flex-basis: auto;
    }
}

/* Items Grid
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.items__grid {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
}

.item {
    font-size: var(--text-sm);
    color: var(--grey-700);
    --items: 1;
    position: relative;
    box-sizing: border-box;
    border: 1px solid var(--grey-200);
    width: calc((100% / var(--items)) - (((var(--items) - 1) / var(--items)) * 1rem));
    background-color: var(--white);
}

.item__container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.item__figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    white-space: normal;
    background-color: white;
    padding: 0 0;
    border-bottom: solid 1px var(--grey-200);
}

.item__img-link {
    display: block;
    position: relative;
    text-decoration: none;
    transition: all .3s ease;
}

.item__vendor {
    position: absolute;
    max-width: 52px;
    right: 16px;
    top: 16px;
    left: auto;
    bottom: auto;
    z-index: 1;
}

.item__img-container {
    position: relative;
    background-color: var(--grey-50);
    margin-left: auto;
    margin-right: auto;
    transition: all .5s ease-in-out;
    object-fit: cover;
    height: 12rem;
}

.item__img-container:hover {
    transform: scale(1.07);
}

.item__img {
    width: 35%;
    aspect-ratio: 1/1;
    object-fit: contain;

    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate3d(-50%, -50%, 0);
    transition: all .7s ease;
}

.item__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
}

.item__info {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1rem;
}

.item__order {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item__title {
    font-size: var(--text-sm);
    margin: 0;
}

.item__title:hover {
    text-decoration: underline;
    color: var(--primary-blue);
}

.item__attributes {
    list-style-type: disc;
    margin: 0;
}

.item__attribute {
    margin-bottom: 0.25rem;
}

.item__availability {
    color: var(--primary-blue);
}

.item__availability:hover {
    text-decoration: underline;
}

.items__pricing {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
}

.items__qty {
    font-size: var(--text-sm);
    appearance: none;
    height: 2.5rem;
    padding: 0 0.875rem;
    background-color: var(--white);
    border: 1px solid var(--grey-100);
    border-radius: 4px;
    box-shadow: none;
    width: 30%;
    flex-basis: 30%;
}

.items__price {
    flex-grow: 1;
    font-size: var(--text-lg);
    font-weight: 700;
    text-align: right;
}

.items__call {
    width: 50%;
}

@media only screen and (min-width: 769px) {
    .item {
        --items: 3;
    }
}

@media only screen and (min-width: 993px) {
    .item {
        --items: 2;
    }
}

@media only screen and (min-width: 1200px) {
    .item {
        --items: 3;
    }
}






