/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f7f7f7;
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background-color: #0056a6;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

header .logo img {
    height: 50px;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav ul li {
    display: inline;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.banner {
    background-color: #ffe600;
    text-align: center;
    padding: 40px 20px;
    color: #0056a6;
}

.banner h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.banner p {
    font-size: 1.2em;
}

.product-catalog {
    padding: 20px;
    width: 100%; /* Ensures the catalog uses full width */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 products per row */
    gap: 20px; /* Space between items */
    justify-items: center;
    align-items: start;
    width: 100%;
}

.product-item {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.product-item img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: 300px;
    object-fit: contain;
}

.product-item h2 {
    color: #0056a6;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.product-item p {
    margin-bottom: 10px;
    font-size: 1em;
}

.product-item .price {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.initial-price {
    text-decoration: line-through;
    color: red;
    margin-right: 10px;
}

.final-price {
    font-weight: bold;
    color: #0056a6;
}

.product-item button {
    background-color: #0056a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.product-item button:hover {
    background-color: #003f7d;
}

footer {
    background-color: #0056a6;
    color: white;
    text-align: center;
    padding: 20px;
}

footer a {
    color: white;
    text-decoration: none;
}

/* Responsive Grid: 3 items per row on desktop and 1 item per row on mobile */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr; /* 1 column layout on mobile */
    }

    .product-item {
        width: 100%; /* Ensure product items take full width on mobile */
    }

    .product-item img {
        height: auto; /* Adjust height for smaller screens */
    }

    /* Mobile: Ensure the nav is displayed in a row */
    header nav ul {
        display: flex;
        flex-direction: row; /* Align the nav items horizontally */
        justify-content: center; /* Center them horizontally */
    }

    header nav ul li {
        margin-right: 20px; /* Space between nav items */
    }

    header nav ul li:last-child {
        margin-right: 0; /* Remove margin from the last item */
    }

    .banner h1 {
        font-size: 2rem; /* Adjust heading size for smaller screens */
    }

    .banner p {
        font-size: 1rem; /* Adjust paragraph size for smaller screens */
    }
}

/* Additional mobile responsiveness for very small devices */
@media (max-width: 480px) {
    .banner h1 {
        font-size: 1.8rem; /* Further reduce font size on very small screens */
    }

    .banner p {
        font-size: 1rem;
    }

    .product-item {
        padding: 15px; /* Reduce padding for smaller screens */
    }

    .product-item h2 {
        font-size: 1.2rem; /* Smaller product titles */
    }

    .product-item .price {
        font-size: 1rem; /* Adjust the price size */
    }

    footer {
        font-size: 0.9rem; /* Adjust footer font size */
    }
}
