/* GENERAL STYLING */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    margin: 0;
    padding: 0;
    color: #333;
}

/* SPACING FIXES */
.navbar-spacing {
    height: 150px;
    width: 100%;
}

/* MAIN CONTAINER */
.category_page {
    display: flex;
    justify-content: space-between;
    width: 85%;
    margin: auto;
    margin-top: 20px;
}

/* CATEGORY SIDEBAR */
.category_dropdown-content {
    flex: 0 0 280px;
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    left: -10px;
}

.category_dropdown-content a {
    display: block;
    padding: 12px;
    margin-bottom: 5px;
    text-decoration: none;
    color: #1a1a1a;
    border-radius: 5px;
    background-color: transparent;
    transition: 0.3s ease;
}

.category_dropdown-content a:hover,
.category_dropdown-content a.active {
    background-color: #9ab6d2;
    color: #1a1a1a;
}

/* CATEGORY CONTAINER */
.category_container {
    flex-grow: 1;
    padding: 25px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

/* CATEGORY HEADING */
.category_container h2 {
    text-align: center;
    font-size: 26px;
    color: #1a1a1a;
    margin-bottom: 20px;
    border-bottom: 2px solid #9ab6d2;
    display: inline-block;
    padding-bottom: 5px;
}

/* CATEGORY IMAGE */
.category_image img {
    max-height: 350px;
    width: auto;
    display: block;
    margin: 20px auto;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* PRODUCT LIST BACKGROUND */
.product_list {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* TABLE STYLING */
.product_list table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
}

.product_list th {
    background-color: #333;
    color: #f5f7fa;
    padding: 12px;
    text-align: center;
    font-size: 16px;
}

.product_list td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    background-color: #f5f7fa;
    color: #1a1a1a;
}

.product_list tr:nth-child(even) td {
    background-color: #e9eef3;
}

.product_list tr:hover td {
    background-color: #9ab6d2;
    color: #1a1a1a;
    transition: background-color 0.3s ease;
}

/* PRODUCT LINK STYLE */
.product_list td a {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 500;
}

.product_list td a:hover {
    text-decoration: underline;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    margin: 0 5px;
    padding: 10px 16px;
    text-decoration: none;
    background-color: #f5f7fa;
    border: 1px solid #ccc;
    color: #333;
    border-radius: 5px;
    transition: 0.3s;
}

.pagination a.active,
.pagination a:hover {
    background-color: #9ab6d2;
    color: #1a1a1a;
}



/* ============================ */
/* RESPONSIVE DESIGN - TABLETS */
/* ============================ */
@media screen and (max-width: 992px) {
    .category_page {
        flex-direction: column;
        width: 95%;
        padding: 10px;
    }

    .category_dropdown-content {
        flex: 1 1 100%;
        margin-bottom: 20px;
        position: static;
        width: 100%;
        padding: 10px;
    }

    .category_container {
        width: 100%;
        padding: 15px;
    }

    .category_image img {
        max-height: 250px;
    }

    .product_list th,
    .product_list td {
        font-size: 14px;
        padding: 8px;
    }

    .category_container h2 {
        font-size: 22px;
    }

    .pagination a {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* =========================== */
/* RESPONSIVE DESIGN - MOBILE */
/* =========================== */
@media screen and (max-width: 576px) {
    .navbar-spacing {
        height: 120px;
    }

    .category_page {
        flex-direction: column;
        width: 100%;
        padding: 5px;
    }

    .category_dropdown-content {
        display: none;
    }

    .category_container {
        padding: 10px;
    }

    .category_container h2 {
        font-size: 20px;
        text-align: center;
    }

    .category_image img {
        width: 100%;
        max-height: 180px;
    }

     /* Hide part number column */
     .product_list th.part-no,
     .product_list td.part-no {
         display: none;
     }

    .product_list {
        padding: 10px;
        overflow-x: auto;
    }

    .product_list table {
        width: 100%; /* instead of fixed 600px */
    }

    .product_list th,
    .product_list td {
        font-size: 13px;
        padding: 6px;
    }

    
    .product_list th.catalog-no,
    .product_list td.catalog-no,
    .product_list th.product-name,
    .product_list td.product-name {
        text-align: left;
        font-size: 14px;
        padding: 8px 6px;
        word-break: break-word;
    }

    .product_list td a {
        display: inline-block;
        max-width: 100%;
        white-space: normal;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination a {
        font-size: 13px;
        padding: 6px 10px;
    }
}

