/* Estilos base do Checkout */
.checkout-body {
    background: transparent;
    font-family: 'Inter', sans-serif;
    color: #334155;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Limpo */
.checkout-header {
    background: var(--primary); /* Roxo do site */
    padding: 15px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: white;
}

.checkout-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Layout Principal */
.checkout-main {
    flex: 1;
    padding: 40px 15px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .checkout-grid {
        display: flex;
        flex-direction: column-reverse;
    }
}

/* COLUNA ESQUERDA: Resumo */
.order-summary {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.order-summary h2 {
    font-size: 1.25rem;
    margin: 0 0 20px 0;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.product-info {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.product-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    background: #f1f5f9;
}

.product-details h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #1e293b;
}

.product-details p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.price-breakdown {
    border-top: 1px dashed #cbd5e1;
    border-bottom: 1px dashed #cbd5e1;
    padding: 15px 0;
    margin-bottom: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.price-row:last-child {
    margin-bottom: 0;
}

.price-row.highlight {
    font-weight: 700;
    font-size: 1.15rem;
    color: #0f172a;
}

.trust-indicators {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
}

/* COLUNA DIREITA: Área de Ação */
.checkout-action-area {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    min-height: 400px;
    position: relative;
}

.checkout-state {
    display: none;
    flex-direction: column;
    height: 100%;
}

.active-state {
    display: flex;
}

/* Loader */
#checkout-loader {
    align-items: center;
    justify-content: center;
}

.checkout-spinner {
    border: 4px solid rgba(0,0,0,0.1);
    border-left-color: #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Formulário de Identificação */
#checkout-lead-form h3 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    color: #0f172a;
}

.subtitle {
    margin: 0 0 25px 0;
    color: #64748b;
    font-size: 0.9rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.85rem;
}

.checkout-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.checkout-input:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99,102,241, 0.15);
}

.btn-checkout-primary {
    background: #25D366;
    color: #fff;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.btn-checkout-primary:hover {
    background: #1ebc5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.login-hint {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #64748b;
}

.login-hint a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
}

/* Área PIX */
.pix-header {
    text-align: center;
    margin-bottom: 20px;
}

.pix-logo {
    height: 25px;
    margin-bottom: 10px;
}

.pix-header h3 {
    margin: 0 0 5px 0;
}
.pix-header p {
    margin: 0; color: #64748b; font-size: 0.85rem;
}

.qr-code-wrapper {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

#pix-qr-img {
    width: 200px;
    height: 200px;
    border-radius: 8px;
}

.copy-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

#pix-brcode {
    width: 100%;
    padding: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-family: monospace;
    font-size: 1rem;
    box-sizing: border-box;
}

#btn-copy-pix {
    background: #6366f1;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

#btn-copy-pix:hover {
    background: #4f46e5;
}

.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    padding: 15px;
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-indicator {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Sucesso */
#checkout-success {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 0;
}

.success-icon-wrapper {
    margin-bottom: 20px;
}

.success-checkmark {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #25D366;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #25D366;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.success-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: #25D366;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.success-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0px 0px 0px 30px rgba(37, 211, 102, 0.1); } }
