/* Ensure you have the FontAwesome library included in your project for the search icon */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    margin: 5px;
    /* Adjust margin as needed */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    /* Lock the header */
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    /* Ensure header background is white */
    padding: 20px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    /* Ensure it stays on top */
}

.logo-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.logo {
    height: 32px;
    /* Adjust size to 80% of the original */
}

.navbar {
    display: flex;
    gap: 30px;
    flex-grow: 2;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    font-size: 20px;
    /* Adjust font size */
    color: black;
    transition: all 0.3s ease-in-out;
    /* Smooth transition for hover effect */
    padding: 10px 90px;
    /* Add padding to create a box effect */
}

.nav-link:hover {
    background-color: black;
    color: white;
    border-radius: 20px;
    /* Rounded corners on hover */
}

.nav-link.active {
    background-color: rgb(34, 33, 33);
    color: white;
    padding: 10px 90px;
}

.search-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
    margin-right: 5%;
}

.search-form {
    display: flex;
}

.search-form input {
    height: 30px;
    font-size: 16px;
    padding: 5px 10px;
    width: 250px;
    border-radius: 10px;
    /* Adjust width */
}

.search-form button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    margin-left: 5px;
}

.search-icon {
    color: black;
}

.sections {
    margin-top: 100px;
    /* Adjust for fixed header height */
}

.section-title {
    font-size: 40px;
    text-align: center;
    margin-bottom: 50px; /* Reduce margin-bottom by 30% */
    margin-top: 50px;
    /* Increase margin to create more space */
    color: #000;
    /* Ensure text color is black */
}

.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    justify-content: center;
    row-gap: 60px;
    /* Add space between rows */
    padding: 0 20px;
    /* Add padding to ensure spacing on sides */
}

.product-item {
    background-color: transparent;
    padding: 20px;
    text-align: center;
    height: auto;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
}

.no-spare-parts {
    color: black;
    margin-bottom: 10px;
}

.product-title {
    margin-top: 10px;
    /* Increase space between image and title */
    font-size: 20px;
    font-weight: bold;
    color: black;
    /* Ensure text remains black */
    display: inline-block;
    /* Make it inline-block for precise hover box */
    transition: all 0.3s ease-in-out;
    /* Smooth transition for hover effect */
}

.product-item img {
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    max-width: 500px; /* Set a max width for all images */
    max-height: 300px; /* Set a max height for all images */
    object-fit: cover; /* Ensure images cover the container */
}

body {
    padding: 60px;
}

.centered {
    text-align: center;
}

.product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 70px;
}

.product-item img {
    width: 100%;
    height: auto;
    max-width: 500px; /* Ensure all images have the same max width */
    max-height: 300px; /* Ensure all images have the same max height */
    object-fit: cover; /* Ensure images cover the container */
}

.product-item a {
    text-decoration: none;
}

.product-item a:hover .product-title {
    color: white;
    /* Change text color to white on hover */
    background-color: black;
    /* Add black background color on hover */
    border-radius: 20px;
    /* Rounded corners */
    padding: 5px 10%;
    /* Add padding to create a box effect with 10% larger width */
}

.product-item a:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease-in-out;
}

.error-message {
    text-align: center;
    font-size: 48px;
    /* Twice as big */
    color: grey;
    /* Grey color */
    font-weight: bold;
    /* Bold text */
    margin: 170px;
    /* More space on upper margin */
}
