body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
}

header {
    background-color: #f9f9f9;
    color: black; /* Adjusted from white to black for better contrast */
    padding: 10px 0;
    text-align: center;
}

.logo-container img {
    width: 150px;
}

main {
    padding: 20px;
    max-width: 1200px; /* Added max-width for better content control */
    margin: 0 auto; /* Centering the main content */
}

.products {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
}

.product {
    background-color: #fff;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #ddd;
    text-align: center;
    flex: 1 1 calc(33.333% - 40px); /* Flexible basis with margin gap */
    box-sizing: border-box;
    border-radius: 5px; /* Added border-radius for better aesthetics */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Added box-shadow for subtle depth */
}

.product img {
    max-width: 100%; /* Ensures image does not overflow the container */
    height: auto;
    max-height: 300px; /* Limits the height of the image */
    object-fit: contain; /* Ensures the image scales proportionally */
    margin-bottom: 15px; /* Added margin for spacing */
}

.product h2 {
    margin-top: 0;
}

.product p {
    margin: 10px 0;
    font-size: 16px; /* Added font size for better readability */
}

.product a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.product a:hover {
    background-color: #0056b3;
}

#payment-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

#link-authentication-element,
#payment-element {
    margin: 20px 0;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 0px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

#error-message {
    color: red;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .product {
        flex: 1 1 calc(50% - 40px);
    }
}

@media (max-width: 600px) {
    .product {
        flex: 1 1 100%;
    }
}
