/*--------------------------------------------------------------
# Normalize
--------------------------------------------------------------*/
:root {
    --primary: #1A76D1;
    --text : #2C2D3F;
}

html,
body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
}

* {
    padding: 0;
    margin: 0;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary);
}


/************ Main ************/


/*** Main Container */
main .container {
    text-align: center;
    gap: 90px;

    display: grid;
    grid-template-columns: 1fr 4fr;
    grid-template-areas:
        "sidebar sortSelector"
        "sidebar products"
        "sidebar pagination"
    ;
}

/* sidbar section */
.sidebar-container {
    display: block;
    width: 300px;
    grid-area: sidebar;
}

#sidebar {
    display: block;
    font-weight: bold;
    color: var(--text);
    width: 300px;
    /* height: 450px; */
    padding: 30px;
    margin: 30px 0 0 30px;
    border: 1px solid #ececec;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(115, 115, 115, 0.03);
    transition: 0.3s all;
}

#sidebar .title {
    position: relative;
    width: 100%;
}

#sidebar h5 {
    display: flex;
    align-items: end;
    justify-content: space-between;
    border-bottom: 1px solid #ececec;
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-size: 24px;
    font-family: sans-serif;
    font-weight: 500;
    line-height: 1.2;
}

#sidebar h5::after {
    content: "";
    width: 80px;
    height: 2px;
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    border-radius: 100px;
}

#sidebar .categories{
    width: 100%;
    height: 390px;
    padding: 5px 10px;
    overflow-y: auto;
}

#sidebar .categories+div{
    margin-top: 50px;
}

.categories::-webkit-scrollbar {
    width: 2px;
}

.categories::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 50px;
}

.categories::-webkit-scrollbar-thumb {
    background: #bababa;
    border-radius: 50px;
    border: none;
    max-height: 30px;
}

.categories::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.categories::-webkit-scrollbar-button {
    display: none;
}

#sidebar ul {
    display: block;
    list-style: none;
    width: 97%;
}

#sidebar ul li {
    display: flex;
    align-items: center;
    line-height: 20px;
    border-radius: 5px;
    border: 1px solid #bedeff;
    padding: 9px 18px;
    margin: 0 0 15px 0;
    justify-content: space-between;
    transition: .3s all ease-in-out;
}

#sidebar ul li:hover {
    cursor: pointer;
    transform: scale(1.03);
    color: var(--primary);
    border: 0.5px solid var(--primary);
    box-shadow: 0 0 10px rgba(155, 155, 155, 0.3);
}

#sidebar ul h3 {
    width: 100%;
    padding: 2px 15px;
    text-align: start;
    font-weight: 500;
}

#sidebar ul li img{
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.price-filter .input-price{
    display: inline-block;
}

.price-filter input{
    width: 65px;
    height: 20px;
    text-align: end;
    border: 0.5px solid #ececec;
    padding: 10px;
    text-align: center;
}

.price-filter input:hover, .price-filter input:focus{
    border: 0.5px solid var(--primary);
    outline: none;
}

.price-filter button{
    display: block;
    width: 200px;
    height: 30px;
    background-color: var(--primary);
    color: #fff;
    border: none;
    margin: 10px auto;
}

.price-filter span{
    color: var(--text);
    margin: 0 3px;
}


/*** Selector Filters */
.sort-selector{
    display: block;
    height: 3px;
    width: 85%;
    text-align: end;
    padding-top: 40px;
    grid-area: sortSelector;
}

.sort-by {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sort-by-search{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-left: 35px;
}

.sort-by-search .search{
    border-radius: 4px;
    padding: 15px 9px 15px 16px;
    width: 200px;
    height: 25px;
    margin-left: 10px;
    border: 1px solid #ececec;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.03);
    outline: none;
    color: var(--text);
    font-size: .90rem;
    transition: .4s all ease-in-out;
}

.sort-by-search .search:hover {
    border: 1px solid #bedeff;
}

.sort-by-search .search::placeholder{
    color:#8b8b8b;
    font-size: 17px;
    letter-spacing: 2px;
}

.sort-by-search .search:focus,
.sort-by-search .search:not(:placeholder-shown){
    width: 300px;
    border: 1px solid #bedeff;
}

.sort-by-search i{
    transform: translate(-35px, 0px);
    color: var(--primary);
}

#sort-by-select{
    width: 150px;
    padding: 9px 16px;
    cursor: pointer;
    color: #777;
    text-align: start;
    border: 2px solid #ececec;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.03);
    border-radius: 5px;
}

#sort-by-select:hover, #sort-by-select:focus{
    border: 1px solid #bedeff;
    outline: none;
    color: var(--primary);
}


/*** Product Section */
#product-container {
    display: flex;
    justify-content: center;
    align-items: start;
    gap: 10px;
    flex-wrap: wrap;
    width: 90%;
    min-height: 300px;
    max-height: max-content;

    grid-area: products;
}

.product {
    width: 16%;
    min-width: 270px;
    padding: 20px 20px;
    border: 1px solid #ececec;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.03);
    transition: 0.3s ease;
    position: relative;
}

.product:hover {
    box-shadow: 0 0 10px rgba(155, 155, 155, 0.3);
    border: 0.5px solid #bedeff;
}

.product img {
    width: 95%;
    height: 250px;
    border-radius: 4px;
    transition: .3s all ease-in-out;
}

.product img:hover {
    transform: scale(1.1);
}

.product .description {
    border-top: 1px solid #8b8b8b;
    text-align: start;
    padding: 10px 0;
}

.product .description span {
    color: var(--primary);
    font-size: 14px;
}

.product .description h5 {
    padding: 7px 0;
    color: var(--text);
    font-size: 17px;
    margin-bottom: 10px;
    font-weight: 700;
}

.product .description .star span{
    font-size: 11px;
    padding-left: 3px;
    margin-bottom: 6px;
}

.fa-star {
    font-size: 11px;
    color: #ccc; 
}

.fa-star.active-star {
    color: #ffc107; 
}

.product .description h4 {
    padding-top: 7px;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.product .cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    font-size: 18px;
    line-height: 30px;
    border-radius: 50%;
    background-color: #e6f3ff;
    font-weight: 500;
    color: var(--primary);
    border: 1px solid #569be1;
    position: absolute;
    transition: .3s all ease-in-out;
}

.product .heart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    font-size: 23px;
    line-height: 30px;
    border-radius: 50%;
    position: absolute;
    cursor: pointer;
    transition: .3s all ease-in-out;
    background-color: #e6f3ff;
    color: var(--primary);
    border: 1px solid #569be1;
}

.product .heart{
    right: 24px;
    bottom: 18px;
}

.product .cart {
    right: 85px;
    bottom: 18px;
}

.product .cart:hover, .product .heart:hover {
    background-color: #569be1;
    color: #fff;
}
