Unser Katalog

Über 35 Produkte – wählen Sie Ihre Arbeitskleidung und fügen Sie sie zur Anfrage hinzu.

Alle Artikel ausgewählt? Jetzt anfragen!

Klicken Sie auf den Anfrage-Button oben rechts, um Ihre Auswahl zu überprüfen und abzusenden.

const SZC=['XS','S','M','L','XL','XXL','3XL'],SZS=['38','39','40','41','42','43','44','45','46','47']; const TM={'wasserdicht':{i:'💧',l:'Wasserdicht'},'winddicht':{i:'🌬️',l:'Winddicht'},'atmungsaktiv':{i:'🌀',l:'Atmungsaktiv'},'kapuze':{i:'🧥',l:'Kapuze'},'reflektierend':{i:'✨',l:'Reflektierend'},'recycelt':{i:'♻️',l:'Recycelt'},'baumwolle':{i:'🌿',l:'Baumwolle'},'oeko-tex':{i:'🏅',l:'OEKO-TEX®'},'leicht':{i:'🪶',l:'Leicht'},'gefüttert':{i:'🧶',l:'Gefüttert'},'softshell':{i:'🛡️',l:'Softshell'},'fleece':{i:'☁️',l:'Fleece'},'stretch':{i:'↔️',l:'Stretch'},'robust':{i:'🔩',l:'Robust'},'cargo':{i:'📦',l:'Cargo'},'unisex':{i:'👤',l:'Unisex'},'sicherheitsschuh':{i:'🥾',l:'Sicherheit'},'antistatisch':{i:'⚡',l:'Antistatisch'},'S3':{i:'🛡️',l:'S3'},'stahlkappe':{i:'🔧',l:'Stahlkappe'},'sommer':{i:'☀️',l:'Sommer'},'denim':{i:'👖',l:'Denim'},'flammhemmend':{i:'🔥',l:'Flammhemmend'},'zertifiziert':{i:'📋',l:'Zertifiziert'},'cordura':{i:'💎',l:'CORDURA®'}}; const CAT_ICO={'Jacken':'🧥','Hosen':'👖','Schuhe':'👟','T-Shirts':'👕','Hoodies':'🧶','Overalls':'🔧','Shorts':'🩳','Caps':'🧢'}; let cart=[],lIs=[],lI=0,aC='all',lD=null; const CATS=[...new Set(P.map(p=>p.category))]; function iCP(){const e=document.getElementById('catP');let h=``;CATS.forEach(c=>{const ico=CAT_ICO[c]||'📋';h+=``});e.innerHTML=h;e.querySelectorAll('.cat-pill').forEach(b=>b.addEventListener('click',()=>{e.querySelectorAll('.cat-pill').forEach(x=>x.classList.remove('active'));b.classList.add('active');aC=b.dataset.cat;rC()}))} function gF(){return P.filter(p=>aC==='all'||p.category===aC)} function rC(){const e=document.getElementById('cat');const f=gF();if(!f.length){e.innerHTML='

Keine Produkte gefunden

';return}e.innerHTML='';CATS.forEach(cat=>{const items=f.filter(p=>p.category===cat);if(!items.length)return;const s=document.createElement('div');s.innerHTML=`

${cat}

${items.length} Artikel
`;e.appendChild(s);const g=document.createElement('div');g.className='grid';items.forEach((p,i)=>{const imgs=IMG[p.id]||[];const oc=imgs.length===1?' one':'';const sz=p.hasShoeSize?SZS:(p.hasSizes?SZC:[]);const tg=(p.tags||[]).map(t=>{const m=TM[t]||{i:'',l:t};return`${m.i} ${m.l}`}).join(''); const minQty=p.prices[0].qty; g.innerHTML+=`
${p.sku}${imgs.map(s=>`${p.name}`).join('')}
${tg}
${p.category}

${p.name}

${p.weight?`
${p.weight}
`:''}
${p.prices.map((pr,j)=>`
ab ${pr.qty} Stk.
${pr.price}.-
CHF/Stk.
`).join('')}
${sz.length?`
${p.hasShoeSize?'Schuhgrössen & Anzahl:':'Grössen & Anzahl:'}
${sz.map(s=>`
${s}
`).join('')}
`:''}
falls Grössen noch offen
`});e.appendChild(g)})} function sT(el,pid){el.parentElement.querySelectorAll('.pt').forEach(t=>t.classList.remove('sel'));el.classList.add('sel');chkMin(pid)} function chkMin(pid){const allC=document.querySelectorAll('.card');for(const c of allC){const btn=c.querySelector(`.abtn[onclick*="aI(${pid}"]`);if(!btn)continue;const sel=c.querySelector('.pt.sel');if(!sel)return;const min=parseInt(sel.dataset.min);const sI=c.querySelectorAll('.sz-i');const qi=c.querySelector('.qi');let tot=0;sI.forEach(inp=>{tot+=parseInt(inp.value)||0});const qv=parseInt(qi?.value)||0;const total=tot>0?tot:qv;const warn=document.getElementById(`min-${pid}`);if(total>0&&totalx.id===pid);const card=btn.closest('.card');const sel=card.querySelector('.pt.sel');const min=parseInt(sel.dataset.min);const price=parseInt(sel.dataset.price);const sI=card.querySelectorAll('.sz-i');let sz={},tot=0;sI.forEach(inp=>{const v=parseInt(inp.value)||0;if(v>0){sz[inp.dataset.size]=v;tot+=v}});const qi=card.querySelector('.qi');const qv=parseInt(qi?.value)||0; if(tot===0&&qv>0){if(qv{warn.style.display='none'},2500);return} if(totc.id!==pid);cart.push({id:pid,sku:p.sku,name:p.name,price,sizes:sz,totalPieces:tot,qtyOnly:qv>0&&Object.keys(sz).length===0,image:(IMG[pid]||[''])[0]}); btn.textContent='✓ Hinzugefügt!';btn.classList.add('ok');setTimeout(()=>{btn.textContent='✚ Zur Anfrage hinzufügen';btn.classList.remove('ok')},1200);uP()} function uP(){const b=document.getElementById('fb'),l=document.getElementById('cl'),e=document.getElementById('em');if(cart.length){b.style.display='inline-grid';b.textContent=cart.length}else{b.style.display='none'}if(!cart.length){e.style.display='block';l.innerHTML='';return}e.style.display='none'; l.innerHTML=cart.map(it=>{const s=it.qtyOnly?`${it.totalPieces} Stk. (Grössen offen)`:(Object.keys(it.sizes).length?Object.entries(it.sizes).map(([s,q])=>`${s}: ${q}×`).join(', '):`${it.totalPieces} Stk.`);const t=it.totalPieces*it.price;return`
${it.name}
${it.sku} · ${s}
CHF ${it.price}.-/Stk. · Total: CHF ${t}.-
`}).join('')} function rI(pid){cart=cart.filter(c=>c.id!==pid);uP()} function togP(){document.getElementById('pan').classList.toggle('on');document.getElementById('pov').classList.toggle('on')} function hFile(f){if(!f)return;lD={name:f.name};const r=new FileReader();r.onload=e=>{lD.data=e.target.result;document.getElementById('lt').src=e.target.result;document.getElementById('lname').textContent=f.name;document.getElementById('lu').style.display='none';document.getElementById('lp2').style.display='flex'};r.readAsDataURL(f)} function hDrop(e){e.preventDefault();e.currentTarget.classList.remove('dg');hFile(e.dataTransfer.files[0])} function rLogo(){lD=null;document.getElementById('lu').style.display='';document.getElementById('lp2').style.display='none';document.getElementById('lf').value=''} function oLb(pid,idx){lIs=IMG[pid]||[];lI=idx;if(!lIs.length)return;document.getElementById('lbi').src=lIs[lI];document.getElementById('lb').classList.add('on');document.body.style.overflow='hidden'} function cLb(e){if(e&&e.target!==e.currentTarget&&!e.target.classList.contains('lb-x'))return;document.getElementById('lb').classList.remove('on');document.body.style.overflow=''} function nLb(d,e){e.stopPropagation();lI=(lI+d+lIs.length)%lIs.length;document.getElementById('lbi').src=lIs[lI]} async function send(e){e.preventDefault();if(!cart.length){alert('Bitte mindestens einen Artikel hinzufügen.');return} const form=e.target,btn=document.getElementById('sb');btn.disabled=true;btn.textContent='⏳ Wird gesendet...'; let gt=0; const prodBlocks=cart.map((it,idx)=>{ const s=it.qtyOnly?`${it.totalPieces} Stk. (Grössen offen)`:(Object.keys(it.sizes).length?Object.entries(it.sizes).map(([s,q])=>`${s}: ${q} Stk.`).join(', '):`${it.totalPieces} Stk.`); const t=it.totalPieces*it.price;gt+=t; return `━━━ Produkt ${idx+1} ━━━\nArtikel: ${it.name}\nSKU: ${it.sku}\nGrössen: ${s}\nPreis: CHF ${it.price}.-/Stk.\nAnzahl: ${it.totalPieces} Stk.\nSubtotal: CHF ${t}.-`}).join('\n\n'); const summary=`${prodBlocks}\n\n══════════════════\nGESAMTTOTAL: CHF ${gt}.-\nAnzahl Produkte: ${cart.length}\n══════════════════`; const methods=[...document.querySelectorAll('#methods .m-opt:checked')].map(i=>i.value).join(', ')||'Keine'; const placements=[...document.querySelectorAll('#plG .pl-opt:checked')].map(i=>i.value).join(', ')||'Keine'; const d=new FormData(form); d.append('_subject',`Arbeitskleidung Anfrage – ${d.get('firma')||'Unbekannt'} – ${cart.length} Produkte – CHF ${gt}.-`); d.append('bestellung',summary);d.append('gesamttotal',`CHF ${gt}.-`);d.append('anzahl_produkte',cart.length); d.append('beschriftungsart',methods);d.append('platzierung',placements);d.append('logo',lD?lD.name:'Kein Logo'); if(lD&&lD.data){try{const blob=await fetch(lD.data).then(r=>r.blob());d.append('logo_file',blob,lD.name)}catch(err){console.log('Logo skip:',err)}} try{const r=await fetch('https://formspree.io/f/xykdnrvn',{method:'POST',body:d,headers:{'Accept':'application/json'}}); const result=await r.json().catch(()=>null); if(r.ok){document.getElementById('pb').innerHTML='

Anfrage erfolgreich gesendet!

Vielen Dank für Ihre Anfrage.
Wir melden uns innerhalb von 24 Stunden.

';document.getElementById('pf').style.display='none';cart=[];uP()} else{throw new Error(result&&result.errors?result.errors.map(e=>e.message).join(', '):'Server-Fehler')}} catch(err){console.error('Form error:',err);btn.disabled=false;btn.textContent='📨 Unverbindliche Anfrage absenden'; const old=document.getElementById('formErr');if(old)old.remove(); const el=document.createElement('div');el.id='formErr';el.style.cssText='padding:10px 14px;background:rgba(239,68,68,.08);border:1.5px solid rgba(239,68,68,.2);border-radius:10px;color:var(--red);font-size:.82rem;font-weight:600;margin-top:8px;'; el.textContent='⚠️ '+(err.message||'Bitte prüfen Sie Ihre Verbindung und versuchen es erneut.'); btn.parentElement.appendChild(el);setTimeout(()=>{const x=document.getElementById('formErr');if(x)x.remove()},8000)}} // POPUP document.addEventListener('keydown',e=>{if(e.key==='Escape'){cLb();if(document.getElementById('pan').classList.contains('on'))togP()}}); iCP();rC();