* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.checkout-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    padding: 20px;
}

/* Resumo do Produto */
.product-summary {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.product-summary h1 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.product-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.product-image img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-info h2 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-price .price {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.product-price .installments {
    display: block;
    font-size: 0.9rem;
    color: #48bb78;
    font-weight: 500;
}

/* Seção de Pagamento */
.payment-section {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.payment-section h2 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Métodos de Pagamento */
.payment-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.method-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    color: #666;
}

.method-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.method-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.method-btn svg {
    width: 28px;
    height: 28px;
}

/* Formulário */
.payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    flex: 1 0 100%;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #a0aec0;
}

/* Inputs do Mercado Pago */
.mp-input {
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0 16px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.mp-input:focus-within {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Seções ocultas */
.hidden {
    display: none !important;
}

/* PIX */
.pix-info,
.boleto-info {
    text-align: center;
    padding: 20px 0;
}

.pix-icon,
.boleto-icon {
    margin-bottom: 15px;
}

.pix-info h3,
.boleto-info h3 {
    color: #333;
    margin-bottom: 10px;
}

.pix-info p,
.boleto-info p {
    color: #666;
    margin-bottom: 15px;
}

.pix-price {
    margin: 20px 0;
}

.pix-price .old-price {
    display: block;
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.pix-price .new-price {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #32BCAD;
    margin: 5px 0;
}

.pix-price .discount {
    display: inline-block;
    background: #32BCAD;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Boleto */
.boleto-warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 15px 0;
}

.boleto-price {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 20px 0;
}

/* Botão de Submit */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}

.spinner .path {
    stroke: #fff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Mensagem de Status */
.status-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Segurança */
.security-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
}

.security-item svg {
    color: #48bb78;
}

.mp-logo img {
    height: 30px;
    opacity: 0.7;
}

/* Responsivo */
@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .product-summary {
        position: static;
    }

    .product-card {
        flex-direction: column;
        text-align: center;
    }

    .product-image {
        display: flex;
        justify-content: center;
    }

    .payment-methods {
        flex-direction: column;
    }

    .method-btn {
        flex-direction: row;
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .security-info {
        flex-direction: column;
    }
}

/* QR Code PIX */
.qr-code-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

.qr-code-container img {
    max-width: 200px;
    margin: 15px auto;
    display: block;
}

.pix-code {
    background: #fff;
    border: 2px dashed #ddd;
    padding: 15px;
    border-radius: 8px;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.8rem;
    margin: 15px 0;
}

.copy-btn {
    background: #32BCAD;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #2aa89b;
}

/* Animação de entrada */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkout-container > * {
    animation: fadeIn 0.5s ease forwards;
}

.payment-section {
    animation-delay: 0.2s;
}

/* Erro detalhado melhorado */
.status-message.error.detailed {
    text-align: left;
    padding: 25px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
    border-radius: 12px;
}

.error-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.error-icon {
    font-size: 2.5rem;
    text-align: center;
}

.error-main {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #7f1d1d;
}

.error-main strong {
    color: #dc2626;
    font-size: 1.1rem;
}

.error-technical {
    margin-top: 15px;
    padding: 12px;
    background: rgba(127, 29, 29, 0.1);
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: monospace;
    color: #991b1b;
}
