@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #102e21;
    --secondary-color: #909090;
    --header-color: #333;
}

body {
    background: var(--secondary-color);
}

/* Button */
.btn {
    padding: .7rem 1rem;
    border-radius: .5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0,0,0, .5) inset;
}

.btn:active {
    transform: translate(2px, 2px);
}


/* Header */
.header {
    height: 5rem;
    background: var(--header-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
}

.logo {
    background-color: #fff;
    padding: 1rem;
    margin: .5rem;
    display: flex;
    align-items: center;
    border-radius: 2rem;
}

.search-input {
    padding: .5rem;
    border-radius: 1rem 0;
    border: 2px solid var(--secondary-color);
    width: 30vw;
}

.search-input:focus {
    outline: none;
    border: 2px solid orange;
}

/* Products */
.product-container {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    padding: 1rem;
    margin-top: 5rem;
}

.product {
    background-color: #fff;
    margin: .5rem;
    display: flex;
    flex-direction: column;
    border-radius: .3rem;
    box-shadow: 0 0 4px rgba(0,0,0, .5);
    padding: 1rem;
    flex: 0 0 250px;
}

.product-img {
    width: 250px;
    height: 250px;
    border-bottom: 2px solid gray;
    object-fit: contain;
    object-position: center;
}

.product-content {
    width: 250px;
}

.product-title {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    margin: .4rem 0;
}

.product-description {
    margin: .2rem;
    text-align: justify;
}

.product-rating {
    display: flex;
    padding: .2rem;
}

.product-stars {
    color: orange;
    font-weight: 700;
    font-family: "Roboto", sans-serif;
}

.product-review-count {
    color: rgb(40, 145, 54);
    font-weight: bold;
    margin: 0 .5rem;
}

.product-price {
    font-family: "Roboto", sans-serif;
    margin: .2rem;
    font-weight: 500;
}

/* Category section */
.category-section, .sortby-section {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    position: relative;
}

.sortby-section {
    position: static;
}

.category-btn {
    background-color: rgb(13, 102, 227);
    color: white;
    font-weight: bold;
}

.category-options, .sortby-options {
    background-color: #333;
    border-radius: .5rem;
    position: absolute;
    top: 2.5rem;
    min-width: 15vw;
    border: 2px solid #666;
}

.sortby-options {
    top: 4rem;
    right: 1rem;
}

.category-option, .sortby-option {
    color: white;
    padding: .5rem;
    border-radius: .5rem;
    cursor: pointer;
    display: block;
}

.category-option:hover, .sortby-option:hover {
    background-color: #222;
}

.category-type, .js-sortby-filter {
    color: white;
    border: 2px solid #666;
    padding: .5rem;
    border-radius: 1rem;
    margin: 0 1rem;
    position: relative;
}

/* disable */
.disabled {
    display: none;
}

/* Sorting section */
.sortby-btn {
    background-color:#102e21;
    color: white;
    font-weight: bold;
    box-shadow: 2px 2px 4px rgba(255,255,255, 0.3) inset;
}