body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #007bff;
    color: white;
    text-align: center;
    padding: 20px;
}

h1, h2, h3, h4 {
    margin-top: 0;
}

main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

#products {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;          /* Changed from space-around → center */
    gap: 30px;                        /* nicer spacing between cards */
    max-width: 1200px;                /* optional: prevents cards from spreading too wide on huge screens */
    margin: 0 auto;                   /* centers the whole grid container */
}

.product {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 550px;                 /* ← this is key: limits card width so they look balanced and centered */
    flex: 1 1 450px;                  /* allows growing/shrinking nicely */
}

.product-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

.buy-button {
    display: inline-flex;             /* Flex for side-by-side alignment */
    align-items: center;              /* Vertically centers text + logo */
    justify-content: space-between;   /* Pushes text left, logo right */
    gap: 12px;                        /* Space between text and logo */
    background-color: #FF9900;        /* Amazon orange */
    color: #111111;                   /* Dark text for good contrast */
    padding: 14px 28px;               /* Comfortable padding */
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.15rem;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15); /* subtle depth */
    max-width: 320px;                 /* optional: prevents overly wide button */
    margin: 20px auto;                /* centers the button if you want */
}

.buy-button:hover {
    background-color: #FFB733;        /* lighter orange hover */
}

.amazon-logo {
    height: 32px;                     /* Adjust size to fit nicely — try 28–36px */
    width: auto;
    flex-shrink: 0;                   /* prevents logo from shrinking */
}

/* Optional: Full-width on mobile for better tap target */
@media (max-width: 600px) {
    .buy-button {
        width: 100%;
        justify-content: space-between;
        padding: 16px 24px;
    }
}

ul {
    list-style-type: disc;
    padding-left: 20px;
}

#sounds {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #007bff;
    color: white;
}

@media (max-width: 768px) {
    .product {
        width: 100%;
    }
}