/* --------------------------- GESTION GRILLE --------------------------- */

#category .rowCategory{
    margin-inline: 0px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 26px;
}

#category #wrapper {
    background-color: var(--color-white-smoke)!important;
    padding-bottom: 100px!important;
}

#category #category-header #title,
#category #left-column{
    grid-column: 1/4;
}

#category #category-header #js-product-list-header,
#category #category-header #subcategories,
#category #content-wrapper{
    grid-column: 4/13;
}

@media (max-width: 1200px) {
    #category #left-column,
    #category #category-header #title{
        grid-column: 1/5;
    }
    #category #category-header #js-product-list-header,
    #category #category-header #subcategories,
    #category #content-wrapper{
        grid-column: 5/13;
    }
}

@media (max-width: 992px) {
    #category #category-header #title,
    #category #category-header #js-product-list-header,
    #category #category-header #subcategories{
        grid-column: initial;
    }
}

@media (max-width: 768px) {
    #category .rowCategory{
        display: flex;
        flex-direction: column;
    }
    #category #left-column,
    #category #category-header #title,
    #category #category-header #js-product-list-header,
    #category #category-header #subcategories,
    #category #content-wrapper{
        grid-column: initial;
    }

    #category #wrapper .container {
        padding-inline: 20px;
    }

    #category #wrapper {
        padding-bottom: 55px!important;
    }
}

/* --------------------------- CATÉGORIE HEADER --------------------------- */

#category #category-header{
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
    grid-area: 1 / 1 / 2 / -1;
}


#category #category-header #title h1{
    font-size: 2.8125rem;
    line-height: 3.1875rem;
    text-transform: uppercase;
    margin-bottom: 28px;
    max-width: 1410px;
    width: 100%;
    margin-inline: auto;
    display: block;
}

#category #category-header #title .category-product-count{
    font-size: 1rem;
    line-height: 1.5rem;
    margin-block: 5px 0px;
}

#category #category-header #js-product-list-header .block-category{
    padding: 0px;
    margin: 0px;
    min-height: 0px;
    max-width: 1410px;
    width: 100%;
    margin-inline: auto;
}

#category #category-header #js-product-list-header .block-category .category-cover{
    margin-bottom: 25px;
    display: none;
}

#category #category-header #js-product-list-header .block-category .category-cover img{
    width: 100%;
    height: auto;
    aspect-ratio: 16/3;
    object-fit: cover;
}

#category #category-header #js-product-list-header .block-category .category-description,
#category #category-header #js-product-list-header .block-category .category-description *{
    font-size: .875rem;
    line-height: 1.5625rem;
    margin: 0px;
}

#category #wrapper .breadcrumb {
    max-width: 1410px;
    width: 100%;
    margin-inline: auto;
    display: block;
}

#category #category-header #subcategories{
    margin: 0px;
    border: none !important;
    margin-top: 71px;
    max-width: 1410px;
    width: 100%;
    margin-inline: auto;
    display: block;
    position: relative;
}

#category #category-header #subcategories .img-fluid{
    width: 100%;
    aspect-ratio: 176/142;
    object-fit: contain;
}

#category #category-header #subcategories .subcategories-list{
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 40px 30px;
    margin: 0px !important;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#category #category-header #subcategories .swiper-slide {
    width: 100%;
    overflow: visible;
}

#category #category-header #subcategories .swiper-slide > a {
    border: 1px solid #D9D9D9;
    background-color: var(--color-white);
    border-radius: 10px;
    display: block;
    padding: 15px;
    transition: box-shadow 0.25s ease;
}

#subcategories > .swiper > .swiper-wrapper {
    padding: 10px;
    overflow: visible;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

#subcategories > .swiper > .swiper-wrapper::-webkit-scrollbar {
  display: none;
}

#category #category-header #subcategories .swiper-slide > a:hover {
    border-color: var(--color-black);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.25s ease;
}

#category #category-header #subcategories .subcategory-image {
    margin-bottom: 7px;
}

.subcategory-name {
    text-align: center;
    font-family: var(--ffMBo);
    font-size: .875rem;
    line-height: normal;
    margin-bottom: unset;
    height: 42px;
}

#category #category-header #subcategories .subcategories-list::-webkit-scrollbar{
    display: none;
}

#category #category-header #subcategories .subcategories-list li{
    width: auto;
    min-width: initial;
    margin: 0px;
    text-align: start;
}

#category #category-header #subcategories .subcategories-list li .subcategory-image{
    padding: 0px;
    margin-bottom: 10px;
}

#category #category-header #subcategories .subcategories-list li .subcategory-image img{
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
}

#category #category-header #subcategories .subcategories-list li .subcategory-name{
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
    margin: 0px;
    text-transform: none;
    color: var(--color-black) !important;
}

#category #category-header #subcategories .subcategories-list li .cat_desc{
    display: block;
    margin: 8px 0px 0px 0px !important;
}

#category #category-header #subcategories .subcategories-list li .cat_desc,
#category #category-header #subcategories .subcategories-list li .cat_desc *{
    font-size: .875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: var(--color-black) !important;
    margin: 0px;
}

.subcategories-swiper {
    width: 100%;
    position: static;
    max-width: 1320px;
    padding-inline: 10px;
}

#subcategories .swiper-button-next,
#subcategories .swiper-button-prev{
    position: absolute;
    background-color: transparent;
    border: none;
    border-radius: unset;
    top: 50%;
}

#subcategories .swiper-button-prev{
    left: 0;
    justify-content: start;
}

#subcategories .swiper-button-next{
    right: 0;
    justify-content: end;
}

.readMore {
    display: block;
    margin-top: 16px;
}

#category #category-header #js-product-list-header .block-category .category-description {
    max-height: 155px;
    height: 100%;
    overflow: hidden;
}
    
#category #category-header #js-product-list-header .block-category .category-description.full {
    max-height: fit-content;
}

#category #category-header #js-product-list-header .block-category .category-description.full + .readMore {
    display: none;
}

@media (min-width: 993px) {
    #category #category-header #subcategories .subcategories-list li:hover .subcategory-name{
        color: var(--color-primary) !important;
    }
}

@media (max-width: 1600px) {
    /* #category #category-header #title h1{
        font-size: 1.75rem;
        line-height: 2.125rem;
    } */
    #category #category-header #title .category-product-count{
        font-size: .875rem;
        line-height: 1.125rem;
    }
}

@media (width < 1490px) {
    #category #category-header #subcategories {
        padding-inline: 40px;
    }
}

@media (max-width: 1400px) {
    #category #category-header #subcategories .subcategories-list{
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    #category #category-header #subcategories .subcategories-list{
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {

    #category #wrapper .breadcrumb {
        margin-left: 15px;
    }

    #category #category-header{
        margin-bottom: unset;
    }

    #category #category-header{
        display: flex;
        flex-direction: column;
        gap: 8px 0px;
        margin-top: unset;
        padding-inline: 15px;
    }

    #category #category-header #subcategories {
        margin-top: 20px;
    }

    #category #category-header #title h1{
        font-size: 2.1875rem;
        line-height: 1.875rem;
        margin-bottom: unset;
    }

    /* #category #category-header #subcategories{
        width: 100vw;
        transform: translateX(-20px);
    } */
    
    #category #category-header #subcategories .subcategories-list{
        display: flex;
        justify-content: start;
        flex-wrap: nowrap;
        overflow-x: scroll;
        padding-inline: 20px;
    }

    #category #category-header #subcategories .subcategories-list li{
        width: 60vw;
        min-width: 60vw;
        max-width: 60vw;
    }

    #category #category-header #js-product-list-header .block-category .category-cover{
        margin-bottom: 20px;
    }

    #category #category-header #js-product-list-header .block-category .category-cover img{
        aspect-ratio: 16/6;
    }

    #category #category-header #js-product-list-header .block-category .category-description {
        max-height: 78px;
        overflow: hidden;
    }

    #category #category-header #js-product-list-header .block-category .category-description * {
        font-size: .75rem!important;
        line-height: 1.25rem!important;
    }

    .readMore {
        display: block;
        font-family: var(--ffMBo);
        font-size: .75rem;
        line-height: 1.125rem;
        color: var(--color-black);
        margin-top: 13px;
    }
}

@media (width < 577px) {
    #category #category-header #subcategories {
        padding-inline: unset;
    }

    #subcategories .swiper-button-next {
        right: -25px;
    }

    #subcategories .swiper-button-prev {
        left: -25px;
    }

    .subcategory-name {
        min-height: 42px;
    }

    #category #wrapper .breadcrumb {
        margin-bottom: 14px;
    }
}

/* --------------------------- LEFT COLUMN --------------------------- */

#left-column{
    background-color: var(--color-white);
    padding: 30px 20px;
    height: fit-content;
}

#left-column .block-categories{
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    #category #left-column{
        /* display: none !important; */
        position: fixed;
        width: 100vw;
        top: 0px;
        left: 0px;
        overflow-y: scroll;
        height: 100vh;
        padding-bottom: 100px !important;
    }

    /* #category #left-column:has(#search_filters_wrapper.hidden-sm-down){
        display: none !important;
    } */

    #category #left-column #search_filters_wrapper{
        margin-inline: 0px !important;
        padding: 68px 35px 45px 35px!important;
        min-height: 100vh;
    }

    #category #left-column #search_filter_controls #_mobile_search_filters_clear_all button {
        position: static;
    }

    #category #wrapper:has(#left-column.active) {
        background-color: var(--color-white)!important;
    }
}

/* --------------------------- CATÉGORIE GRID --------------------------- */

#category #content-wrapper{
    width: 100%;
}

#main > #products{
    container-type: inline-size;
}

#main > #products .products{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px 26px;
}

#main > #products .products .product{
    padding: 0px;
    float: none;
    width: 100%;
    border-radius: 8px;
}

#main > #products > #js-product-list > .products{
    margin-inline: 0px !important;
}


#category #content-wrapper > #main > #products > #manufacturer-title,
#category #content-wrapper > #main > #products > #manufacturer-short_description,
#category #content-wrapper > #main > #products > #manufacturer-description {
    display: none;
}

@media (width < 1700px) {
    #main > #products .products{
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (width < 993px) {
    #main > #products .products{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (width < 769px) {
    #main > #products .products{
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 768px) {
    #main > #products .products{
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px 15px;
    }
}

/* --------------------------- TRIER PAR --------------------------- */

#category #js-product-list-top .total-products{
    display: none;
}

.sort-by-row{
    gap: 16px;
    justify-content: end;
}

.sort-by-row .sort-by,
.sort-by-row .products-sort-order{
    width: auto !important;
    padding: 0px !important;
    margin: 0px !important;
}

.sort-by-row .sort-by{
    font-size: .8125rem;
    line-height: 1.75rem;
    color: var(--color-black);
    display: block !important;
    white-space: nowrap;
}

.sort-by-row .products-sort-order button{
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--color-black);
    padding: 8px 35px 6px 22px;
    border: 1px solid var(--color-black);
    background-color: var(--color-white);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 10px;
}

.sort-by-row .products-sort-order button::after{
    content: '';
    display: block;
    background-image: url(../../img/logosIcons/next.svg);
    color: transparent;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(90deg);
    width: 20px;
    height: 12px;
}

.sort-by-row .products-sort-order button i{
    display: none;
}

.brands-sort .select-list:hover, 
.products-sort-order .select-list:hover, 
.suppliers-sort .select-list:hover{
    background: var(--color-primary);
}

.products-selection{
    display: flex;
    align-items: end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 40px;
}

#category .products-selection{
    justify-content: end;
    margin-bottom: 35px;
}

.products-selection .showing{
    font-size: 1rem;
    line-height: 1.25rem;
    color: var(--color-dark-grey);
}

.products-selection .total-products,
.products-selection .total-products p{
    margin: 0px;
    padding: 0px;
}

#category #wrapper .products-selection .sort-by-row {
    justify-content: space-between;
    width: 100%;
    gap: 34px;
}

#category #wrapper .products-selection .products-sort-order {
    width: 100%!important;
}

#category #left-column {
    padding: unset;
    background-color: transparent;
}

#category #search_filters_wrapper {
    background-color: var(--color-white);
    padding: 30px 22px;
    border-radius: 8px;
}

#category #search_filters_wrapper .filter-title-wrapper {
    display: none;
}

.mobileSpawn {
    display: none;
}

#category .products-sort-order .select-title {
    border-color: var(--color-black);
}

@media (max-width: 768px) {
    #category #wrapper #content-wrapper > #main {
        display: flex;
        flex-direction: column;
    }

    #category #search_filters_wrapper .filter-title-wrapper {
        display: flex;
        flex-wrap: wrap;
    }

    .mobileSpawn {
        display: flex;
        align-items: center;
        margin-bottom: 25px;
        gap: 34px;
    }

    #category .products-sort-order .select-title {
        font-size: .75rem;
        line-height: 1.25rem;
        padding: 8px 7px 6px 17px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #category .products-sort-order .select-title > i.material-icons {
        background-image: url(../../img/logosIcons/next.svg);
        color: transparent;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        transform: rotate(90deg);
        width: 20px;
        height: 12px;
    }

    #category .products-sort-order {
        width: 100%;
        max-width: 249px;
        float: none;
        padding: unset;
    }

    .mobileSpawn > .hidden-sm-down.sort-by {
        display: block!important;
        font-size: .75rem;
        line-height: normal;
        width: fit-content;
        padding: unset;
    }

    #category #wrapper .products-selection .sort-by-row * {
        display: flex!important;
    }

    #category #left-column.active .filter-button {
        display: none !important;
    }
    
    .sort-by-row{
        justify-content: start;
        display: flex!important;
    }
    .products-selection .showing{
        font-size: .875rem;
        line-height: 1.125rem;
    }
    #js-product-list-top .filter-button{
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        z-index: 12;
    }

    #category #left-column {
        z-index: 10;
        height: fit-content;
    }

    #category #left-column.active {
        height: 100%;
    }

    #js-product-list-top .filter-button.hide{
        display: none !important;
    }
    #js-product-list-top .filter-button #search_filter_toggler{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        border-radius: 0px;
        background-color: var(--color-primary)!important;
        color: var(--color-black)!important;
        border: none!important;
        text-transform: none;
        font-size: 1rem!important;
        line-height: 1.5625rem!important;
        padding-block: 14px 10px;
    }
    #js-product-list-top .filter-button #search_filter_toggler::after{
        content: "";
        display: block;
        width: 18px;
        height: 18px;
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        background-image: url(../../img/logosIcons/filter.svg);
    }

    #category #left-column .products-selection .sort-by,
    #category #left-column .products-selection .products-sort-order,
    #category #left-column .products-selection .showing {
        display: none!important;
    }

    #category #left-column.active .products-selection {
        margin-bottom: unset;
    }
}

/* --------------------------- FILTRES --------------------------- */

#category #js-active-search-filters.active_filters{
    padding: 15px 20px !important;
    background: var(--color-light-grey) !important;
    display: none;
    align-items: center;
    gap: 16px;
}

#category #js-active-search-filters.active_filters p{
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--color-black);
    font-weight: normal;
    margin: 0px;
    white-space: nowrap;
}

#category #js-active-search-filters.active_filters ul{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0px;
}

#category #js-active-search-filters.active_filters ul li{
    margin: 0px;
}

@media (min-width: 993px) {
    #category #js-active-search-filters.active_filters .filter-block .close:hover{
        color: var(--color-primary);
    }
}

/* --------------------------- PAGINATION --------------------------- */

.pagination {
    margin-block: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    color: var(--color-dark-grey);
    font-size: 1rem;
    line-height: 1.25rem;
}

.pagination .page-list{
    background: none;
    padding: 0px;
    display: flex;
    gap: 10px;
}

.pagination .page-list li,
.pagination .page-list li a{
    font-size: 1rem;
    line-height: 1.25rem;
    color: var(--color-dark-grey);
    letter-spacing: normal !important;
    font-weight: normal;
}

.pagination .page-list li.current,
.pagination .page-list li.current a{
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .pagination {
        justify-content: center;
        font-size: 0.875rem;
        line-height: 1.125rem;
        margin-bottom: unset;
    }
}

/* --------------------------- CATEGORIE FOOTER --------------------------- */

#category #js-product-list-footer{
    margin-bottom: 40px;
}

#category #js-product-list .up{
    display: none;
}

@media (max-width: 768px) {
    #category #js-product-list-footer .category-additional-description > p{
        font-size: .875rem;
        line-height: 1.25rem;
    }
}

/* --------------------------- AUTRE --------------------------- */

#new-products h1#title,
#best-sales h1#title, 
#prices-drop h1#title,
#search h1#title{
    color: var(--color-black);
    margin-bottom: 25px;
}

#new-products #content-wrapper,
#best-sales #content-wrapper, 
#prices-drop #content-wrapper{
    padding-left: 40px !important;
}

@media (max-width: 768px) {
    #new-products #content-wrapper,
    #best-sales #content-wrapper, 
    #prices-drop #content-wrapper{
        padding-left: 0px !important;
        margin-top: 40px !important;
    }
}