body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 30px;
    background-color: #212529; /* Dark background */
    color: #dee2e6; /* Light text */
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    background-color: #343a40; /* Slightly lighter dark background */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); /* Adjusted shadow for dark */
}

h1 {
    color: #f8f9fa; /* White heading */
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}

h2 {
    color: #e9ecef; /* Lighter grey heading */
    margin-bottom: 15px;
    font-weight: 500;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    border: 1px solid #495057; /* Darker border */
    border-radius: 8px;
    padding: 20px;
    background-color: #495057; /* Dark card background */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    border-color: #6c757d;
}

.product-image {
    width: 100%;
    height: 200px;
    margin: 0 auto 15px auto;
    border-radius: 5px;
    object-fit: cover;
    background-color: #6c757d; /* Placeholder bg for image loading */
}

.product-card h2 {
    font-size: 1.2em;
    margin-top: 0;
    color: #f8f9fa; /* Lighter text for card title */
}

.product-card p {
    font-size: 0.95em;
    flex-grow: 1;
    margin-bottom: 15px;
    color: #ced4da; /* Lighter text for card description */
}

.product-card strong {
    color: #6cb2eb; /* Lighter blue for price */
}

#checkout-form {
    max-width: 650px; /* Make the form container narrower */
    margin: 30px auto; /* Center the narrower form */
    border: 1px solid #495057;
    padding: 30px;
    border-radius: 8px;
    background-color: #2c3034; /* Slightly different dark for form */
}

#checkout-form h2 {
    text-align: center;
    color: #f8f9fa;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #ced4da; /* Light label text */
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 11px 14px; /* Slightly adjusted padding */
    border: 1px solid #5a6268; /* Slightly softer default border */
    border-radius: 8px; /* More rounded */
    box-sizing: border-box;
    font-size: 0.98em; /* Adjusted font size */
    background-color: #495057;
    color: #f8f9fa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; /* Added background-color transition */
}

.form-group input:focus,
.form-group select:focus {
    border-color: #80bdff; /* Keep a light blue border on focus */
    outline: 0;
    box-shadow: none; /* Remove the default box-shadow glow */
    background-color: #5a6268;
}

/* Button Styling - Modern & Minimal */
button, .purchase-btn, .secondary-btn {
    display: inline-flex; /* Align icon and text */
    align-items: center;
    justify-content: center;
    gap: 0.5em; /* Space between icon and text */
    width: 100%;
    padding: 10px 15px; /* Slightly reduced padding */
    background-color: transparent; /* Transparent background */
    color: #0d6efd; /* Primary color text */
    border: 1px solid #0d6efd; /* Primary color border */
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em; /* Slightly smaller font */
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
    margin-top: auto;
}

/* Primary button hover/active */
button:hover:not(.secondary-btn),
.purchase-btn:hover {
    background-color: #0d6efd; /* Fill with primary color */
    color: white;
    transform: translateY(-2px);
}

button:active:not(.secondary-btn),
.purchase-btn:active {
    transform: translateY(0);
    background-color: #0b5ed7; /* Darker primary */
    border-color: #0b5ed7;
}

/* Style for secondary button */
.secondary-btn {
    background-color: transparent;
    color: #6c757d; /* Grey text */
    border-color: #6c757d; /* Grey border */
    margin-top: 10px;
}

.secondary-btn:hover {
    background-color: #6c757d; /* Fill with grey */
    color: white;
    border-color: #6c757d;
}

.secondary-btn:active {
    background-color: #5a6268; /* Darker grey */
    border-color: #5a6268;
}

/* Ensure icons have consistent size */
button i,
.purchase-btn i,
.secondary-btn i {
    font-size: 1em; /* Adjust if needed */
    line-height: inherit; /* Align vertically */
}

.product {
    display: none;
}

#result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    border-width: 1px;
    border-style: solid;
}

#result h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: inherit;
}

.result-approved {
    background-color: #198754; /* Dark green background */
    color: #ffffff; /* White text */
    border-color: #146c43;
}

.result-blocked {
    background-color: #dc3545; /* Dark red background */
    color: #ffffff; /* White text */
    border-color: #b02a37;
}

.result-error {
    background-color: #ffc107; /* Dark yellow background */
    color: #000000; /* Black text for contrast */
    border-color: #cc9a06;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 1.8em;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Style for Product Image within the Form */
.form-product-image-style {
    display: block; /* Center it */
    max-width: 150px; /* Control image size */
    height: 150px;
    object-fit: cover;
    margin: 0 auto 25px auto; /* Center and add space below */
    border-radius: 8px;
    border: 1px solid #495057;
}