body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
}

h1 {
    color: #333;
    text-align: center;
}

#searchForm {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#searchForm input[type="text"] {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    flex-grow: 1;
    max-width: 400px;
}

#searchForm button {
    padding: 10px 15px;
    font-size: 1em;
    border: 1px solid #007bff;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: background-color 0.2s ease;
}

#searchForm button:hover {
    background-color: #0056b3;
}

 #loading, #error {
     text-align: center;
     margin: 20px;
     font-size: 1.1em;
 }

#results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Responsive grid */
    gap: 15px;
    margin-top: 20px;
}

.item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content */
    text-align: center;
}

.item h2 {
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.item p {
    margin: 5px 0;
    color: #555;
}

.item .price {
    font-weight: bold;
    color: #007bff;
    font-size: 1.2em;
    margin-top: 10px;
}

 .item img {
     max-width: 100px;
     height: 100px; /* Fixed height */
     object-fit: contain; /* Scale image while preserving aspect ratio */
     margin-bottom: 10px;
     background-color: #eee; /* Light background for missing images */
     border-radius: 3px;
 }
 .item .no-image {
     width: 100px;
     height: 100px;
     background-color: #eee;
     color: #888;
     display: flex;
     justify-content: center;
     align-items: center;
     font-size: 0.8em;
     margin-bottom: 10px;
     border-radius: 3px;
 }

.error-message {
     color: #dc3545; /* Red color for errors */
     background-color: #f8d7da;
     border: 1px solid #f5c6cb;
     padding: 10px;
     border-radius: 4px;
}