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

body {
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: var(--primary-color);
}


/* =========================
   MAIN PAGE
========================= */

.product-page {
    width: 100%;
    max-width: 1400px;
    margin: auto;

    display: grid;
    grid-template-columns: 220px 1fr;

    gap: 25px;

    padding: 30px 40px;
}


/* =========================
   CATEGORY SIDEBAR
========================= */

.category-sidebar {
    border: 1px solid #e5e5e5;
    border-radius: 12px;

    padding: 18px;

    height: fit-content;
}


/* Category heading */

.sidebar-title {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-bottom: 15px;

    border-bottom: 1px solid #eeeeee;
}

.sidebar-title h3 {
    font-size: 16px;
}

.sidebar-title span {
    color: #777;
}


/* Category list */

.category-list {
    display: flex;
    flex-direction: column;

    padding-top: 8px;
}

.category-list a {
    text-decoration: none;
    color: #555;

    font-size: 14px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 5px;

    border-bottom: 1px solid #f1f1f1;

    transition: 0.2s;
}

.category-list a:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

.category-list a span {
    font-size: 20px;
    color: #888;
}


/* =========================
   PRODUCTS SECTION
========================= */

.products-section {
    min-width: 0;
}


/* Header */

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;
}

.products-header h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.products-header p {
    font-size: 12px;
    color: #888;
}


/* Sort */

.sort-box {
    display: flex;
    align-items: center;
    gap: 5px;

    font-size: 12px;
    color: #777;
}

.sort-box select {
    border: none;
    outline: none;

    font-size: 12px;
    font-weight: 600;

    background: transparent;
    cursor: pointer;
}


/* =========================
   PRODUCT GRID
========================= */

.product-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 25px 15px;
}


/* =========================
   PRODUCT CARD
========================= */

.product-card {
    text-decoration: none;
    color: var(--primary-color);

    display: block;

    min-width: 0;
}


/* Product image */

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;

    background: #f1f1f1;

    border-radius: 10px;

    overflow: hidden;

    margin-bottom: 10px;
}

.product-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;

    transition: 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}


/* Product name */

.product-card h3 {
    font-size: 14px;
    font-weight: 600;

    margin-bottom: 7px;
}


/* Rating */

.rating {
    font-size: 12px;
    color: #f5a900;

    margin-bottom: 6px;
}

.rating span {
    color: #777;
    margin-left: 4px;
}


/* Price */

.price {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-color);
}


/* =========================
   TABLET
========================= */

@media (max-width: 900px) {

    .product-page {
        grid-template-columns: 180px 1fr;

        padding: 25px 20px;

        gap: 20px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .product-page {
        display: block;

        padding: 20px 15px;
    }


    /* Category becomes horizontal */
    .category-sidebar {
        margin-bottom: 25px;
    }


    .category-list a {
        padding: 12px 5px;
    }


    .products-header {
        align-items: flex-start;

        gap: 15px;
    }


    .products-header h2 {
        font-size: 21px;
    }


    .sort-box {
        font-size: 11px;
    }


    .product-grid {
        grid-template-columns: repeat(2, 1fr);

        gap: 20px 12px;
    }


    .product-card h3 {
        font-size: 13px;
    }


    .price {
        font-size: 15px;
    }

}