Kit 3 Restauracao

Fazer download em txt, pdf ou txt
Fazer download em txt, pdf ou txt
Você está na página 1de 5

<!

DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Entrega</title>
<style>
body {
background-color: white;
color: black;
font-family: Arial, sans-serif;
padding: 0.2px;
text-align: center;
}
h1 {
margin-bottom: 20px;
text-align: center; /* Centraliza o título "Entrega" */
}
h2 {
text-align: center; /* Centraliza o texto "Escolha o melhor frete para
você" */
}
.form-group {
margin-bottom: 15px;
text-align: left;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="text"] {
width: 100%;
padding: 10px;
font-size: 16px;
}
.checkbox-group {
display: flex;
align-items: center;
}
.shipping-option {
border: 1px solid #ccc;
padding: 15px;
margin-top: 20px;
border-radius: 5px;
text-align: left;
}
.price {
font-size: 18px;
color: #28a745;
margin-left: 10px;
display: none; /* Esconde os preços inicialmente */
}
.image-placeholder {
margin-bottom: 20px;
}
button {
background-color: #28a745; /* Cor verde */
color: white; /* Texto branco */
padding: 15px 30px; /* Tamanho maior do botão */
border: none;
border-radius: 5px;
cursor: pointer;
margin-top: 20px;
font-size: 18px; /* Aumenta o tamanho da fonte do botão */
display: block; /* Permite a centralização */
margin-left: auto; /* Centraliza o botão */
margin-right: auto; /* Centraliza o botão */
}
button:hover {
background-color: #218838; /* Cor verde mais escura ao passar o mouse
*/
}
.kit-info {
color: #555;
font-size: 17.6px;
margin-left: 20px;
text-align: left;
}
.container {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.top-image {
width: 100%;
height: auto;
margin: 0;
padding: 0;
position: relative;
top: 0;
transform: scaleX(1.05);
}
.highlight {
color: #28a745;
font-weight: bold;
}
.footer {
background-color: #f9f9f9;
padding: 20px;
margin-top: 30px;
border-top: 1px solid #ccc;
text-align: center;
}
.footer p {
margin: 5px 0;
font-size: 14px;
color: #777;
}
.security-badge {
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
}
.security-badge img {
max-width: 50px;
height: auto;
margin-right: 10px;
}
</style>
</head>
<body>

<!-- URL da imagem no topo (substitua pela sua imagem) -->


<div class="image-placeholder">
<img src="https://i.postimg.cc/y8TVtHbs/photo-2024-10-26-09-28-18.jpg"
alt="Imagem Superior" class="top-image">
</div>

<!-- URL da imagem do kit (substitua pela sua imagem) -->


<div class="container">
<div class="image-placeholder">
<img src="https://i.postimg.cc/zX8CM3TV/Design-sem-nome-4.png"
alt="Imagem de Entrega" style="max-width: 150px; height: auto;">
</div>
<div class="kit-info">
Você está garantindo o Kit Restauração + Kit Ampola por <span
class="highlight">R$0,00</span>
</div>
</div>

<h1>Entrega</h1>
<form id="cepForm">
<div class="form-group">
<label for="cep">CEP</label>
<input type="text" id="cep" placeholder="00000-000" required>
</div>

<div class="form-group">
<label for="endereco">Endereço</label>
<input type="text" id="endereco" required>
</div>

<div class="form-group">
<label for="numero">Número</label>
<input type="text" id="numero" required>
</div>

<div class="form-group checkbox-group">


<label>
<input type="checkbox" id="semNumero"> S/N
</label>
</div>

<div class="form-group">
<label for="complemento">Complemento</label>
<input type="text" id="complemento">
</div>

<div class="form-group">
<label for="bairro">Bairro</label>
<input type="text" id="bairro" readonly>
</div>

<div class="form-group">
<label for="cidade">Cidade</label>
<input type="text" id="cidade" readonly>
</div>

<div class="form-group">
<label for="estado">Estado</label>
<input type="text" id="estado" readonly>
</div>

<h2>Escolha o melhor frete para você</h2>

<!-- Caixa individual para Sedex -->


<div class="shipping-option">
<label>
<input type="radio" name="frete" value="sedex"> Sedex (3 a 5 dias)
<span class="price" id="priceSedex">R$19,90</span>
</label>
</div>

<!-- Caixa individual para PAC -->


<div class="shipping-option">
<label>
<input type="radio" name="frete" value="pac"> PAC (5 a 7 dias)
<span class="price" id="pricePac">R$17,90</span>
</label>
</div>

<button type="button" id="submitButton">Ir para o pagamento</button>


</form>

<!-- Seção de rodapé com termos de uso e selo de segurança -->


<div class="footer">
<p>Termos de Uso | Política de Privacidade | Contato</p>
<p>© 2024 Sua Empresa. Todos os direitos reservados.</p>
<div class="security-badge">
<img src="https://i.postimg.cc/13v6qRPv/Selo-site-100-seguro.webp"
alt="Selo de Segurança">
<p>Site Seguro - Seus dados estão protegidos.</p>
</div>
</div>

<script>
// Função para atualizar a URL do botão com base na opção de frete
selecionada
function updateButtonLink() {
const sedexButtonUrl =
'https://pay.risepay.com.br/Pay/f7d1dc66854e4c6098902bee644bf4ce';
const pacButtonUrl =
'https://pay.risepay.com.br/Pay/61a8027c48004d0ca662b8d351438e31';
const selectedFrete =
document.querySelector('input[name="frete"]:checked');

const submitButton = document.getElementById('submitButton');

if (selectedFrete) {
submitButton.onclick = function() {
if (selectedFrete.value === 'sedex') {
window.location.href = sedexButtonUrl;
} else if (selectedFrete.value === 'pac') {
window.location.href = pacButtonUrl;
}
};
} else {
submitButton.onclick = function() {
alert('Por favor, selecione um método de frete.');
};
}
}

// Adiciona event listeners para as opções de frete


const freteOptions = document.querySelectorAll('input[name="frete"]');
freteOptions.forEach(option => {
option.addEventListener('change', updateButtonLink);
});

// Adiciona o event listener para o CEP


document.getElementById('cep').addEventListener('input', function() {
const cep = this.value.replace(/\D/g, '');

if (cep.length === 8) {
fetch(`https://viacep.com.br/ws/${cep}/json/`)
.then(response => response.json())
.then(data => {
if (!data.erro) {
document.getElementById('bairro').value = data.bairro;
document.getElementById('cidade').value =
data.localidade;
document.getElementById('estado').value = data.uf;

// Exibe os preços apenas após a inserção do CEP


document.getElementById('priceSedex').style.display =
'inline';
document.getElementById('pricePac').style.display =
'inline';
} else {
alert('CEP não encontrado.');
}
})
.catch(err => console.error(err));
}
});
</script>
</body>
</html>

Você também pode gostar