.marketplace {
    padding: 2rem;
}

.marketplace-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.products-grid {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap onto the next row */
    justify-content: flex-start; /* Distribute cards evenly across the row */
    gap: 0.5rem; /* Adjust gap between items */
    margin: 0 auto;
}

.product-card {
    flex: 1 1 calc(20% - 0.5rem); /* 20% width per card minus the gap */
    max-width: calc(20% - 0.5rem); /* Ensure no card exceeds 20% of the row width */
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
    margin: 0; /* Ensure no extra margins around cards */
    padding: 0.5rem; /* Adjust padding inside cards for compact design */
}

.product-card:hover {
    transform: translateY(-3px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-details {
    padding: 0.5rem;
}

.product-details p {
    padding: 0.2rem;
}

.product-title {
    font-size: 1.1rem; /* Slightly smaller title font */
    margin: 0.3rem 0;
}

.product-price {
    color: #28a745;
    font-size: 1rem;
    margin: 0.5rem 0;
}

.product-seller {
    color: #666;
    font-size: 0.9rem;
    margin: 0.2rem 0;
}

.product-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.5rem;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.product-btn:hover {
    background-color: #0056b3;
}
