:root {
    --primary-color: #009ee3;
    /* Mercado Pago Blue */
    --primary-hover: #007eb5;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-secondary: #777777;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --success-color: #00a650;
    --error-color: #f23d4f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

main {
    width: 100%;
    max-width: 900px;
}

.container {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .container {
        flex-direction: row;
    }
}

/* Left/Top Section: Product Info */
.product-summary {
    background-color: #f9f9f9;
    padding: 40px;
    flex: 1;
    border-right: 1px solid #eee;
}

.product-summary h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.product-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.product-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-right: 20px;
    border-radius: 8px;
    background: white;
    padding: 10px;
    border: 1px solid #eee;
}

.product-details h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.product-price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.summary-rows {
    margin-top: 30px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.summary-row.total {
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 10px;
    color: var(--text-color);
}

/* Right/Bottom Section: Payment Actions */
.payment-actions {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.payment-actions h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.payment-actions p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-align: center;
    text-decoration: none;
    margin-bottom: 15px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

/* Payment Forms (Hidden by default) */
.payment-form-container {
    display: none;
    /* Hidden initially */
    padding: 20px 0;
    margin-top: 20px;
    /* Added spacing */
}

.payment-form-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Messages */
.result-message {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    margin-top: 20px;
}

.result-success {
    background-color: #e6f9ef;
    color: var(--success-color);
    border: 1px solid #b8e6ca;
}

.result-error {
    background-color: #fdecea;
    color: var(--error-color);
    border: 1px solid #fadbd8;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* QR Code Specifics */
#pix_qr img {
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
    /* Center the image */
}