/* --- General Body & Typography --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #f8f9fa; /* A light, neutral background */
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

h1, h2 {
    color: #212529;
    font-weight: 500;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Main Content Wrapper --- */
.product-list, .message-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Product List (index.php) --- */
.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 25px; /* Creates space between the cards */
    justify-content: center;
}

/* --- Product Card --- */
.product {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 25px;
    width: 320px;
    display: flex;
    flex-direction: column; /* Aligns items vertically */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.product h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.product p {
    flex-grow: 1; /* Pushes the price and button to the bottom */
    margin: 10px 0;
}

.product .price {
    font-size: 1.75rem;
    font-weight: bold;
    color: #28a745; /* Green for price */
    margin: 15px 0;
    flex-grow: 0; /* Don't let the price grow */
}

/* --- Buy Now Button --- */
.product button {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: auto; /* Pushes the button to the bottom of the card */
}

.product button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

/* --- Success & Cancel Page Styles (success.php, cancel.php) --- */
.message-container {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.message-container p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* --- Reusable Button / Link Styles --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn-success {
    background-color: #28a745; /* Green */
}

.btn-success:hover {
    background-color: #218838;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d; /* Gray */
}

.btn-secondary:hover {
    background-color: #5a6268;
    text-decoration: none;
}