/* Layout Principal Melhorado */
.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* Header de Progresso */
.progress-header {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    text-align: center;
    width: 100%;
    float: left;
    box-sizing: border-box!important;
}

.progress-header h3 {
    color: #d4060a;
    margin-bottom: 15px;
    font-size: 24px;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.progress-step {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.step-completed {
    background: #28a745;
    color: white;
}

.step-active {
    background: #d4060a;
    color: white;
}

.step-pending {
    background: #6c757d;
    color: white;
}

/* Seção do Plano Melhorada */
.plano-section {
    display: flex;
    position: relative;
    animation: slideInUp 0.6s ease;
    width: 100%;
}

.plano-imagem {
    flex: 0 0 400px;
}

.plano-imagem img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.plano-imagem:hover img {
    transform: scale(1.05);
}

.plano-info {
    flex: 1;
}

.plano-info h2 {
    color: #d4060a;
    font-size: 28px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.plano-info h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #d4060a, #ff6b35);
    border-radius: 2px;
}

.plano-lista-simples {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.plano-linha {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.plano-linha:last-child {
    border-bottom: none;
}

/* Linhas zebradas - alternando cores */
.plano-linha:nth-child(odd) {
    background-color: #f8f9fa;
}

.plano-linha:nth-child(even) {
    background-color: #ffffff;
}

.plano-linha:hover {
    background-color: #e9ecef;
}

.plano-linha strong {
    color: #333;
    margin-right: 8px;
}

/* Badges pequenos */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

/* Formulário Melhorado */
.formulario-section {
    margin-top: 30px;
    margin-bottom: 30px;
    animation: slideInUp 0.6s ease;
}

.formulario-section h2 {
    color: #d4060a;
    font-size: 24px;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.formulario-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #d4060a, #ff6b35);
    border-radius: 2px;
}

.formulario-section p {
    color: #666;
    margin-bottom: 30px;
}

/* Grid do Formulário */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease;
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #d4060a;
    background: white;
    box-shadow: 0 0 0 3px rgba(212, 6, 10, 0.1);
    transform: translateY(-2px);
}

.form-group input.is-valid {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9, #ffffff);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.44 1.44L7.4 4.5l.94.94L4.6 9.17z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-group input.is-invalid {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff8f8, #ffffff);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4M8.2 4.6l-2.4 2.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-group input.loading-cep {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='%23007bff' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='.25'/%3e%3cpath fill='%23007bff' d='M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z'%3e%3canimateTransform attributeName='transform' dur='0.75s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3e%3c/path%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cep-status {
    font-size: 12px;
    margin-top: 5px;
}

.cep-status.loading { color: #007bff; }
.cep-status.success { color: #28a745; }
.cep-status.error { color: #dc3545; }

.field-filled {
    background-color: #e8f5e8 !important;
    transition: background-color 1s ease;
}

/* Seção Pagamento Melhorada */
.pagamento-section {
    animation: slideInUp 0.6s ease;
}

.pagamento-section h2 {
    color: #d4060a;
    font-size: 24px;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagamento-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #d4060a, #ff6b35);
    border-radius: 2px;
}

.pagamento-section p {
    color: #666;
    margin-bottom: 20px;
}

/* Tabs de Pagamento com Ícones */
.payment-tabs {
    display: flex;
    margin: 30px 0;
    gap: 15px;
}

.payment-tab {
    flex: 1;
    padding: 20px 15px;
    text-align: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.payment-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.payment-tab:hover::before {
    left: 100%;
}

.payment-tab.active {
    background: linear-gradient(135deg, #d4060a, #ff4757);
    color: white;
    border-color: #d4060a;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 6, 10, 0.3);
}

.payment-tab:hover:not(.active) {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.payment-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.payment-text {
    font-size: 14px;
    line-height: 1.3;
}

.payment-text small {
    font-size: 11px;
    opacity: 0.8;
}

.payment-tab.active .payment-text small {
    opacity: 1;
}

/* Conteúdo das Abas */
.tab-content {
    display: none;
    margin-top: 30px;
    padding: 30px;
    background: #fafbfc;
    border-radius: 15px;
    border: 2px solid #f0f0f0;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards de informação */
.info-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #d4060a;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.info-card h4 {
    color: #d4060a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-card p {
    margin-bottom: 0;
}
.info-card ul {
    list-style-type: disc!important;
}

/* Grid do Cartão */
.card-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.card-grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* PIX Container */
.pix-container {
    text-align: center;
    padding: 30px;
}

.pix-qr-preview {
    width: 200px;
    height: 200px;
    border: 3px dashed #d4060a;
    border-radius: 15px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfc;
    color: #666;
    font-size: 14px;
    flex-direction: column;
    gap: 10px;
}

.pix-code {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 15px 0;
    word-break: break-all;
    font-family: monospace;
    font-size: 12px;
    border-radius: 8px;
}

/* Termos Melhorados */
.termos-section {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.termo-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.termo-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.termo-item input[type="checkbox"] {
    margin-top: 3px;
    transform: scale(1.3);
    accent-color: #d4060a;
}

.termo-item label {
    color: #333;
    line-height: 1.4;
}

/* Botão Principal Melhorado */
.btn-contratar {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #d4060a, #ff4757);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-contratar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-contratar:hover::before {
    left: 100%;
}

.btn-contratar:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(212, 6, 10, 0.4);
}

.btn-contratar:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading spinner melhorado */
#loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animações principais */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .plano-section {
        flex-direction: column;
        padding: 0;
    }
    
    .plano-imagem {
        flex: none;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .card-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .payment-tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-contratar {
        padding: 15px;
        font-size: 16px;
    }
}