:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Product Cards */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-info {
    padding: 20px;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.description {
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.features ul {
    list-style-type: none;
    margin-bottom: 20px;
}

.features li {
    padding: 5px 0;
    padding-left: 25px;
    position: relative;
    font-size: 0.9rem;
}

.features li:before {
    content: "✓";
    color: var(--success);
    position: absolute;
    left: 0;
}

.product-action {
    padding: 15px 20px;
    background-color: var(--light-gray);
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
}

.buy-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.buy-btn:hover {
    background-color: var(--primary-dark);
}

/* Checkout Page */
#payment-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.order-summary, .payment-method, .payment-amount {
    margin-bottom: 30px;
}

.order-summary h3, .payment-method h3, .payment-amount h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

#order-items {
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--light-gray);
}

.order-item:last-child {
    border-bottom: none;
}

.total-amount {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 15px 0;
    border-top: 2px solid var(--primary);
    margin-top: 10px;
}

.method-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.method-option.active {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.05);
}

.method-option input {
    margin-right: 10px;
}

.amount-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.amount-option {
    padding: 15px;
    text-align: center;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.amount-option.active {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.05);
}

.amount-option input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    text-align: center;
    font-size: 1rem;
}

.error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.error-message.active {
    display: block;
}

.pay-now-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 20px 0;
}

.pay-now-btn:hover {
    background-color: var(--primary-dark);
}

.back-link {
    display: block;
    text-align: center;
    color: var(--gray);
    text-decoration: none;
    margin-top: 15px;
}

.back-link:hover {
    color: var(--primary);
}

/* Payment Result */
#payment-result {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

#payment-result.active {
    display: block;
}

.payment-instruction {
    background-color: rgba(76, 201, 240, 0.1);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    border-left: 4px solid var(--success);
}

.payment-instruction h3 {
    margin-bottom: 10px;
    color: var(--success);
}

.payment-instruction ol {
    padding-left: 20px;
}

.payment-instruction li {
    margin-bottom: 5px;
}

.qr-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    border: 1px dashed var(--light-gray);
    border-radius: 5px;
}

.amount-display {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.qr-code {
    margin: 20px auto;
    padding: 15px;
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    display: inline-block;
}

.qr-code img {
    width: 200px;
    height: 200px;
    display: block;
}

.expiry-timer {
    font-size: 1.1rem;
    margin: 15px 0;
}

.transaction-id {
    font-size: 0.9rem;
    color: var(--gray);
    word-break: break-all;
}

.back-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--light-gray);
    color: var(--dark);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.back-btn:hover {
    background-color: #d1d7e0;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(67, 97, 238, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Page */
.success-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(76, 201, 240, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon svg {
    width: 50px;
    height: 50px;
    color: var(--success);
}

.success-container h2 {
    font-size: 1.8rem;
    color: var(--success);
    margin-bottom: 30px;
}

.payment-details {
    text-align: left;
    background-color: rgba(248, 249, 250, 0.5);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--light-gray);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row span:first-child {
    font-weight: 500;
    color: var(--gray);
}

.download-section {
    margin: 30px 0;
    text-align: left;
}

.download-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.download-item {
    padding: 15px;
    background-color: white;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    margin-bottom: 15px;
}

.download-item h4 {
    margin-bottom: 10px;
    color: var(--primary);
}

.download-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: var(--primary-dark);
}

.note {
    background-color: rgba(248, 249, 250, 0.8);
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 0.9rem;
}

.note ul {
    padding-left: 20px;
    margin-top: 10px;
}

.home-btn {
    padding: 12px 30px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.home-btn:hover {
    background-color: var(--primary-dark);
}

footer {
    text-align: center;
    padding: 20px 0;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .products {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .success-container {
        padding: 20px;
    }
}

.hidden {
    display: none;
}