.product-listing {
    padding: 30px 0;
}

.product-listing h1 {
    text-align: center;
    margin-bottom: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding-bottom: 15px;
}

.product-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 15px;
}

.product-item img {
    width: 100%;
    height: 400px;
    display: block;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.product-item h3 {
    font-size: 1em;
    margin-bottom: 5px;
    min-height: 40px; /* Ensure product names take up some consistent space */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.product-item .price {
    color: #007bff;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-item .add-to-cart {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 0.8em 1.5em;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.product-item .add-to-cart:hover {
    background-color: #064113;
}
.product-filter {
    padding: 20px;
    background-color: #f8f8f8;
    margin-bottom: 20px;
    border-radius: 8px;
}

.product-filter h1 {
    text-align: center;
    margin-bottom: 15px;
}

@media screen and (max-width: 868px) {
    .product-filter {
        padding: 10px;
        background-color: #f8f8f8;
        margin-bottom: 10px;
        border-radius: 8px;
    }

}

.filter-controls {
    display: inline;
    gap: 10px;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.filter-controls input[type="text"],
.filter-controls select,
.filter-controls input[type="number"] {
    padding: 0.8em;
    border: 1px solid #ccc;
    border-radius: 5px;
    flex-grow: 1;
}

.filter-controls .price-range {
    display: flex;
    gap: 5px;
    flex-grow: 1;
}

.filter-controls .price-range input[type="number"] {
    flex-grow: 1;
}

.filter-controls .button {
    padding: 0.8em 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.filter-controls .button[type="submit"] {
    background-color: rgb(141, 19, 194);
    color: #fff;
}

.filter-controls .button[type="submit"]:hover {
    background-color: rgb(76, 4, 107);
}

.filter-controls .button:not([type="submit"]) {
    background-color: #6c757d;
    color: #fff;
    text-decoration: none;
}

.filter-controls .button:not([type="submit"]):hover {
    background-color: #2b333a;
}

/* Adjust for smaller screens */
@media (max-width: 600px) {
    .filter-controls {
        flex-direction: column;
    }

    .filter-controls .price-range {
        flex-direction: row;
    }
}

.product-listing {
    padding: 10px 0;
}

.product-listing h1 {
    text-align: center;
    margin-bottom: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    padding: 0 20px;
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding-bottom: 15px;
    border-style: solid;
    border-color: rgb(243, 47, 171);
}

.product-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 10px;
}

.product-image-container { /* New container for the image */
    width: 100%; /* Make the container take full width of the product item */
    height: 200px; /* Adjust this value to your desired fixed height for the images */
    overflow: hidden; /* Clip any part of the image that goes outside the container */
    margin-bottom: 3px; /* Add some space below the image container */
    display: flex; /* For centering the image */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
}

.product-item img {
    max-width: 100%;
    max-height: 300px;
    display: block;
    object-fit: contain; /* Ensures the image fits within the container without cropping, maintaining aspect ratio */
}

.product-item h3 {
    font-size: 1em;
    margin-bottom: 5px;
    min-height: 40px; /* Ensure product names take up some consistent space */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}


.product-item .price {
    color: #007bff;
    font-weight: bold;
    margin-bottom: 5px;
}

.product-item .add-to-cart {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 0.8em 1.5em;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.product-item .add-to-cart:hover {
    background-color: #0a2f12;
}
.product-filter {
    padding: 20px;
    background-color: #f8f8f8;
    margin-bottom: 20px;
    border-radius: 8px;
}

.product-filter h1 {
    text-align: center;
    margin-bottom: 15px;
}

.filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.filter-controls input[type="text"],
.filter-controls select,
.filter-controls input[type="number"] {
    padding: 0.8em;
    border: 1px solid #ccc;
    border-radius: 5px;
    flex-grow: 1;
}

.filter-controls .price-range {
    display: flex;
    gap: 5px;
    flex-grow: 1;
}

.filter-controls .price-range input[type="number"] {
    flex-grow: 1;
}

.filter-controls .button {
    padding: 0.8em 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.filter-controls .button[type="submit"] {
    background-color: rgb(141, 19, 194);
    color: #fff;
}

.filter-controls .button[type="submit"]:hover {
    background-color: rgb(76, 4, 107);
}

.filter-controls .button:not([type="submit"]) {
    background-color: #6c757d;
    color: #fff;
    text-decoration: none;
}

.filter-controls .button:not([type="submit"]):hover {
    background-color: #41464b;
}

/* Adjust for smaller screens */
@media (max-width: 800px) {
    .filter-controls {
        flex-direction: column;
    }

    .filter-controls .price-range {
        flex-direction: row;
    }
    .product-item {
        padding-bottom: 5px;
    }
}

