Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Os Achadinhos dos Eletrônicos - Portal de Recomendações Premium de Produtos Eletrônicos">
<meta name="keywords" content="eletrônicos, smartphones, laptops, smartwatch, promoções, afiliados">
<title>🎯 Os Achadinhos dos Eletrônicos - Seu Store de Recomendações Premium</title>
<style>
/* ===== RESET E VARIÁVEIS ===== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary: #ff6b35;
--secondary: #004e89;
--background: #0f1419;
--foreground: #e8e8e8;
--card: #1a1f2e;
--border: #2a3142;
--accent: #ff6b35;
--accent-foreground: #ffffff;
--muted: #4a5568;
--muted-foreground: #a0aec0;
--radius: 12px;
--shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
html {
scroll-behavior: smooth;
}
body {
font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: var(--background);
color: var(--foreground);
line-height: 1.6;
overflow-x: hidden;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 0 1rem;
}
/* ===== NAVBAR FIXA ===== */
.navbar {
position: sticky;
top: 0;
z-index: 200;
background: linear-gradient(180deg, rgba(15, 20, 25, 0.95) 0%, rgba(15, 20, 25, 0.85) 100%);
backdrop-filter: blur(10px);
border-bottom: 2px solid var(--accent);
padding: 1rem 0;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.navbar-content {
display: flex;
align-items: center;
justify-content: space-between;
gap: 2rem;
flex-wrap: wrap;
}
.navbar-brand {
font-size: 1.2rem;
font-weight: 700;
color: var(--accent);
text-decoration: none;
white-space: nowrap;
}
.navbar-links {
display: flex;
gap: 1.5rem;
flex-wrap: wrap;
list-style: none;
}
.navbar-links a {
color: var(--muted-foreground);
text-decoration: none;
font-size: 0.9rem;
font-weight: 500;
transition: color 0.3s ease;
cursor: pointer;
}
.navbar-links a:hover {
color: var(--accent);
}
/* ===== HERO BANNER ===== */
.hero {
background: linear-gradient(135deg, #1a1f2e 0%, #2a3142 50%, #004e89 100%);
background-size: 400% 400%;
animation: gradientShift 15s ease infinite;
padding: 4rem 1rem;
margin-bottom: 3rem;
border-radius: var(--radius);
overflow: hidden;
position: relative;
box-shadow: 0 8px 32px rgba(255, 107, 53, 0.2);
}
@keyframes gradientShift {
0%, 100% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
}
.hero-content {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3rem;
align-items: center;
position: relative;
z-index: 2;
}
.hero-text h1 {
font-size: 3rem;
font-weight: 700;
color: var(--accent);
margin-bottom: 1rem;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
line-height: 1.2;
}
.hero-text p {
font-size: 1.2rem;
color: var(--foreground);
margin-bottom: 1.5rem;
line-height: 1.6;
}
.hero-tagline {
font-size: 1rem;
color: var(--muted-foreground);
margin-bottom: 2rem;
font-style: italic;
}
.hero-cta {
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.btn-hero {
padding: 1rem 2rem;
border: none;
border-radius: calc(var(--radius) - 2px);
font-weight: 600;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
}
.btn-hero-primary {
background: var(--accent);
color: white;
}
.btn-hero-primary:hover {
transform: scale(1.05);
box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}
.btn-hero-secondary {
background: transparent;
color: var(--accent);
border: 2px solid var(--accent);
}
.btn-hero-secondary:hover {
background: var(--accent);
color: white;
}
.hero-image {
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.hero-image-placeholder {
width: 100%;
height: 400px;
background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(0, 78, 137, 0.1) 100%);
border-radius: var(--radius);
border: 2px dashed var(--accent);
display: flex;
align-items: center;
justify-content: center;
font-size: 4rem;
color: var(--accent);
animation: float 3s ease-in-out infinite;
}
@keyframes float {
0%, 100% { transform: translateY(0px); }
50% { transform: translateY(-20px); }
}
/* ===== FILTROS COMPACTOS ===== */
.filter-bar {
background: var(--card);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.5rem;
margin-bottom: 2rem;
box-shadow: var(--shadow);
}
.filter-bar-content {
display: grid;
grid-template-columns: 2fr 1fr 1fr 1fr auto;
gap: 1rem;
align-items: end;
}
.search-box {
display: flex;
align-items: center;
background: var(--background);
border: 1px solid var(--border);
border-radius: calc(var(--radius) - 2px);
padding: 0.5rem 1rem;
transition: all 0.3s ease;
}
.search-box:focus-within {
border-color: var(--accent);
box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}
.search-box input {
flex: 1;
background: none;
border: none;
color: var(--foreground);
font-size: 0.95rem;
outline: none;
}
.search-box input::placeholder {
color: var(--muted-foreground);
}
.filter-select {
padding: 0.5rem 1rem;
border: 1px solid var(--border);
border-radius: calc(var(--radius) - 2px);
background: var(--background);
color: var(--foreground);
font-size: 0.9rem;
cursor: pointer;
transition: all 0.3s ease;
}
.filter-select:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}
.filter-buttons {
display: flex;
gap: 0.5rem;
}
.btn-filter {
padding: 0.5rem 1rem;
border: none;
border-radius: calc(var(--radius) - 2px);
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
font-size: 0.9rem;
}
.btn-filter-apply {
background: var(--accent);
color: white;
}
.btn-filter-apply:hover {
opacity: 0.9;
transform: scale(1.05);
}
.btn-filter-reset {
background: var(--secondary);
color: white;
}
.btn-filter-reset:hover {
opacity: 0.8;
}
/* ===== SEÇÕES COM CARROSSÉIS ===== */
.section {
margin-bottom: 4rem;
}
.section-header {
margin-bottom: 1.5rem;
}
.section-title {
font-size: 1.8rem;
font-weight: 700;
color: var(--foreground);
margin-bottom: 0.5rem;
}
.section-description {
color: var(--muted-foreground);
font-size: 0.95rem;
line-height: 1.5;
}
.carousel-wrapper {
position: relative;
display: flex;
align-items: center;
gap: 1rem;
}
.carousel-arrow {
width: 50px;
height: 50px;
border: none;
border-radius: 50%;
background: var(--card);
color: var(--accent);
font-size: 1.5rem;
cursor: pointer;
transition: all 0.3s ease;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
border: 2px solid var(--accent);
}
.carousel-arrow:hover {
background: var(--accent);
color: white;
transform: scale(1.1);
box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}
.carousel-arrow.disabled {
opacity: 0.3;
cursor: not-allowed;
}
.carousel-arrow.disabled:hover {
transform: scale(1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
background: var(--card);
color: var(--accent);
}
.carousel-container {
display: flex;
gap: 1.5rem;
overflow-x: auto;
scroll-behavior: smooth;
padding: 0.5rem 0;
flex: 1;
scrollbar-width: none;
}
.carousel-container::-webkit-scrollbar {
display: none;
}
.product-card {
flex: 0 0 250px;
background: var(--card);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
transition: all 0.3s ease;
cursor: pointer;
position: relative;
display: flex;
flex-direction: column;
box-shadow: var(--shadow);
}
.product-card:hover {
transform: translateY(-12px);
box-shadow: 0 16px 32px rgba(255, 107, 53, 0.3);
border-color: var(--accent);
}
.product-image {
width: 100%;
height: 200px;
object-fit: cover;
background: var(--background);
}
.product-badge {
position: absolute;
top: 1rem;
right: 1rem;
background: var(--accent);
color: white;
padding: 0.5rem 1rem;
border-radius: 8px;
font-weight: 600;
font-size: 0.85rem;
animation: pulse 2s infinite;
box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.8; }
}
.product-content {
padding: 1.5rem;
flex: 1;
display: flex;
flex-direction: column;
}
.product-name {
font-size: 1rem;
font-weight: 600;
margin-bottom: 0.5rem;
color: var(--foreground);
line-height: 1.3;
min-height: 2.6rem;
}
.product-review {
font-size: 0.8rem;
color: var(--muted-foreground);
margin-bottom: 1rem;
line-height: 1.4;
flex: 1;
}
.product-price-section {
margin-bottom: 1rem;
}
.product-price {
font-size: 1.3rem;
font-weight: 700;
color: var(--accent);
}
.product-original-price {
font-size: 0.85rem;
color: var(--muted-foreground);
text-decoration: line-through;
margin-left: 0.5rem;
}
.product-store {
font-size: 0.75rem;
color: var(--muted-foreground);
margin-top: 0.5rem;
}
.product-buttons {
display: flex;
gap: 0.5rem;
margin-top: auto;
}
.btn-product {
flex: 1;
padding: 0.6rem 0.8rem;
border: none;
border-radius: 6px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
font-size: 0.85rem;
text-align: center;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
}
.btn-product-primary {
background: var(--accent);
color: white;
}
.btn-product-primary:hover {
opacity: 0.9;
transform: scale(1.05);
}
.btn-product-secondary {
background: var(--secondary);
color: white;
}
.btn-product-secondary:hover {
opacity: 0.9;
}
/* ===== MODAL ===== */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
animation: fadeIn 0.3s ease;
overflow-y: auto;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.modal-content {
background-color: var(--card);
margin: 2% auto;
padding: 2rem;
border: 1px solid var(--border);
border-radius: var(--radius);
width: 90%;
max-width: 900px;
max-height: 90vh;
overflow-y: auto;
animation: slideDown 0.3s ease;
}
@keyframes slideDown {
from { transform: translateY(-50px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.modal-close {
color: var(--muted-foreground);
float: right;
font-size: 2rem;
font-weight: bold;
cursor: pointer;
transition: color 0.3s ease;
}
.modal-close:hover {
color: var(--accent);
}
.product-detail-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem;
margin-top: 1rem;
}
.product-detail-image {
width: 100%;
border-radius: var(--radius);
border: 1px solid var(--border);
}
.product-detail-info h1 {
font-size: 1.8rem;
margin-bottom: 1rem;
color: var(--foreground);
}
.product-detail-price {
font-size: 1.6rem;
color: var(--accent);
font-weight: 700;
margin-bottom: 1rem;
}
.product-specifications {
background: var(--background);
padding: 1rem;
border-radius: calc(var(--radius) - 2px);
margin: 1rem 0;
}
.product-specifications h3 {
margin-bottom: 0.5rem;
color: var(--accent);
}
.product-specifications ul {
list-style: none;
padding-left: 0;
}
.product-specifications li {
padding: 0.3rem 0;
color: var(--muted-foreground);
}
.product-specifications li:before {
content: "✓ ";
color: var(--accent);
font-weight: bold;
margin-right: 0.5rem;
}
.related-products {
grid-column: 1 / -1;
margin-top: 2rem;
padding-top: 2rem;
border-top: 1px solid var(--border);
}
.related-products h3 {
margin-bottom: 1rem;
color: var(--foreground);
}
.related-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 1rem;
}
/* ===== NEWSLETTER ===== */
.newsletter {
background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
padding: 3rem 2rem;
border-radius: var(--radius);
margin: 4rem 0;
text-align: center;
box-shadow: 0 8px 32px rgba(255, 107, 53, 0.2);
}
.newsletter h2 {
font-size: 2rem;
margin-bottom: 1rem;
color: white;
}
.newsletter p {
color: rgba(255, 255, 255, 0.9);
margin-bottom: 1.5rem;
font-size: 1.05rem;
}
.newsletter-form {
display: flex;
gap: 0.5rem;
max-width: 500px;
margin: 0 auto;
flex-wrap: wrap;
}
.newsletter-form input {
flex: 1;
min-width: 200px;
padding: 0.75rem 1rem;
border: none;
border-radius: calc(var(--radius) - 2px);
font-size: 1rem;
}
.newsletter-form button {
padding: 0.75rem 2rem;
background: white;
color: var(--accent);
border: none;
border-radius: calc(var(--radius) - 2px);
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}
.newsletter-form button:hover {
transform: scale(1.05);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
/* ===== FOOTER ===== */
.footer {
background: var(--card);
border-top: 1px solid var(--border);
padding: 2rem 0;
margin-top: 4rem;
text-align: center;
color: var(--muted-foreground);
}
.footer p {
margin-bottom: 0.5rem;
}
.footer a {
color: var(--accent);
text-decoration: none;
transition: opacity 0.3s ease;
}
.footer a:hover {
opacity: 0.8;
}
/* ===== NOTIFICAÇÕES ===== */
.notification {
position: fixed;
bottom: 2rem;
right: 2rem;
background: var(--accent);
color: var(--accent-foreground);
padding: 1rem 1.5rem;
border-radius: calc(var(--radius) - 2px);
box-shadow: var(--shadow);
animation: slideIn 0.3s ease;
z-index: 1001;
}
@keyframes slideIn {
from {
transform: translateX(400px);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
.hero-content {
grid-template-columns: 1fr;
}
.hero-text h1 {
font-size: 2.2rem;
}
.filter-bar-content {
grid-template-columns: 1fr 1fr;
}
.product-card {
flex: 0 0 220px;
}
}
@media (max-width: 768px) {
.navbar-links {
gap: 1rem;
font-size: 0.85rem;
}
.hero {
padding: 2rem 1rem;
}
.hero-text h1 {
font-size: 1.8rem;
}
.hero-text p {
font-size: 1rem;
}
.hero-image-placeholder {
height: 250px;
font-size: 2rem;
}
.filter-bar-content {
grid-template-columns: 1fr;
}
.section-title {
font-size: 1.4rem;
}
.carousel-arrow {
width: 40px;
height: 40px;
font-size: 1.2rem;
}
.product-card {
flex: 0 0 200px;
}
.product-detail-grid {
grid-template-columns: 1fr;
}
.modal-content {
width: 95%;
margin: 10% auto;
padding: 1.5rem;
}
.newsletter-form {
flex-direction: column;
}
.newsletter-form input,
.newsletter-form button {
width: 100%;
}
.notification {
left: 1rem;
right: 1rem;
bottom: 1rem;
}
}
@media (max-width: 480px) {
.navbar-brand {
font-size: 1rem;
}
.navbar-links {
gap: 0.5rem;
font-size: 0.75rem;
}
.hero-text h1 {
font-size: 1.5rem;
}
.section-title {
font-size: 1.2rem;
}
.carousel-arrow {
width: 35px;
height: 35px;
font-size: 1rem;
}
.product-card {
flex: 0 0 180px;
}
.btn-product {
font-size: 0.75rem;
padding: 0.5rem 0.6rem;
}
}
</style>
</head>
<body>
<!-- NAVBAR FIXA -->
<nav class="navbar">
<div class="container">
<div class="navbar-content">
<a href="#" class="navbar-brand">🎯 Os Achadinhos</a>
<ul class="navbar-links">
<li><a href="#smartphones">📱 Smartphones</a></li>
<li><a href="#informatica">💻 Informática</a></li>
<li><a href="#games">🎮 Games</a></li>
<li><a href="#tvs-audio">📺 TVs</a></li>
<li><a href="#smartwatch">⌚ Smartwatch</a></li>
<li><a href="#casa-inteligente">🏠 Casa</a></li>
<li><a href="#eletroportateis">🔌 Eletroportáteis</a></li>
<li><a href="#linha-branca">❄️ Linha Branca</a></li>
<li><a href="#gadgets">🎁 Gadgets</a></li>
<li><a href="#promocoes">🔥 Promoções</a></li>
</ul>
</div>
</div>
</nav>
<!-- HERO BANNER -->
<div class="container">
<div class="hero">
<div class="hero-content">
<div class="hero-text">
<h1>🎯 Os Achadinhos dos Eletrônicos</h1>
<p>Seu Store de Recomendações Premium</p>
<p class="hero-tagline">Descubra os melhores produtos eletrônicos com análises detalhadas, preços competitivos e ofertas exclusivas das principais lojas.</p>
<div class="hero-cta">
<button class="btn-hero btn-hero-primary" onclick="document.getElementById('filter-search').scrollIntoView({behavior: 'smooth'})">🔍 Explorar Produtos</button>
<button class="btn-hero btn-hero-secondary" onclick="document.getElementById('newsletter').scrollIntoView({behavior: 'smooth'})">📧 Receber Ofertas</button>
</div>
</div>
<div class="hero-image">
<div class="hero-image-placeholder">📱💻🎮</div>
</div>
</div>
</div>
</div>
<!-- FILTRO E BUSCA -->
<div class="container">
<div class="filter-bar" id="filter-search">
<div class="filter-bar-content">
<div class="search-box">
<input type="text" id="search-input" placeholder="🔍 Buscar produtos..." autocomplete="off">
</div>
<select id="price-filter" class="filter-select">
<option value="">💰 Todos os Preços</option>
<option value="0-500">Até R$ 500</option>
<option value="500-1000">R$ 500 - R$ 1.000</option>
<option value="1000-5000">R$ 1.000 - R$ 5.000</option>
<option value="5000">Acima de R$ 5.000</option>
</select>
<select id="store-filter" class="filter-select">
<option value="">🏪 Todas as Lojas</option>
<option value="Amazon">Amazon</option>
<option value="Mercado Livre">Mercado Livre</option>
<option value="Shopee">Shopee</option>
</select>
<select id="sort-filter" class="filter-select">
<option value="relevance">⬆️ Ordenar</option>
<option value="price-asc">Menor Preço</option>
<option value="price-desc">Maior Preço</option>
<option value="discount-desc">Maior Desconto</option>
</select>
<div class="filter-buttons">
<button class="btn-filter btn-filter-apply" onclick="applyFilters()">✓ Filtrar</button>
<button class="btn-filter btn-filter-reset" onclick="resetFilters()">↻ Limpar</button>
</div>
</div>
</div>
</div>
<!-- MAIN CONTENT -->
<main class="container">
<!-- SMARTPHONES -->
<section class="section" id="smartphones">
<div class="section-header">
<h2 class="section-title">📱 Smartphones em Destaque</h2>
<p class="section-description">Confira smartphones com ótimo custo-benefício, bateria duradoura, câmeras de alta qualidade e desempenho ideal para trabalho, jogos e redes sociais.</p>
</div>
<div class="carousel-wrapper">
<button class="carousel-arrow" onclick="scrollCarousel('smartphones', -1)">‹</button>
<div class="carousel-container" data-carousel="smartphones"></div>
<button class="carousel-arrow" onclick="scrollCarousel('smartphones', 1)">›</button>
</div>
</section>
<!-- INFORMÁTICA -->
<section class="section" id="informatica">
<div class="section-header">
<h2 class="section-title">💻 Informática e Acessórios</h2>
<p class="section-description">Laptops, monitores, teclados, mouses e periféricos para potencializar sua produtividade e experiência de trabalho.</p>
</div>
<div class="carousel-wrapper">
<button class="carousel-arrow" onclick="scrollCarousel('informatica', -1)">‹</button>
<div class="carousel-container" data-carousel="informatica"></div>
<button class="carousel-arrow" onclick="scrollCarousel('informatica', 1)">›</button>
</div>
</section>
<!-- GAMES -->
<section class="section" id="games">
<div class="section-header">
<h2 class="section-title">🎮 Games e Consoles</h2>
<p class="section-description">Consoles, jogos, headsets e acessórios para gamers que buscam a melhor experiência de jogo.</p>
</div>
<div class="carousel-wrapper">
<button class="carousel-arrow" onclick="scrollCarousel('games', -1)">‹</button>
<div class="carousel-container" data-carousel="games"></div>
<button class="carousel-arrow" onclick="scrollCarousel('games', 1)">›</button>
</div>
</section>
<!-- TVS E ÁUDIO -->
<section class="section" id="tvs-audio">
<div class="section-header">
<h2 class="section-title">📺 TVs e Áudio</h2>
<p class="section-description">Smart TVs 4K, soundbars e fones de alta qualidade para uma experiência audiovisual imersiva.</p>
</div>
<div class="carousel-wrapper">
<button class="carousel-arrow" onclick="scrollCarousel('tvs-audio', -1)">‹</button>
<div class="carousel-container" data-carousel="tvs-audio"></div>
<button class="carousel-arrow" onclick="scrollCarousel('tvs-audio', 1)">›</button>
</div>
</section>
<!-- SMARTWATCH -->
<section class="section" id="smartwatch">
<div class="section-header">
<h2 class="section-title">⌚ Smartwatch e Wearables</h2>
<p class="section-description">Relógios inteligentes, pulseiras fitness e wearables para monitorar sua saúde e produtividade.</p>
</div>
<div class="carousel-wrapper">
<button class="carousel-arrow" onclick="scrollCarousel('smartwatch', -1)">‹</button>
<div class="carousel-container" data-carousel="smartwatch"></div>
<button class="carousel-arrow" onclick="scrollCarousel('smartwatch', 1)">›</button>
</div>
</section>
<!-- CASA INTELIGENTE -->
<section class="section" id="casa-inteligente">
<div class="section-header">
<h2 class="section-title">🏠 Casa Inteligente</h2>
<p class="section-description">Dispositivos inteligentes para automatizar e controlar sua casa com segurança e conforto.</p>
</div>
<div class="carousel-wrapper">
<button class="carousel-arrow" onclick="scrollCarousel('casa-inteligente', -1)">‹</button>
<div class="carousel-container" data-carousel="casa-inteligente"></div>
<button class="carousel-arrow" onclick="scrollCarousel('casa-inteligente', 1)">›</button>
</div>
</section>
<!-- ELETROPORTÁTEIS -->
<section class="section" id="eletroportateis">
<div class="section-header">
<h2 class="section-title">🔌 Eletroportáteis</h2>
<p class="section-description">Cafeteiras, liquidificadores, fritadeiras e outros eletrodomésticos para sua cozinha.</p>
</div>
<div class="carousel-wrapper">
<button class="carousel-arrow" onclick="scrollCarousel('eletroportateis', -1)">‹</button>
<div class="carousel-container" data-carousel="eletroportateis"></div>
<button class="carousel-arrow" onclick="scrollCarousel('eletroportateis', 1)">›</button>
</div>
</section>
<!-- LINHA BRANCA -->
<section class="section" id="linha-branca">
<div class="section-header">
<h2 class="section-title">❄️ Linha Branca</h2>
<p class="section-description">Geladeiras, fogões, máquinas de lavar e outros eletrodomésticos essenciais para sua casa.</p>
</div>
<div class="carousel-wrapper">
<button class="carousel-arrow" onclick="scrollCarousel('linha-branca', -1)">‹</button>
<div class="carousel-container" data-carousel="linha-branca"></div>
<button class="carousel-arrow" onclick="scrollCarousel('linha-branca', 1)">›</button>
</div>
</section>
<!-- GADGETS -->
<section class="section" id="gadgets">
<div class="section-header">
<h2 class="section-title">🎁 Gadgets Inovadores</h2>
<p class="section-description">Acessórios e gadgets inovadores para potencializar sua tecnologia do dia a dia.</p>
</div>
<div class="carousel-wrapper">
<button class="carousel-arrow" onclick="scrollCarousel('gadgets', -1)">‹</button>
<div class="carousel-container" data-carousel="gadgets"></div>
<button class="carousel-arrow" onclick="scrollCarousel('gadgets', 1)">›</button>
</div>
</section>
<!-- PROMOÇÕES -->
<section class="section" id="promocoes">
<div class="section-header">
<h2 class="section-title">🔥 Promoções Especiais</h2>
<p class="section-description">Bundles e promoções exclusivas com descontos incríveis em produtos selecionados.</p>
</div>
<div class="carousel-wrapper">
<button class="carousel-arrow" onclick="scrollCarousel('promocoes', -1)">‹</button>
<div class="carousel-container" data-carousel="promocoes"></div>
<button class="carousel-arrow" onclick="scrollCarousel('promocoes', 1)">›</button>
</div>
</section>
<!-- NEWSLETTER -->
<section class="newsletter" id="newsletter">
<h2>📧 Receba Ofertas Exclusivas</h2>
<p>Inscreva-se na nossa newsletter e receba as melhores promoções direto no seu email!</p>
<form class="newsletter-form" onsubmit="handleNewsletterSubmit(event)">
<input type="email" placeholder="Seu melhor email..." required>
<button type="submit">Inscrever</button>
</form>
</section>
</main>
<!-- MODAL -->
<div id="productModal" class="modal">
<div class="modal-content">
<span class="modal-close" onclick="closeProductModal()">×</span>
<div id="modalBody"></div>
</div>
</div>
<!-- FOOTER -->
<footer class="footer">
<div class="container">
<p>© 2026 Os Achadinhos dos Eletrônicos. Todos os direitos reservados.</p>
<p>Portal de Recomendações Premium | <a href="#smartphones">Smartphones</a> | <a href="#informatica">Informática</a> | <a href="#games">Games</a> | <a href="#tvs-audio">TVs</a> | <a href="#smartwatch">Smartwatch</a></p>
</div>
</footer>
<!-- DADOS DOS PRODUTOS -->
<script>
const productsData = {
'smartphones': [
{ id: 'phone-1', name: 'Samsung Galaxy S24 Ultra', price: 5999.99, discount: 15, review: 'Flagship com câmera de 200MP e processador top', description: 'Smartphone premium com tela AMOLED 6.8", câmera de 200MP, processador Snapdragon 8 Gen 3 e bateria de 5000mAh', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'phone-2', name: 'iPhone 15 Pro Max', price: 7999.99, discount: 10, review: 'Melhor câmera do mercado com A17 Pro', description: 'iPhone premium com tela Super Retina XDR, câmera de 48MP, chip A17 Pro e design em titânio', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' },
{ id: 'phone-3', name: 'Xiaomi 14 Ultra', price: 3999.99, discount: 20, review: 'Custo-benefício imbatível com câmera Leica', description: 'Smartphone com câmera Leica, tela AMOLED 6.73", Snapdragon 8 Gen 3 e carregamento rápido 90W', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'phone-4', name: 'OnePlus 12', price: 2999.99, discount: 25, review: 'Performance extrema com Snapdragon 8 Gen 3', description: 'Smartphone com processador Snapdragon 8 Gen 3, tela AMOLED 6.7", 12GB RAM e carregamento 100W', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'phone-5', name: 'Google Pixel 8 Pro', price: 4999.99, discount: 12, review: 'Melhor processamento de imagem com IA', description: 'Smartphone com Tensor G3, câmera de 50MP com IA avançada, tela OLED 6.7" e 12GB RAM', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' },
{ id: 'phone-6', name: 'Samsung Galaxy A54', price: 1999.99, discount: 18, review: 'Melhor intermediário com câmera de 50MP', description: 'Smartphone intermediário com câmera de 50MP, tela AMOLED 6.4", Exynos 1280 e bateria 5000mAh', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'phone-7', name: 'Motorola Edge 50 Pro', price: 2499.99, discount: 22, review: 'Câmera de 50MP com OIS e design premium', description: 'Smartphone com câmera de 50MP com OIS, tela AMOLED 6.7", Snapdragon 8 Gen 2 e carregamento 125W', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'phone-8', name: 'Nothing Phone 2', price: 1799.99, discount: 30, review: 'Design inovador com LED traseiro único', description: 'Smartphone com design único, câmera de 50MP, Snapdragon 8+ Gen 1, tela OLED 6.7" e 12GB RAM', store: 'Shopee', link: 'https://shopee.com.br' }
],
'informatica': [
{ id: 'laptop-1', name: 'MacBook Pro 16" M3 Max', price: 12999.99, discount: 8, review: 'Laptop mais poderoso para profissionais', description: 'Laptop com chip M3 Max, 36GB RAM, 1TB SSD, tela Retina 16" e bateria de 22 horas', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'laptop-2', name: 'Dell XPS 15', price: 8999.99, discount: 15, review: 'Ultrabook premium com RTX 4060', description: 'Laptop com Intel Core i7, RTX 4060, 16GB RAM, 512GB SSD e tela OLED 15.6"', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' },
{ id: 'monitor-1', name: 'Monitor LG 4K 32"', price: 2499.99, discount: 20, review: 'Monitor 4K com cores precisas para design', description: 'Monitor 4K 32" com painel IPS, 60Hz, USB-C e suporte VESA', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'teclado-1', name: 'Teclado Mecânico Corsair K95', price: 799.99, discount: 25, review: 'Teclado mecânico premium com switches Cherry', description: 'Teclado mecânico com switches Cherry MX, RGB, 8 botões macro e suporte de pulso', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'mouse-1', name: 'Mouse Logitech MX Master 3S', price: 599.99, discount: 18, review: 'Mouse profissional com precisão extrema', description: 'Mouse sem fio com sensor 8K, 8 botões programáveis e conectividade multi-dispositivo', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' }
],
'games': [
{ id: 'console-1', name: 'PlayStation 5', price: 4999.99, discount: 5, review: 'Console mais poderoso da geração', description: 'Console com SSD 825GB, suporte 4K 120fps, controle DualSense e biblioteca de 500+ jogos', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'game-1', name: 'Final Fantasy VII Rebirth', price: 349.99, discount: 10, review: 'RPG épico exclusivo do PS5', description: 'Jogo RPG exclusivo com gráficos incríveis, gameplay imersivo e história emocionante', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'headset-1', name: 'Headset SteelSeries Arctis Nova Pro', price: 1299.99, discount: 20, review: 'Melhor headset para gaming profissional', description: 'Headset com som surround 7.1, microfone retrátil, bateria 40h e suporte multi-plataforma', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' },
{ id: 'controller-1', name: 'Controle Xbox Series X', price: 399.99, discount: 15, review: 'Controle responsivo com feedback tátil', description: 'Controle com feedback tátil avançado, gatilhos adaptativos e bateria 40 horas', store: 'Amazon', link: 'https://amazon.com.br' }
],
'tvs-audio': [
{ id: 'tv-1', name: 'Samsung QLED 75"', price: 6999.99, discount: 12, review: 'TV 4K com painel QLED e som surround', description: 'TV 4K 75" com painel QLED, 120Hz, suporte HDMI 2.1 e som surround Dolby Atmos', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' },
{ id: 'soundbar-1', name: 'Soundbar LG 7.1.4', price: 3999.99, discount: 18, review: 'Soundbar premium com Dolby Atmos', description: 'Soundbar 7.1.4 com Dolby Atmos, HDMI eARC, subwoofer sem fio e suporte 4K', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'fone-1', name: 'Fone Sony WH-1000XM5', price: 2499.99, discount: 22, review: 'Melhor cancelamento de ruído do mercado', description: 'Fone com cancelamento de ruído ativo, bateria 40h, som Hi-Res e suporte multi-dispositivo', store: 'Amazon', link: 'https://amazon.com.br' }
],
'smartwatch': [
{ id: 'watch-1', name: 'Apple Watch Ultra 2', price: 3999.99, discount: 10, review: 'Smartwatch mais robusto e completo', description: 'Smartwatch com tela Retina 49mm, bateria 36h, resistência militar e GPS dual-band', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' },
{ id: 'watch-2', name: 'Samsung Galaxy Watch 6 Classic', price: 1999.99, discount: 20, review: 'Smartwatch com design clássico e Wear OS', description: 'Smartwatch com tela AMOLED 1.3", Wear OS 3, bateria 2 dias e 100+ modos de exercício', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'band-1', name: 'Xiaomi Band 8 Pro', price: 399.99, discount: 30, review: 'Pulseira fitness com melhor custo-benefício', description: 'Pulseira com tela AMOLED 1.74", 150+ modos de exercício, bateria 14 dias e resistência 5ATM', store: 'Amazon', link: 'https://amazon.com.br' }
],
'casa-inteligente': [
{ id: 'speaker-smart-1', name: 'Echo Dot 5ª Geração', price: 399.99, discount: 25, review: 'Smart speaker com Alexa integrada', description: 'Smart speaker com Alexa, som estéreo, WiFi 6 e controle de dispositivos inteligentes', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'camera-1', name: 'Câmera Inteligente Wyze Cam v3', price: 299.99, discount: 20, review: 'Câmera 1080p com visão noturna', description: 'Câmera 1080p com visão noturna, detecção de movimento, som bidirecional e armazenamento em nuvem', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'lampada-1', name: 'Lâmpada Inteligente Positivo', price: 149.99, discount: 35, review: 'Lâmpada LED RGB com controle por app', description: 'Lâmpada LED RGB com 16 milhões de cores, controle por app e compatível com Alexa', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' }
],
'eletroportateis': [
{ id: 'cafeteira-1', name: 'Cafeteira Nespresso Vertuo', price: 1299.99, discount: 15, review: 'Cafeteira automática com cápsulas', description: 'Cafeteira automática com tecnologia Vertuo, 4 tamanhos de xícaras e aquecimento rápido', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'liquidificador-1', name: 'Liquidificador Vitamix A2500', price: 2499.99, discount: 12, review: 'Liquidificador profissional mais vendido', description: 'Liquidificador com motor 2.2HP, 64 velocidades, jarra de vidro 2L e garantia 10 anos', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'fritadeira-1', name: 'Fritadeira Elétrica Mondial', price: 599.99, discount: 28, review: 'Fritadeira com controle de temperatura', description: 'Fritadeira elétrica 4L com termostato ajustável, filtro permanente e cesto removível', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' }
],
'linha-branca': [
{ id: 'geladeira-1', name: 'Geladeira Brastemp Frost Free', price: 3999.99, discount: 10, review: 'Geladeira com tecnologia Frost Free', description: 'Geladeira 500L com Frost Free, 2 compressores, gavetas flexíveis e eficiência energética A', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'fogao-1', name: 'Fogão Consul 5 bocas', price: 1299.99, discount: 18, review: 'Fogão com queimadores potentes', description: 'Fogão 5 bocas com queimadores potentes, forno espaçoso e painel de controle intuitivo', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'maquina-lavar-1', name: 'Máquina de Lavar Electrolux', price: 2499.99, discount: 22, review: 'Máquina com capacidade 12kg', description: 'Máquina de lavar 12kg com 16 programas, inversor de frequência e consumo reduzido', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' }
],
'gadgets': [
{ id: 'power-bank-1', name: 'Power Bank Anker 30000mAh', price: 399.99, discount: 25, review: 'Power bank com 3 portas USB', description: 'Power bank 30000mAh com 3 portas USB, carregamento rápido 65W e display LED', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'carregador-1', name: 'Carregador Rápido Baseus 100W', price: 299.99, discount: 30, review: 'Carregador com 2 portas USB-C', description: 'Carregador rápido 100W com 2 portas USB-C, compatível com múltiplos dispositivos', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'webcam-1', name: 'Webcam Logitech 4K', price: 799.99, discount: 20, review: 'Webcam 4K com foco automático', description: 'Webcam 4K com foco automático, microfone integrado, correção de luz e suporte universal', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' }
],
'promocoes': [
{ id: 'promo-1', name: 'Bundle: Fone + Carregador', price: 599.99, discount: 40, review: 'Promoção especial com 40% de desconto', description: 'Kit com fone Bluetooth e carregador rápido 65W com desconto especial', store: 'Amazon', link: 'https://amazon.com.br' },
{ id: 'promo-2', name: 'Smart TV + Soundbar', price: 2999.99, discount: 35, review: 'Promoção com 35% de desconto', description: 'Kit com Smart TV 50" e soundbar 2.1 com desconto especial', store: 'Shopee', link: 'https://shopee.com.br' },
{ id: 'promo-3', name: 'Laptop + Mouse + Teclado', price: 3999.99, discount: 25, review: 'Promoção com 25% de desconto', description: 'Kit completo para home office com laptop, mouse e teclado mecânico', store: 'Mercado Livre', link: 'https://mercadolivre.com.br' },
{ id: 'promo-4', name: 'Smartwatch + Pulseira Extra', price: 1499.99, discount: 30, review: 'Promoção com 30% de desconto', description: 'Smartwatch com 2 pulseiras extras incluídas com desconto especial', store: 'Amazon', link: 'https://amazon.com.br' }
]
};
const imageMap = {
'phone-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartphone-flagship-k9WNYo4d3gkGgkSH7Efubp.webp',
'phone-2': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartphone-flagship-k9WNYo4d3gkGgkSH7Efubp.webp',
'phone-3': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartphone-flagship-k9WNYo4d3gkGgkSH7Efubp.webp',
'phone-4': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartphone-flagship-k9WNYo4d3gkGgkSH7Efubp.webp',
'phone-5': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartphone-flagship-k9WNYo4d3gkGgkSH7Efubp.webp',
'phone-6': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartphone-flagship-k9WNYo4d3gkGgkSH7Efubp.webp',
'phone-7': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartphone-flagship-k9WNYo4d3gkGgkSH7Efubp.webp',
'phone-8': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartphone-flagship-k9WNYo4d3gkGgkSH7Efubp.webp',
'laptop-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/laptop-ultrabook-YXCY4cVHkDJWxbgeykKRWi.webp',
'laptop-2': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/laptop-ultrabook-YXCY4cVHkDJWxbgeykKRWi.webp',
'monitor-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/tv-4k-Jka8quERWjrBSNjnfZztzX.webp',
'teclado-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/laptop-ultrabook-YXCY4cVHkDJWxbgeykKRWi.webp',
'mouse-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/power-bank-7s3ohqZ9xqidPsbGohjQ3S.webp',
'console-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/gaming-console-FBosHfaqJ6QFMttt5micFf.webp',
'game-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/gaming-console-FBosHfaqJ6QFMttt5micFf.webp',
'headset-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smart-speaker-N8ES4uqwotNXpSJQJZhLfx.webp',
'controller-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/power-bank-7s3ohqZ9xqidPsbGohjQ3S.webp',
'tv-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/tv-4k-Jka8quERWjrBSNjnfZztzX.webp',
'soundbar-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smart-speaker-N8ES4uqwotNXpSJQJZhLfx.webp',
'fone-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smart-speaker-N8ES4uqwotNXpSJQJZhLfx.webp',
'watch-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartwatch-premium-7RVKA9iAna5TahfgRQtUfT.webp',
'watch-2': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartwatch-premium-7RVKA9iAna5TahfgRQtUfT.webp',
'band-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smartwatch-premium-7RVKA9iAna5TahfgRQtUfT.webp',
'speaker-smart-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smart-speaker-N8ES4uqwotNXpSJQJZhLfx.webp',
'camera-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smart-speaker-N8ES4uqwotNXpSJQJZhLfx.webp',
'lampada-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smart-speaker-N8ES4uqwotNXpSJQJZhLfx.webp',
'cafeteira-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/air-fryer-bpB7NdCczxhshMCh2XzhTo.webp',
'liquidificador-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/air-fryer-bpB7NdCczxhshMCh2XzhTo.webp',
'fritadeira-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/air-fryer-bpB7NdCczxhshMCh2XzhTo.webp',
'geladeira-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/refrigerator-P9u5cXAwB4XHxs3giEyHor.webp',
'fogao-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/refrigerator-P9u5cXAwB4XHxs3giEyHor.webp',
'maquina-lavar-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/refrigerator-P9u5cXAwB4XHxs3giEyHor.webp',
'power-bank-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/power-bank-7s3ohqZ9xqidPsbGohjQ3S.webp',
'carregador-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/power-bank-7s3ohqZ9xqidPsbGohjQ3S.webp',
'webcam-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/smart-speaker-N8ES4uqwotNXpSJQJZhLfx.webp',
'promo-1': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/promotion-banner-8BuiPaShXqDDD3WxSpFSUw.webp',
'promo-2': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/promotion-banner-8BuiPaShXqDDD3WxSpFSUw.webp',
'promo-3': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/promotion-banner-8BuiPaShXqDDD3WxSpFSUw.webp',
'promo-4': 'https://d2xsxph8kpxj0f.cloudfront.net/310519663371199215/mGLeaw7KJQGDT5Uxzytwd2/promotion-banner-8BuiPaShXqDDD3WxSpFSUw.webp'
};
let filteredProducts = {};
let currentFilters = {
search: '',
price: '',
store: '',
sort: 'relevance'
};
function initCarousels() {
Object.keys(productsData).forEach(category => {
const container = document.querySelector(`[data-carousel="${category}"]`);
if (container) {
container.innerHTML = '';
productsData[category].forEach(product => {
const card = createProductCard(product, category);
container.appendChild(card);
});
}
});
}
function createProductCard(product, category) {
const card = document.createElement('div');
card.className = 'product-card';
const originalPrice = product.discount
? (product.price / (1 - product.discount / 100)).toFixed(2)
: product.price;
const productImage = imageMap[product.id] || 'https://via.placeholder.com/280x200';
card.innerHTML = `
<img src="${productImage}" alt="${product.name}" class="product-image">
${product.discount ? `<div class="product-badge">🔥 ${product.discount}%</div>` : ''}
<div class="product-content">
<h3 class="product-name">${product.name}</h3>
<p class="product-review">${product.review}</p>
<div class="product-price-section">
<span class="product-price">R$ ${product.price.toLocaleString('pt-BR', { minimumFractionDigits: 2 })}</span>
${product.discount ? `<span class="product-original-price">R$ ${parseFloat(originalPrice).toLocaleString('pt-BR', { minimumFractionDigits: 2 })}</span>` : ''}
</div>
<p class="product-store">${product.store}</p>
<div class="product-buttons">
<a href="${product.link}" target="_blank" class="btn-product btn-product-primary">🛒 Comprar</a>
<button class="btn-product btn-product-secondary" onclick="openProductModal('${product.id}', '${category}')">ℹ️ Info</button>
</div>
</div>
`;
return card;
}
function scrollCarousel(category, direction) {
const container = document.querySelector(`[data-carousel="${category}"]`);
if (container) {
const scrollAmount = 300;
container.scrollBy({
left: direction * scrollAmount,
behavior: 'smooth'
});
}
}
function openProductModal(productId, category) {
const products = productsData[category];
const product = products.find(p => p.id === productId);
if (!product) return;
const modal = document.getElementById('productModal');
const modalBody = document.getElementById('modalBody');
const originalPrice = product.discount
? (product.price / (1 - product.discount / 100)).toFixed(2)
: product.price;
const productImage = imageMap[product.id] || 'https://via.placeholder.com/400x300';
const relatedProducts = products.filter(p => p.id !== productId).slice(0, 4);
let relatedHTML = '';
if (relatedProducts.length > 0) {
relatedHTML = `
<div class="related-products">
<h3>Produtos Relacionados</h3>
<div class="related-grid">
${relatedProducts.map(p => {
const relatedImage = imageMap[p.id] || 'https://via.placeholder.com/200x140';
return `
<div class="product-card" onclick="openProductModal('${p.id}', '${category}')">
<img src="${relatedImage}" alt="${p.name}" class="product-image">
<div class="product-content">
<h4 class="product-name">${p.name}</h4>
<span class="product-price">R$ ${p.price.toLocaleString('pt-BR', {minimumFractionDigits: 2})}</span>
</div>
</div>
`;
}).join('')}
</div>
</div>
`;
}
modalBody.innerHTML = `
<div class="product-detail-grid">
<div>
<img src="${productImage}" alt="${product.name}" class="product-detail-image">
</div>
<div class="product-detail-info">
<h1>${product.name}</h1>
<div class="product-detail-price">
R$ ${product.price.toLocaleString('pt-BR', {minimumFractionDigits: 2})}
${product.discount ? `<span class="product-original-price">R$ ${parseFloat(originalPrice).toLocaleString('pt-BR', {minimumFractionDigits: 2})}</span>` : ''}
</div>
${product.discount ? `<div style="color: var(--accent); font-weight: 600; margin-bottom: 1rem;">🔥 ${product.discount}% de Desconto!</div>` : ''}
<div class="product-specifications">
<h3>Descrição</h3>
<p>${product.description}</p>
</div>
<div class="product-specifications">
<h3>Informações</h3>
<ul>
<li>Loja: ${product.store}</li>
<li>Preço Original: R$ ${parseFloat(originalPrice).toLocaleString('pt-BR', {minimumFractionDigits: 2})}</li>
<li>Preço com Desconto: R$ ${product.price.toLocaleString('pt-BR', {minimumFractionDigits: 2})}</li>
</ul>
</div>
<div class="product-buttons" style="margin-top: 1.5rem;">
<a href="${product.link}" target="_blank" class="btn-product btn-product-primary">🛒 Comprar Agora</a>
<button class="btn-product btn-product-secondary" onclick="shareProduct('${product.name}', '${product.link}')">📤 Compartilhar</button>
</div>
</div>
${relatedHTML}
</div>
`;
modal.style.display = 'block';
}
function closeProductModal() {
document.getElementById('productModal').style.display = 'none';
}
function shareProduct(name, link) {
const text = `Confira este produto: ${name} - ${link}`;
if (navigator.share) {
navigator.share({
title: 'Os Achadinhos dos Eletrônicos',
text: text,
url: link
});
} else {
alert('Compartilhe: ' + text);
}
}
function applyFilters() {
currentFilters.search = document.getElementById('search-input').value.toLowerCase();
currentFilters.price = document.getElementById('price-filter').value;
currentFilters.store = document.getElementById('store-filter').value;
currentFilters.sort = document.getElementById('sort-filter').value;
filterAndRenderProducts();
showNotification('✓ Filtros aplicados!');
}
function resetFilters() {
document.getElementById('search-input').value = '';
document.getElementById('price-filter').value = '';
document.getElementById('store-filter').value = '';
document.getElementById('sort-filter').value = 'relevance';
currentFilters = {
search: '',
price: '',
store: '',
sort: 'relevance'
};
initCarousels();
showNotification('↻ Filtros limpos!');
}
function filterAndRenderProducts() {
Object.keys(productsData).forEach(category => {
let filtered = productsData[category];
if (currentFilters.search) {
filtered = filtered.filter(p =>
p.name.toLowerCase().includes(currentFilters.search) ||
p.review.toLowerCase().includes(currentFilters.search) ||
p.description.toLowerCase().includes(currentFilters.search)
);
}
if (currentFilters.price) {
const [min, max] = currentFilters.price === '5000'
? [5000, Infinity]
: currentFilters.price.split('-').map(Number);
filtered = filtered.filter(p => p.price >= min && p.price <= max);
}
if (currentFilters.store) {
filtered = filtered.filter(p => p.store === currentFilters.store);
}
if (currentFilters.sort === 'price-asc') {
filtered.sort((a, b) => a.price - b.price);
} else if (currentFilters.sort === 'price-desc') {
filtered.sort((a, b) => b.price - a.price);
} else if (currentFilters.sort === 'discount-desc') {
filtered.sort((a, b) => (b.discount || 0) - (a.discount || 0));
}
const container = document.querySelector(`[data-carousel="${category}"]`);
if (container) {
container.innerHTML = '';
if (filtered.length === 0) {
container.innerHTML = '<div style="grid-column: 1/-1; text-align: center; padding: 2rem; color: var(--muted-foreground);">Nenhum produto encontrado</div>';
} else {
filtered.forEach(product => {
const card = createProductCard(product, category);
container.appendChild(card);
});
}
}
});
}
function handleNewsletterSubmit(e) {
e.preventDefault();
const email = e.target.querySelector('input[type="email"]').value;
showNotification(`✓ Email ${email} cadastrado!`);
e.target.reset();
}
function showNotification(message) {
const notification = document.createElement('div');
notification.className = 'notification';
notification.textContent = message;
document.body.appendChild(notification);
setTimeout(() => {
notification.remove();
}, 3000);
}
window.onclick = function(event) {
const modal = document.getElementById('productModal');
if (event.target == modal) {
modal.style.display = 'none';
}
}
document.addEventListener('DOMContentLoaded', () => {
initCarousels();
});
</script>
</body>
</html>