Spaces:
Running
Running
Update index.html
Browse files- index.html +236 -238
index.html
CHANGED
|
@@ -4,213 +4,262 @@
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Lista de Precios - Mr Blonde</title>
|
| 7 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap" rel="stylesheet">
|
| 9 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
body {
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
-
|
| 18 |
header {
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
border-radius: 12px;
|
| 22 |
-
margin-bottom: 1rem;
|
| 23 |
}
|
|
|
|
| 24 |
footer {
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
font-size: 0.85rem;
|
| 30 |
-
color: #B0B0B0;
|
| 31 |
}
|
|
|
|
|
|
|
| 32 |
.card {
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
| 38 |
}
|
|
|
|
| 39 |
.card:hover {
|
| 40 |
-
|
| 41 |
-
|
| 42 |
}
|
|
|
|
| 43 |
.price {
|
| 44 |
-
|
| 45 |
-
|
| 46 |
}
|
|
|
|
| 47 |
.bonus {
|
| 48 |
-
|
| 49 |
-
|
| 50 |
}
|
|
|
|
|
|
|
| 51 |
input[type="number"], input[type="text"], select {
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
}
|
|
|
|
|
|
|
| 60 |
button {
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
}
|
| 69 |
-
button:hover { background-color: #D97706; }
|
| 70 |
-
.tab-active { border-bottom: 3px solid #F59E0B; font-weight: 600; }
|
| 71 |
|
| 72 |
/* Modal */
|
| 73 |
.modal-bg {
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
}
|
|
|
|
| 81 |
.modal-content {
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
}
|
|
|
|
| 91 |
.modal-header { font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem; }
|
| 92 |
-
.modal-close {
|
| 93 |
-
float: right;
|
| 94 |
-
font-weight: bold;
|
| 95 |
-
cursor: pointer;
|
| 96 |
-
color: #F59E0B;
|
| 97 |
-
}
|
| 98 |
</style>
|
| 99 |
</head>
|
| 100 |
<body>
|
| 101 |
|
| 102 |
-
<!-- Header -->
|
| 103 |
<header>
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
</header>
|
| 108 |
|
| 109 |
-
<
|
| 110 |
-
<nav class="flex justify-center mb-4 gap-2">
|
| 111 |
-
<button id="barberias-tab" class="px-4 py-2 tab-active">Venta a Barber铆as</button>
|
| 112 |
-
<button id="publico-tab" class="px-4 py-2">Venta al P煤blico</button>
|
| 113 |
-
</nav>
|
| 114 |
-
|
| 115 |
-
<!-- Search & Filter -->
|
| 116 |
-
<div class="flex flex-col md:flex-row justify-between items-center max-w-6xl mx-auto px-4 mb-4 gap-2">
|
| 117 |
-
<input type="text" id="search-input" placeholder="Buscar producto...">
|
| 118 |
-
<select id="category-filter">
|
| 119 |
-
<option value="">Todas las categor铆as</option>
|
| 120 |
-
<option value="pomadas">Pomadas</option>
|
| 121 |
-
<option value="aceites">Aceites</option>
|
| 122 |
-
<option value="shampoo">Shampoo</option>
|
| 123 |
-
<option value="after">After Shave</option>
|
| 124 |
-
<option value="merchandising">Merchandising</option>
|
| 125 |
-
</select>
|
| 126 |
-
</div>
|
| 127 |
-
|
| 128 |
-
<main class="flex-grow max-w-6xl mx-auto w-full px-4 pb-12 space-y-4">
|
| 129 |
-
|
| 130 |
-
<section id="barberias-section" class="data-section">
|
| 131 |
|
|
|
|
| 132 |
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 133 |
-
|
| 134 |
-
<
|
|
|
|
| 135 |
<div class="flex justify-between items-center"><div>Pomada OS 100g</div><div class="price" data-price="10713.06">$10.713,06</div></div>
|
| 136 |
<div class="flex justify-between items-center mt-2">
|
| 137 |
-
|
| 138 |
-
|
| 139 |
</div>
|
| 140 |
</div>
|
| 141 |
-
|
|
|
|
| 142 |
<div class="flex justify-between items-center"><div>Pocket OS 50g</div><div class="price" data-price="8073.18">$8.073,18</div></div>
|
| 143 |
<div class="flex justify-between items-center mt-2">
|
| 144 |
-
|
| 145 |
-
|
| 146 |
</div>
|
| 147 |
</div>
|
| 148 |
-
|
|
|
|
| 149 |
<div class="flex justify-between items-center"><div>Pomada Mate 50g</div><div class="price" data-price="10219.57">$10.219,57</div></div>
|
| 150 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 151 |
</div>
|
| 152 |
-
|
|
|
|
| 153 |
<div class="flex justify-between items-center"><div>Stardust Polvo Modelador 10cc</div><div class="price" data-price="10053.80">$10.053,80</div></div>
|
| 154 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 155 |
</div>
|
| 156 |
-
|
|
|
|
| 157 |
<div class="flex justify-between items-center"><div>Pomada L铆quida x 120ml</div><div class="price" data-price="8302.61">$8.302,61</div></div>
|
| 158 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 159 |
</div>
|
| 160 |
|
| 161 |
<!-- Shampoo -->
|
| 162 |
-
<div class="card" data-
|
| 163 |
<div class="flex justify-between items-center"><div>Shampoo Fortalecedor 2en1 200g</div><div class="price" data-price="10310.58">$10.310,58</div></div>
|
| 164 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 165 |
</div>
|
| 166 |
|
| 167 |
<!-- Aceites -->
|
| 168 |
-
<div class="card" data-
|
| 169 |
<div class="flex justify-between items-center"><div>Aceite para Barba 20ml N掳1 Azul</div><div class="price" data-price="9956.17">$9.956,17</div></div>
|
| 170 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 171 |
</div>
|
| 172 |
-
|
|
|
|
| 173 |
<div class="flex justify-between items-center"><div>Aceite para Barba 20ml N掳2 Rojo</div><div class="price" data-price="9956.17">$9.956,17</div></div>
|
| 174 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 175 |
</div>
|
| 176 |
-
|
|
|
|
| 177 |
<div class="flex justify-between items-center"><div>Aceite para Barba 20ml N掳3 Amarillo</div><div class="price" data-price="9956.17">$9.956,17</div></div>
|
| 178 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 179 |
</div>
|
| 180 |
-
|
|
|
|
| 181 |
<div class="flex justify-between items-center"><div>B谩lsamo Barba con Romero 30g</div><div class="price" data-price="8162.96">$8.162,96</div></div>
|
| 182 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 183 |
</div>
|
| 184 |
|
| 185 |
<!-- After Shave -->
|
| 186 |
-
<div class="card" data-
|
| 187 |
<div class="flex justify-between items-center"><div>After Shave 100g</div><div class="price" data-price="8480.46">$8.480,46</div></div>
|
| 188 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 189 |
</div>
|
| 190 |
-
|
|
|
|
|
|
|
| 191 |
<div class="flex justify-between items-center"><div>V谩lvula Recargable 250g para Gel Mr B</div><div class="price" data-price="1500.25">$1.500,25</div></div>
|
| 192 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 193 |
</div>
|
| 194 |
-
|
|
|
|
| 195 |
<div class="flex justify-between items-center"><div>Gel Afeitar Profesional 1080ml</div><div class="price" data-price="14940.09">$14.940,09</div></div>
|
| 196 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 197 |
</div>
|
| 198 |
-
|
|
|
|
| 199 |
<div class="flex justify-between items-center"><div>Crema de afeitar x 400g</div><div class="price" data-price="15735.42">$15.735,42</div></div>
|
| 200 |
-
<div class="flex justify-between items-center mt-2">
|
|
|
|
|
|
|
|
|
|
| 201 |
</div>
|
| 202 |
-
|
|
|
|
|
|
|
| 203 |
<div class="flex justify-between items-center"><div>Capas</div><div class="price" data-price="14026">$14.026</div></div>
|
| 204 |
-
<div class="flex justify-between items-center mt-2"><input type="number" min="0" value="0" class="quantity-input"><div class="bonus">Recibe: <span class="bonus-cell">0</span></div></div>
|
| 205 |
</div>
|
| 206 |
-
|
|
|
|
| 207 |
<div class="flex justify-between items-center"><div>Cajones Exhibidores Mr. Blonde</div><div class="price" data-price="34145">$34.145</div></div>
|
| 208 |
-
<div class="flex justify-between items-center mt-2"><input type="number" min="0" value="0" class="quantity-input"><div class="bonus">Recibe: <span class="bonus-cell">0</span></div></div>
|
| 209 |
</div>
|
|
|
|
| 210 |
</div>
|
| 211 |
|
| 212 |
<!-- Datos cliente -->
|
| 213 |
-
<div class="mt-6
|
| 214 |
<input type="text" id="client-name" placeholder="Tu nombre">
|
| 215 |
<input type="text" id="client-phone" placeholder="Tu tel茅fono">
|
| 216 |
<select id="client-location">
|
|
@@ -224,139 +273,88 @@ button:hover { background-color: #D97706; }
|
|
| 224 |
<button id="send-order">Generar Pedido</button>
|
| 225 |
</div>
|
| 226 |
|
| 227 |
-
</section>
|
| 228 |
-
|
| 229 |
<!-- Modal WhatsApp -->
|
| 230 |
<div id="whatsapp-modal" class="modal-bg">
|
| 231 |
<div class="modal-content">
|
| 232 |
<span class="modal-close" id="modal-close">×</span>
|
| 233 |
<div class="modal-header">Pedido WhatsApp</div>
|
| 234 |
-
<pre id="modal-msg"
|
| 235 |
<button id="open-whatsapp" class="mt-4">Abrir en WhatsApp</button>
|
| 236 |
</div>
|
| 237 |
</div>
|
| 238 |
|
| 239 |
-
</main>
|
| 240 |
-
|
| 241 |
-
<footer>
|
| 242 |
-
<p>漏 2025 Mr Blonde. Todos los derechos reservados.</p>
|
| 243 |
-
</footer>
|
| 244 |
-
|
| 245 |
<script>
|
| 246 |
-
//
|
| 247 |
-
document.getElementById('barberias-tab').addEventListener('click', () => switchTab('barberias'));
|
| 248 |
-
document.getElementById('publico-tab').addEventListener('click', () => switchTab('publico'));
|
| 249 |
-
|
| 250 |
-
function switchTab(tabName){
|
| 251 |
-
document.querySelectorAll('.data-section').forEach(s=>s.classList.add('hidden'));
|
| 252 |
-
document.getElementById(tabName+'-section').classList.remove('hidden');
|
| 253 |
-
document.querySelectorAll('nav button').forEach(b=>b.classList.remove('tab-active'));
|
| 254 |
-
document.getElementById(tabName+'-tab').classList.add('tab-active');
|
| 255 |
-
}
|
| 256 |
-
|
| 257 |
-
// Filtrado
|
| 258 |
-
const filterSelect = document.getElementById('category-filter');
|
| 259 |
-
const searchInput = document.getElementById('search-input');
|
| 260 |
-
|
| 261 |
-
function filterCards(){
|
| 262 |
-
const category = filterSelect.value;
|
| 263 |
-
const search = searchInput.value.toLowerCase();
|
| 264 |
-
document.querySelectorAll('#barberias-section .card').forEach(card=>{
|
| 265 |
-
const matchesCategory = !category || card.dataset.category===category;
|
| 266 |
-
const matchesSearch = card.textContent.toLowerCase().includes(search);
|
| 267 |
-
card.style.display = matchesCategory && matchesSearch ? 'block':'none';
|
| 268 |
-
});
|
| 269 |
-
}
|
| 270 |
-
filterSelect.addEventListener('change', filterCards);
|
| 271 |
-
searchInput.addEventListener('input', filterCards);
|
| 272 |
-
|
| 273 |
-
// Bonificaci贸n
|
| 274 |
-
function calculateBonus(qty, rule){
|
| 275 |
-
if(!rule) return qty;
|
| 276 |
-
let maxTotal = qty;
|
| 277 |
-
rule.split('/').forEach(r=>{
|
| 278 |
-
const [x,y] = r.match(/\d+/g).map(Number);
|
| 279 |
-
const temp = qty + Math.floor(qty/x)*y;
|
| 280 |
-
if(temp > maxTotal) maxTotal = temp;
|
| 281 |
-
});
|
| 282 |
-
return maxTotal;
|
| 283 |
-
}
|
| 284 |
-
|
| 285 |
const quantityInputs = document.querySelectorAll('.quantity-input');
|
| 286 |
const totalAmount = document.getElementById('total-amount');
|
| 287 |
-
|
| 288 |
-
quantityInputs.forEach(input=>{
|
| 289 |
-
input.addEventListener('input', ()=>{
|
| 290 |
-
let sum=0;
|
| 291 |
-
document.querySelectorAll('#barberias-section .card').forEach(card=>{
|
| 292 |
-
const qty = parseInt(card.querySelector('.quantity-input').value) || 0;
|
| 293 |
-
const price = parseFloat(card.querySelector('[data-price]').dataset.price) || 0;
|
| 294 |
-
const bonus = calculateBonus(qty, card.dataset.bonus);
|
| 295 |
-
card.querySelector('.bonus-cell').textContent = bonus > qty ? bonus : '';
|
| 296 |
-
sum += qty*price;
|
| 297 |
-
});
|
| 298 |
-
totalAmount.textContent = `$${sum.toLocaleString('es-AR',{minimumFractionDigits:2})}`;
|
| 299 |
-
});
|
| 300 |
-
});
|
| 301 |
-
|
| 302 |
-
// Modal WhatsApp
|
| 303 |
const modal = document.getElementById('whatsapp-modal');
|
| 304 |
-
const modalClose = document.getElementById('modal-close');
|
| 305 |
const modalMsg = document.getElementById('modal-msg');
|
| 306 |
-
const
|
| 307 |
-
|
| 308 |
-
document.getElementById('send-order').addEventListener('click', ()=>{
|
| 309 |
-
const name = document.getElementById('client-name').value.trim();
|
| 310 |
-
const phone = document.getElementById('client-phone').value.trim();
|
| 311 |
-
const location = document.getElementById('client-location').value;
|
| 312 |
-
|
| 313 |
-
if(!name || !phone || !location){
|
| 314 |
-
alert('Ingresa nombre, tel茅fono y localidad');
|
| 315 |
-
return;
|
| 316 |
-
}
|
| 317 |
-
|
| 318 |
-
let msg = `馃搵 *Pedido Mr Blonde*\n\n*Cliente:* ${name}\n*Tel茅fono:* ${phone}\n*Localidad:* ${location}\n\n*Productos:*\n`;
|
| 319 |
-
let total = 0;
|
| 320 |
-
let totalUnits = 0;
|
| 321 |
-
document.querySelectorAll('#barberias-section .card').forEach(card=>{
|
| 322 |
-
const qty = parseInt(card.querySelector('.quantity-input').value) || 0;
|
| 323 |
-
if(qty > 0){
|
| 324 |
-
const bonus = parseInt(card.querySelector('.bonus-cell').textContent) || 0;
|
| 325 |
-
const price = parseFloat(card.querySelector('[data-price]').dataset.price) || 0;
|
| 326 |
-
total += qty * price;
|
| 327 |
-
totalUnits += qty;
|
| 328 |
-
if(bonus > qty){
|
| 329 |
-
msg += `- ${card.querySelector('div:first-child').textContent}: ${qty} (+${bonus - qty} bonif)\n`;
|
| 330 |
-
} else {
|
| 331 |
-
msg += `- ${card.querySelector('div:first-child').textContent}: ${qty}\n`;
|
| 332 |
-
}
|
| 333 |
-
}
|
| 334 |
-
});
|
| 335 |
-
|
| 336 |
-
msg += `\n*TOTAL:* $${total.toLocaleString('es-AR',{minimumFractionDigits:2})}`;
|
| 337 |
-
|
| 338 |
-
if(totalUnits === 0){
|
| 339 |
-
alert('Selecciona al menos un producto');
|
| 340 |
-
return;
|
| 341 |
-
}
|
| 342 |
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 347 |
|
| 348 |
-
|
| 349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 355 |
});
|
| 356 |
|
| 357 |
-
modalClose.
|
| 358 |
-
|
|
|
|
|
|
|
|
|
|
| 359 |
</script>
|
| 360 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 361 |
</body>
|
| 362 |
</html>
|
|
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Lista de Precios - Mr Blonde</title>
|
|
|
|
| 7 |
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap" rel="stylesheet">
|
| 8 |
<style>
|
| 9 |
+
:root {
|
| 10 |
+
--color1: #b9d7d9; /* Tarjetas productos */
|
| 11 |
+
--color2: #668284; /* Fondo inputs/form */
|
| 12 |
+
--color3: #2a2829; /* Fondo principal */
|
| 13 |
+
--color4: #493736; /* Botones */
|
| 14 |
+
--color5: #7b3b3b; /* Bonificaci贸n / alertas */
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
body {
|
| 18 |
+
font-family: 'Montserrat', sans-serif;
|
| 19 |
+
background-color: var(--color3);
|
| 20 |
+
color: #F3F4F6;
|
| 21 |
+
padding: 1rem;
|
| 22 |
+
min-height: 100vh;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
header, footer {
|
| 26 |
+
text-align: center;
|
| 27 |
+
border-radius: 12px;
|
| 28 |
+
padding: 1rem;
|
| 29 |
}
|
| 30 |
+
|
| 31 |
header {
|
| 32 |
+
background-color: var(--color2);
|
| 33 |
+
margin-bottom: 1rem;
|
|
|
|
|
|
|
| 34 |
}
|
| 35 |
+
|
| 36 |
footer {
|
| 37 |
+
background-color: var(--color2);
|
| 38 |
+
margin-top: 2rem;
|
| 39 |
+
font-size: 0.85rem;
|
| 40 |
+
color: #B0B0B0;
|
|
|
|
|
|
|
| 41 |
}
|
| 42 |
+
|
| 43 |
+
/* Tarjetas */
|
| 44 |
.card {
|
| 45 |
+
background-color: var(--color1);
|
| 46 |
+
border-radius: 12px;
|
| 47 |
+
padding: 1rem;
|
| 48 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.5);
|
| 49 |
+
transition: transform 0.2s, box-shadow 0.2s;
|
| 50 |
+
color: #1f1f1f;
|
| 51 |
}
|
| 52 |
+
|
| 53 |
.card:hover {
|
| 54 |
+
transform: translateY(-4px);
|
| 55 |
+
box-shadow: 0 8px 24px rgba(0,0,0,0.6);
|
| 56 |
}
|
| 57 |
+
|
| 58 |
.price {
|
| 59 |
+
color: #F59E0B;
|
| 60 |
+
font-weight: 600;
|
| 61 |
}
|
| 62 |
+
|
| 63 |
.bonus {
|
| 64 |
+
color: var(--color5);
|
| 65 |
+
font-weight: 500;
|
| 66 |
}
|
| 67 |
+
|
| 68 |
+
/* Inputs */
|
| 69 |
input[type="number"], input[type="text"], select {
|
| 70 |
+
border-radius: 8px;
|
| 71 |
+
padding: 0.5rem;
|
| 72 |
+
border: 1px solid var(--color2);
|
| 73 |
+
background-color: var(--color2);
|
| 74 |
+
color: #F3F4F6;
|
| 75 |
+
width: 100%;
|
| 76 |
+
margin-bottom: 0.5rem;
|
| 77 |
}
|
| 78 |
+
|
| 79 |
+
/* Botones */
|
| 80 |
button {
|
| 81 |
+
background-color: var(--color4);
|
| 82 |
+
color: #F3F4F6;
|
| 83 |
+
font-weight: 600;
|
| 84 |
+
padding: 0.75rem;
|
| 85 |
+
border-radius: 8px;
|
| 86 |
+
width: 100%;
|
| 87 |
+
transition: background-color 0.2s;
|
| 88 |
+
cursor: pointer;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
button:hover {
|
| 92 |
+
background-color: var(--color5);
|
| 93 |
}
|
|
|
|
|
|
|
| 94 |
|
| 95 |
/* Modal */
|
| 96 |
.modal-bg {
|
| 97 |
+
display: none;
|
| 98 |
+
position: fixed;
|
| 99 |
+
z-index: 50;
|
| 100 |
+
left: 0; top: 0;
|
| 101 |
+
width: 100%; height: 100%;
|
| 102 |
+
background-color: rgba(0,0,0,0.6);
|
| 103 |
}
|
| 104 |
+
|
| 105 |
.modal-content {
|
| 106 |
+
background-color: var(--color2);
|
| 107 |
+
margin: 5% auto;
|
| 108 |
+
padding: 1.5rem;
|
| 109 |
+
border-radius: 12px;
|
| 110 |
+
max-width: 600px;
|
| 111 |
+
color: #F3F4F6;
|
| 112 |
+
box-shadow: 0 8px 24px rgba(0,0,0,0.8);
|
| 113 |
+
white-space: pre-line;
|
| 114 |
}
|
| 115 |
+
|
| 116 |
.modal-header { font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem; }
|
| 117 |
+
.modal-close { float: right; font-weight: bold; cursor: pointer; color: var(--color4); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
</style>
|
| 119 |
</head>
|
| 120 |
<body>
|
| 121 |
|
|
|
|
| 122 |
<header>
|
| 123 |
+
<h1 class="text-2xl font-bold mb-2">Lista de Precios - Barber铆as</h1>
|
| 124 |
+
<p class="text-sm mb-2">V谩lida desde 01/09/2025</p>
|
| 125 |
+
<p class="text-sm p-3 rounded-lg">馃巵 Compra 12 unidades o m谩s y recib铆 env铆o gratis en CABA, Rosario y C贸rdoba Capital. Consult谩 por otras localidades.</p>
|
| 126 |
</header>
|
| 127 |
|
| 128 |
+
<main class="flex flex-col gap-4 max-w-6xl mx-auto">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
|
| 130 |
+
<!-- Productos -->
|
| 131 |
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 132 |
+
|
| 133 |
+
<!-- Pomadas -->
|
| 134 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 135 |
<div class="flex justify-between items-center"><div>Pomada OS 100g</div><div class="price" data-price="10713.06">$10.713,06</div></div>
|
| 136 |
<div class="flex justify-between items-center mt-2">
|
| 137 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 138 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 139 |
</div>
|
| 140 |
</div>
|
| 141 |
+
|
| 142 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 143 |
<div class="flex justify-between items-center"><div>Pocket OS 50g</div><div class="price" data-price="8073.18">$8.073,18</div></div>
|
| 144 |
<div class="flex justify-between items-center mt-2">
|
| 145 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 146 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 147 |
</div>
|
| 148 |
</div>
|
| 149 |
+
|
| 150 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 151 |
<div class="flex justify-between items-center"><div>Pomada Mate 50g</div><div class="price" data-price="10219.57">$10.219,57</div></div>
|
| 152 |
+
<div class="flex justify-between items-center mt-2">
|
| 153 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 154 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 155 |
+
</div>
|
| 156 |
</div>
|
| 157 |
+
|
| 158 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 159 |
<div class="flex justify-between items-center"><div>Stardust Polvo Modelador 10cc</div><div class="price" data-price="10053.80">$10.053,80</div></div>
|
| 160 |
+
<div class="flex justify-between items-center mt-2">
|
| 161 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 162 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 163 |
+
</div>
|
| 164 |
</div>
|
| 165 |
+
|
| 166 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 167 |
<div class="flex justify-between items-center"><div>Pomada L铆quida x 120ml</div><div class="price" data-price="8302.61">$8.302,61</div></div>
|
| 168 |
+
<div class="flex justify-between items-center mt-2">
|
| 169 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 170 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 171 |
+
</div>
|
| 172 |
</div>
|
| 173 |
|
| 174 |
<!-- Shampoo -->
|
| 175 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 176 |
<div class="flex justify-between items-center"><div>Shampoo Fortalecedor 2en1 200g</div><div class="price" data-price="10310.58">$10.310,58</div></div>
|
| 177 |
+
<div class="flex justify-between items-center mt-2">
|
| 178 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 179 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 180 |
+
</div>
|
| 181 |
</div>
|
| 182 |
|
| 183 |
<!-- Aceites -->
|
| 184 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 185 |
<div class="flex justify-between items-center"><div>Aceite para Barba 20ml N掳1 Azul</div><div class="price" data-price="9956.17">$9.956,17</div></div>
|
| 186 |
+
<div class="flex justify-between items-center mt-2">
|
| 187 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 188 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 189 |
+
</div>
|
| 190 |
</div>
|
| 191 |
+
|
| 192 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 193 |
<div class="flex justify-between items-center"><div>Aceite para Barba 20ml N掳2 Rojo</div><div class="price" data-price="9956.17">$9.956,17</div></div>
|
| 194 |
+
<div class="flex justify-between items-center mt-2">
|
| 195 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 196 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 197 |
+
</div>
|
| 198 |
</div>
|
| 199 |
+
|
| 200 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 201 |
<div class="flex justify-between items-center"><div>Aceite para Barba 20ml N掳3 Amarillo</div><div class="price" data-price="9956.17">$9.956,17</div></div>
|
| 202 |
+
<div class="flex justify-between items-center mt-2">
|
| 203 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 204 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 205 |
+
</div>
|
| 206 |
</div>
|
| 207 |
+
|
| 208 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 209 |
<div class="flex justify-between items-center"><div>B谩lsamo Barba con Romero 30g</div><div class="price" data-price="8162.96">$8.162,96</div></div>
|
| 210 |
+
<div class="flex justify-between items-center mt-2">
|
| 211 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 212 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 213 |
+
</div>
|
| 214 |
</div>
|
| 215 |
|
| 216 |
<!-- After Shave -->
|
| 217 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 218 |
<div class="flex justify-between items-center"><div>After Shave 100g</div><div class="price" data-price="8480.46">$8.480,46</div></div>
|
| 219 |
+
<div class="flex justify-between items-center mt-2">
|
| 220 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 221 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 222 |
+
</div>
|
| 223 |
</div>
|
| 224 |
+
|
| 225 |
+
<!-- Merchandising -->
|
| 226 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 227 |
<div class="flex justify-between items-center"><div>V谩lvula Recargable 250g para Gel Mr B</div><div class="price" data-price="1500.25">$1.500,25</div></div>
|
| 228 |
+
<div class="flex justify-between items-center mt-2">
|
| 229 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 230 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 231 |
+
</div>
|
| 232 |
</div>
|
| 233 |
+
|
| 234 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 235 |
<div class="flex justify-between items-center"><div>Gel Afeitar Profesional 1080ml</div><div class="price" data-price="14940.09">$14.940,09</div></div>
|
| 236 |
+
<div class="flex justify-between items-center mt-2">
|
| 237 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 238 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 239 |
+
</div>
|
| 240 |
</div>
|
| 241 |
+
|
| 242 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 243 |
<div class="flex justify-between items-center"><div>Crema de afeitar x 400g</div><div class="price" data-price="15735.42">$15.735,42</div></div>
|
| 244 |
+
<div class="flex justify-between items-center mt-2">
|
| 245 |
+
<input type="number" min="0" value="0" class="quantity-input">
|
| 246 |
+
<div class="bonus">Recibe: <span class="bonus-cell"></span></div>
|
| 247 |
+
</div>
|
| 248 |
</div>
|
| 249 |
+
|
| 250 |
+
<!-- Merchandising Total -->
|
| 251 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 252 |
<div class="flex justify-between items-center"><div>Capas</div><div class="price" data-price="14026">$14.026</div></div>
|
|
|
|
| 253 |
</div>
|
| 254 |
+
|
| 255 |
+
<div class="card" data-bonus="6x1/8x2">
|
| 256 |
<div class="flex justify-between items-center"><div>Cajones Exhibidores Mr. Blonde</div><div class="price" data-price="34145">$34.145</div></div>
|
|
|
|
| 257 |
</div>
|
| 258 |
+
|
| 259 |
</div>
|
| 260 |
|
| 261 |
<!-- Datos cliente -->
|
| 262 |
+
<div class="mt-6 p-4 rounded-lg" style="background-color: var(--color2);">
|
| 263 |
<input type="text" id="client-name" placeholder="Tu nombre">
|
| 264 |
<input type="text" id="client-phone" placeholder="Tu tel茅fono">
|
| 265 |
<select id="client-location">
|
|
|
|
| 273 |
<button id="send-order">Generar Pedido</button>
|
| 274 |
</div>
|
| 275 |
|
|
|
|
|
|
|
| 276 |
<!-- Modal WhatsApp -->
|
| 277 |
<div id="whatsapp-modal" class="modal-bg">
|
| 278 |
<div class="modal-content">
|
| 279 |
<span class="modal-close" id="modal-close">×</span>
|
| 280 |
<div class="modal-header">Pedido WhatsApp</div>
|
| 281 |
+
<pre id="modal-msg"></pre>
|
| 282 |
<button id="open-whatsapp" class="mt-4">Abrir en WhatsApp</button>
|
| 283 |
</div>
|
| 284 |
</div>
|
| 285 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
<script>
|
| 287 |
+
// Funciones JS para: calcular bonificaci贸n, total, mostrar modal, alertas
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
const quantityInputs = document.querySelectorAll('.quantity-input');
|
| 289 |
const totalAmount = document.getElementById('total-amount');
|
| 290 |
+
const sendBtn = document.getElementById('send-order');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
const modal = document.getElementById('whatsapp-modal');
|
|
|
|
| 292 |
const modalMsg = document.getElementById('modal-msg');
|
| 293 |
+
const modalClose = document.getElementById('modal-close');
|
| 294 |
+
const openWhatsAppBtn = document.getElementById('open-whatsapp');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
|
| 296 |
+
function calculateBonus(qty, rule){
|
| 297 |
+
if(!rule) return qty;
|
| 298 |
+
let total = qty;
|
| 299 |
+
let bestBonus = qty;
|
| 300 |
+
rule.split('/').forEach(r=>{
|
| 301 |
+
const [x,y] = r.match(/\d+/g).map(Number);
|
| 302 |
+
const b = qty + Math.floor(qty/x)*y;
|
| 303 |
+
if(b > bestBonus) bestBonus = b;
|
| 304 |
+
});
|
| 305 |
+
return bestBonus;
|
| 306 |
+
}
|
| 307 |
|
| 308 |
+
function updateTotals(){
|
| 309 |
+
let sum = 0;
|
| 310 |
+
quantityInputs.forEach(input=>{
|
| 311 |
+
const card = input.closest('.card');
|
| 312 |
+
const qty = parseInt(input.value) || 0;
|
| 313 |
+
const price = parseFloat(card.querySelector('[data-price]').dataset.price) || 0;
|
| 314 |
+
const bonus = calculateBonus(qty, card.dataset.bonus);
|
| 315 |
+
card.querySelector('.bonus-cell').textContent = (bonus>qty)? bonus : '';
|
| 316 |
+
sum += qty*price;
|
| 317 |
+
});
|
| 318 |
+
totalAmount.textContent = `$${sum.toLocaleString('es-AR')}`;
|
| 319 |
+
}
|
| 320 |
|
| 321 |
+
quantityInputs.forEach(input => input.addEventListener('input', updateTotals));
|
| 322 |
+
|
| 323 |
+
sendBtn.addEventListener('click', ()=>{
|
| 324 |
+
const name = document.getElementById('client-name').value || 'Cliente';
|
| 325 |
+
const phone = document.getElementById('client-phone').value || 'No informado';
|
| 326 |
+
const location = document.getElementById('client-location').value || 'No informada';
|
| 327 |
+
let totalQty = 0;
|
| 328 |
+
let msg = `CLIENTE: ${name}\nTEL脡FONO: ${phone}\nLOCALIDAD: ${location}\n\nPRODUCTOS:\n`;
|
| 329 |
+
quantityInputs.forEach(input=>{
|
| 330 |
+
const card = input.closest('.card');
|
| 331 |
+
const qty = parseInt(input.value) || 0;
|
| 332 |
+
if(qty>0){
|
| 333 |
+
const bonus = calculateBonus(qty, card.dataset.bonus);
|
| 334 |
+
totalQty += qty;
|
| 335 |
+
msg += `${card.querySelector('div').innerText} = ${qty}`;
|
| 336 |
+
if(bonus>qty) msg += ` (bonif: ${bonus-qty})`;
|
| 337 |
+
msg += '\n';
|
| 338 |
}
|
| 339 |
+
});
|
| 340 |
+
msg += `\nTOTAL: ${totalAmount.textContent}\n`;
|
| 341 |
+
if(totalQty<12 && (location==='CABA' || location==='Rosario' || location==='C贸rdoba Capital')){
|
| 342 |
+
msg += '\n鈿狅笍 Pod茅s agregar m谩s productos para recibir env铆o gratis 馃巵';
|
| 343 |
+
}
|
| 344 |
+
modalMsg.textContent = msg;
|
| 345 |
+
modal.style.display='block';
|
| 346 |
});
|
| 347 |
|
| 348 |
+
modalClose.addEventListener('click', ()=>{ modal.style.display='none'; });
|
| 349 |
+
openWhatsAppBtn.addEventListener('click', ()=>{
|
| 350 |
+
const url = `https://wa.me/?text=${encodeURIComponent(modalMsg.textContent)}`;
|
| 351 |
+
window.open(url, '_blank');
|
| 352 |
+
});
|
| 353 |
</script>
|
| 354 |
|
| 355 |
+
<footer>
|
| 356 |
+
Mr Blonde - Todos los derechos reservados
|
| 357 |
+
</footer>
|
| 358 |
+
|
| 359 |
</body>
|
| 360 |
</html>
|