Carrinho de compras
Seu carrinho está vazio

Frete grátis

Frete grátis para todo Brasil a partir de 150 reais

Envio em até 24h úteis

Conferir disponibilidade do produto

Programa de fidelidade

Ganhe pontos em sua próxima compra

Segurança

Loja protegida

Pague com cartão

Em até 6x s/ juros

Condições de Frete Grátis

Condições de Frete Grátis

 

Válido para todos os pedidos efetuados através do site da Santa Cruz, de acordo com a seguinte tabela:

Região Valor mínimo do pedido para Frete Grátis
Sudeste, Sul e Centro-Oeste R$ 89,00
Norte e Nordeste R$ 149,00

Ao atingir o valor mínimo do pedido, será exibido no carrinho de compras a opção de envio Frete Grátis, basta selecioná-la.

Esta opção é válida somente para entrega "Econômica", ou seja, o prazo de entrega do pedido pode demorar um pouco mais se esta opção for selecionada. Com o Frete Grátis, seu pedido será enviado somente depois que todos os itens estiverem disponíveis para envio, inclusive itens comprados na pré-venda. No carrinho de compras e/ou na página de finalização do pedido, você verá os prazos estimados de entrega, onde é possível compará-lo com os prazos de entrega de outras opções pagas antes de finalizar o pedido.

' + '' + '
' + SVG_CHECK + '
' + '
' + ''; document.body.appendChild(wrap); } function updateBadge() { var count = getFavs().length; var fab = document.querySelector('.escfav-fab'); if (fab) { fab.setAttribute('data-count', String(count)); fab.querySelector('.escfav-badge').textContent = String(count); } var drawerCount = document.querySelector('.escfav-drawer-count'); if (drawerCount) { drawerCount.textContent = count ? '(' + count + ')' : ''; } } function syncHearts() { var buttons = document.querySelectorAll('[data-escfav-id]'); for (var i = 0; i < buttons.length; i++) { var btn = buttons[i]; var active = isFav(btn.getAttribute('data-escfav-id')); btn.classList.toggle('escfav-active', active); if (btn.classList.contains('escfav-product-btn')) { var label = btn.querySelector('span'); if (label) label.textContent = active ? CONFIG.texts.favRemove : CONFIG.texts.favAdd; } } } function renderDrawer() { var listEl = document.querySelector('.escfav-list'); if (!listEl) return; /* Convite de login: a lista continua aparecendo normalmente, mas convidamos o cliente a entrar para guardar tudo na conta dele */ var banner = ''; if (escfavLoginSabido && !escfavCliente) { banner = ''; } var favs = getFavs(); if (!favs.length) { listEl.innerHTML = banner + '
' + SVG_HEART + '
' + CONFIG.texts.empty + '
'; return; } var html = banner; for (var i = 0; i < favs.length; i++) { var p = favs[i]; html += '
' + '' + (p.img ? '' + escapeHtml(p.name) + '' : '') + '' + '
' + '' + escapeHtml(p.name) + '' + '
' + (p.oldPrice ? '' + escapeHtml(p.oldPrice) + '' : '') + '' + escapeHtml(p.price) + '' + '
' + '
' + '
' + '' + CONFIG.texts.buy + '' + '' + '
' + '
'; } /* Botao "Adicionar todos ao carrinho" logo abaixo do ultimo produto */ html += '
' + '' + '
'; listEl.innerHTML = html; } function openDrawer() { renderDrawer(); document.querySelector('.escfav-overlay').classList.add('escfav-open'); document.querySelector('.escfav-drawer').classList.add('escfav-open'); } function closeDrawer() { document.querySelector('.escfav-overlay').classList.remove('escfav-open'); document.querySelector('.escfav-drawer').classList.remove('escfav-open'); } function showLoginModal() { document.querySelector('.escfav-modal-overlay').classList.add('escfav-open'); document.querySelector('.escfav-login-modal').classList.add('escfav-open'); } function closeLoginModal() { document.querySelector('.escfav-modal-overlay').classList.remove('escfav-open'); document.querySelector('.escfav-login-modal').classList.remove('escfav-open'); } var toastTimer; function showToast(message) { var toast = document.querySelector('.escfav-toast'); if (!toast) return; toast.querySelector('span').textContent = message; toast.classList.add('escfav-show'); clearTimeout(toastTimer); toastTimer = setTimeout(function () { toast.classList.remove('escfav-show'); }, 2500); } /* ---------- Adicionar todos ao carrinho ---------- */ /* ID da loja: detectado do javascript.js da Tray, com fallback fixo */ function getStoreId() { var scripts = document.querySelectorAll('script[src]'); for (var i = 0; i < scripts.length; i++) { var m = scripts[i].getAttribute('src').match(/\/mvc\/store\/(\d+)\//); if (m) return m[1]; } return '431290'; } var addingAll = false; function addAllToCart() { var favs = getFavs(); if (!favs.length || addingAll) return; addingAll = true; var btn = document.querySelector('.escfav-addall'); var label = btn.querySelector('span'); var storeId = getStoreId(); btn.disabled = true; function finish() { /* Vai para o carrinho mostrar o resultado */ window.location.href = '/loja/carrinho.php?loja=' + storeId; } function next(i) { if (i >= favs.length) { finish(); return; } label.textContent = CONFIG.texts.adding + ' (' + (i + 1) + '/' + favs.length + ')'; fetch('/loja/cartService.php?loja=' + storeId + '&acao=incluir&IdProd=' + encodeURIComponent(favs[i].id) + '&quant=1', { credentials: 'same-origin' }).catch(function () { /* segue para o proximo mesmo se falhar */ }) .then(function () { next(i + 1); }); } next(0); } /* ---------- Sincronizacao com a conta (multi-dispositivo) ---------- */ /* Quando o cliente esta logado na loja, a lista tambem e salva no servidor (por ID de cliente da Tray) e reaparece em qualquer dispositivo em que ele fizer login. Deslogado, fica so no navegador. */ var escfavCliente = null; /* {id, name, email} quando logado */ var escfavLoginSabido = false; /* true depois que o greeting respondeu */ var pushTimer2 = null; function pushToServer() { if (!escfavCliente || !CONFIG.api) return; clearTimeout(pushTimer2); pushTimer2 = setTimeout(function () { try { fetch(CONFIG.api, { method: 'POST', /* text/plain evita o preflight de CORS */ headers: { 'Content-Type': 'text/plain' }, body: JSON.stringify({ cliente: escfavCliente.id, itens: getFavs() }) }).catch(function () {}); } catch (e) { /* sem fetch, segue so local */ } }, 800); } function syncFromServer() { if (!escfavCliente || !CONFIG.api) return; fetch(CONFIG.api + '?cliente=' + encodeURIComponent(escfavCliente.id)) .then(function (r) { return r.json(); }) .then(function (resp) { if (!resp || !resp.ok) return; var doServidor = Array.isArray(resp.itens) ? resp.itens : []; var locais = getFavs(); var vistos = {}; var unidos = []; doServidor.concat(locais).forEach(function (p) { if (p && p.id && !vistos[p.id]) { vistos[p.id] = 1; unidos.push(p); } }); saveFavs(unidos); /* tambem re-envia a uniao ao servidor */ refreshAll(); }) .catch(function () { /* API fora do ar: segue so local */ }); } function detectCustomer() { if (!CONFIG.api || !window.fetch) return; fetch('/mvc/store/greeting?loja=' + getStoreId(), { credentials: 'same-origin' }) .then(function (r) { return r.json(); }) .then(function (resp) { var d = resp && resp.data; escfavLoginSabido = true; if (d && d.logged == 1 && d.id) { escfavCliente = { id: String(d.id), name: d.name || '', email: d.email || '' }; syncFromServer(); } else if (document.querySelector('.escfav-drawer.escfav-open')) { renderDrawer(); /* mostra o convite de login na gaveta aberta */ } }) .catch(function () {}); } function shareWhatsApp() { var favs = getFavs(); if (!favs.length) return; var lines = [CONFIG.texts.shareHeader, '']; for (var i = 0; i < favs.length; i++) { lines.push('\u2022 ' + favs[i].name + (favs[i].price ? ' - ' + favs[i].price : '')); lines.push(favs[i].url); lines.push(''); } window.open('https://wa.me/?text=' + encodeURIComponent(lines.join('\n').trim()), '_blank', 'noopener'); } function refreshAll() { updateBadge(); syncHearts(); if (document.querySelector('.escfav-drawer.escfav-open')) { renderDrawer(); } } function toggleFavorite(btn) { var product = btn.__escfavProduct; var id = btn.getAttribute('data-escfav-id'); /* Sem login nao salva: convida o cliente a entrar na conta */ if (!isFav(id) && !escfavCliente) { showLoginModal(); return; } if (isFav(id)) { removeFav(id); showToast(CONFIG.texts.removed); } else if (product) { addFav(product); showToast(CONFIG.texts.added); } refreshAll(); } /* ---------- Eventos ---------- */ function bindEvents() { document.addEventListener('click', function (ev) { var heart = ev.target.closest('.escfav-heart, .escfav-product-btn'); if (heart) { ev.preventDefault(); ev.stopPropagation(); toggleFavorite(heart); return; } if (ev.target.closest('.escfav-login-later') || (ev.target.classList && ev.target.classList.contains('escfav-modal-overlay'))) { closeLoginModal(); return; } if (ev.target.closest('.escfav-fab')) { openDrawer(); return; } if (ev.target.closest('.escfav-close') || (ev.target.classList && ev.target.classList.contains('escfav-overlay'))) { closeDrawer(); return; } var removeBtn = ev.target.closest('[data-escfav-remove]'); if (removeBtn) { removeFav(removeBtn.getAttribute('data-escfav-remove')); showToast(CONFIG.texts.removed); refreshAll(); return; } if (ev.target.closest('.escfav-addall')) { addAllToCart(); return; } if (ev.target.closest('.escfav-share')) { shareWhatsApp(); return; } if (ev.target.closest('.escfav-clear')) { if (getFavs().length && window.confirm(CONFIG.texts.clearConfirm)) { saveFavs([]); showToast(CONFIG.texts.cleared); refreshAll(); } } }, true); document.addEventListener('keydown', function (ev) { if (ev.key === 'Escape') { closeDrawer(); closeLoginModal(); } }); // Sincroniza contador/coracoes entre abas window.addEventListener('storage', function (ev) { if (ev.key === CONFIG.storageKey) refreshAll(); }); // Cards carregados dinamicamente (carrosseis, busca, SmartHint) var observer = new MutationObserver(debounce(function () { injectHearts(); syncHearts(); }, 250)); observer.observe(document.body, { childList: true, subtree: true }); } /* ---------- Inicializacao ---------- */ function init() { buildUI(); injectHearts(); injectProductPageButton(); bindEvents(); refreshAll(); detectCustomer(); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })();
'; document.body.appendChild(div); setTimeout(function () { div.remove(); }, 3000); } /* Adicionar ao carrinho: mesma chamada que o botao original do tema faz */ function comprar(id, qtd, botao) { var sessao = document.documentElement.getAttribute('data-session'); botao.classList.add('loading'); fetch('/web_api/cart/', { method: 'POST', headers: { 'Content-Type': 'application/json; charset=utf-8' }, body: JSON.stringify({ Cart: { session_id: sessao, product_id: String(id), quantity: String(qtd) } }) }).then(function (r) { if (!r.ok) throw new Error('cart'); botao.classList.remove('loading'); botao.textContent = 'Adicionado'; setTimeout(function () { botao.textContent = 'Comprar'; }, 2500); var contador = document.querySelector('span[data-cart="amount"]'); if (contador) contador.textContent = (parseInt(contador.textContent, 10) || 0) + qtd; aviso(true, 'Produto adicionado ao carrinho'); if (window.cart && typeof window.cart.listProduct === 'function') { setTimeout(function () { try { window.cart.listProduct(); } catch (e) {} }, 800); } }).catch(function () { botao.classList.remove('loading'); aviso(false, 'Não foi possível adicionar o produto. Tente novamente.'); }); } /* 2) Vitrine: roda na home, no marcador #esc-vistos-recentes */ function render() { var alvo = document.getElementById('esc-vistos-recentes'); if (!alvo) return; var lista = lerLista(); var atual = (window.dataLayer && window.dataLayer[0]) || {}; if (atual.idProduct) lista = lista.filter(function (p) { return String(p.id) !== String(atual.idProduct); }); if (!lista.length) return; var cards = lista.map(function (p) { var url = esc(p.url), nome = esc(p.nome), id = esc(p.id); var temDesconto = p.precoAntigo && p.precoAntigo > p.preco; var desconto = temDesconto ? Math.round((1 - p.preco / p.precoAntigo) * 100) : 0; var estrelasHtml = ''; if (p.estrelas) { estrelasHtml = '
'; for (var i = 1; i <= 5; i++) estrelasHtml += '
'; estrelasHtml += '
'; } return '
' + '
' + '
' + (temDesconto ? '
-' + desconto + '%
' : '') + '' + '' + nome + '' + '' + '
' + '' + '
' + nome + '
' + estrelasHtml + '
' + (temDesconto ? '' + moeda(p.precoAntigo) + '' : '') + '' + moeda(p.preco) + '' + '
' + '
' + '
' + '
' + '
' + '' + '' + '' + '
' + '
Comprar
' + '
' + '
' + '
' + '
'; }).join(''); alvo.innerHTML = '
' + '
' + '

' + TITULO + '

' + '
' + '' + '
' + cards + '
' + '' + '
' + '
' + '
'; var faixa = alvo.querySelector('.esc-vr-list'); alvo.querySelector('.esc-vr-prev').addEventListener('click', function () { faixa.scrollBy({ left: -faixa.clientWidth, behavior: 'smooth' }); }); alvo.querySelector('.esc-vr-next').addEventListener('click', function () { faixa.scrollBy({ left: faixa.clientWidth, behavior: 'smooth' }); }); alvo.querySelectorAll('.esc-vr-item').forEach(function (item) { var input = item.querySelector('input[type="number"]'); item.querySelector('.esc-vr-menos').addEventListener('click', function (e) { e.preventDefault(); input.value = Math.max(1, (parseInt(input.value, 10) || 1) - 1); }); item.querySelector('.esc-vr-mais').addEventListener('click', function (e) { e.preventDefault(); input.value = Math.min(99, (parseInt(input.value, 10) || 1) + 1); }); var botao = item.querySelector('.esc-vr-comprar'); botao.addEventListener('click', function (e) { e.preventDefault(); comprar(item.getAttribute('data-id'), Math.max(1, parseInt(input.value, 10) || 1), botao); }); }); } function iniciar() { gravar(); render(); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', iniciar); else iniciar(); })();