/* ELS: kiekio akcijos ženklelis mėlynas – 2026-11-17 */
(function(){try{if(document.getElementById("els-tier"))return;var s=document.createElement("style");s.id="els-tier";s.textContent=".max-tier-price-icon{background:#eff6ff!important;background-image:none!important;color:#0b4f8a!important;border:1px solid #0284c7!important;border-radius:6px!important;box-shadow:none!important}.max-tier-price-icon *{color:#0b4f8a!important}";(document.head||document.documentElement).appendChild(s)}catch(e){console.warn("ELS tier",e)}})();
/* ELS: pavadinimas (variantas H) ir aprašymo išskleidimas – 2026-11-17 */
(function(){function run(){try{var LG=(location.pathname.match(/^\/(en|ru|lv|ee|pl)\//)||[0,"lt"])[1];
var hw=document.querySelector(".product-heading-wrapper"),h1=hw&&hw.querySelector("h1");
if(h1&&!document.getElementById("els-th")){var P=h1.textContent.replace(/\s+/g," ").trim().split(" | ").map(function(x){return x.trim()}).filter(Boolean);
if(P.length>2){var code=((document.querySelector("#product_code .item-code")||{}).textContent||"").trim(),brand="",sub=[],chips=[],model=[],ST=/^(DIN|LED|AC|DC|PV|MCB|RCD|RCBO|USB|SMD|IP\d*|NO|NC|UV|RGB|PIR|GSM|LTE|POE|IK\d*|TH|MCCB|SPD)$/i;
P.slice(1).forEach(function(x){if(x===code||/^\d{8,14}$/.test(x)||(/[A-Z]/.test(x)&&/\d/.test(x)&&/[-\/]/.test(x)&&!/\s/.test(x)&&x.length>6))return;
/* modelis = gamintojas + kodas viename segmente (pvz. „SCHELINGER A53-SPD-MOV-DC-3P-T1T2“, „VECAS MC4-315“) */var MW=x.split(/\s+/);if(MW.length>1&&((code.length>=4&&x.indexOf(code)>=0)||(MW.some(function(w){return /[A-Z]/.test(w)&&/\d/.test(w)&&/[-\/]/.test(w)&&w.length>6})&&MW.some(function(w){return /^[A-ZĄČĘĖĮŠŲŪŽ][A-Za-ząčęėįšųūž]{2,}$/.test(w)&&!ST.test(w)&&!/^(RE|PRO)$/i.test(w)})))){model.push(x);return}
if(!brand&&!/\d/.test(x)&&/^[A-ZĄČĘĖĮŠŲŪŽ]/.test(x)&&!ST.test(x)&&x.length>=3&&x.length<=28){brand=x;return}
if(!/\d/.test(x)&&/^[a-ząčęėįšųūžа-я]/.test(x)){sub.push(x);return}chips.push(x)});
h1.textContent="";var t=document.createElement("span");t.id="els-th";t.textContent=P[0];h1.appendChild(t);
if(sub.length){var s=document.createElement("span");s.style.cssText="display:block;font-size:.62em;font-weight:400;color:#475569;margin-top:4px";s.textContent=sub.join(" · ");h1.appendChild(s)}
if(brand){hw.style.cssText="display:flex;justify-content:space-between;align-items:flex-start;gap:12px";var bd=document.createElement("span");bd.textContent=brand;bd.style.cssText="flex:none;font:700 12px/1.2 Arial,sans-serif;color:#0b4f8a;border:1px solid #0b4f8a;border-radius:4px;padding:4px 8px;margin-top:4px;white-space:nowrap";hw.appendChild(bd)}
if(chips.length||model.length){var c=document.createElement("div");c.id="els-chips";c.style.cssText="margin:6px 0 2px;clear:both";chips.forEach(function(x){var k=document.createElement("span");k.textContent=x;k.style.cssText="display:inline-block;border:1px solid #94a3b8;border-radius:4px;padding:2px 8px;margin:4px 6px 0 0;font:13px/1.4 Arial,sans-serif;color:#334155;background:#fff";c.appendChild(k)});
/* ELS: modelis (gamintojas + kodas) – ne parametras: rodomas blankiu tekstu eilutės gale, be rėmelio (2026-11-18) */
if(model.length){var md=document.createElement("small");md.className="els-model";md.textContent=model.join(" · ");md.style.cssText="display:inline-block;margin:4px 0 0 4px;font:12px/1.4 Arial,sans-serif;color:#94a3b8;vertical-align:middle;white-space:nowrap";c.appendChild(md)}
hw.parentNode.insertBefore(c,hw.nextSibling)}}}
}catch(e){console.warn("ELS pavadinimas",e)}
try{var di=document.querySelector(".product-tabs .duk-item"),hd=di&&di.querySelector(".duk-header"),b=hd&&hd.nextElementSibling;
if(b&&!document.getElementById("els-dmore")&&b.scrollHeight>900){var T={lt:["Rodyti visą aprašymą ↓","Suskleisti aprašymą ↑"],en:["Show full description ↓","Collapse description ↑"],ru:["Показать всё описание ↓","Свернуть описание ↑"],lv:["Rādīt visu aprakstu ↓","Sakļaut aprakstu ↑"],ee:["Näita kogu kirjeldust ↓","Ahenda kirjeldus ↑"],pl:["Pokaż cały opis ↓","Zwiń opis ↑"]}[LG];
var open=false;b.style.maxHeight="640px";b.style.overflow="hidden";b.style.position="relative";var fd=document.createElement("div");fd.style.cssText="position:absolute;left:0;right:0;bottom:0;height:90px;background:linear-gradient(rgba(255,255,255,0),#fff);pointer-events:none";b.appendChild(fd);
var m=document.createElement("a");m.id="els-dmore";m.href="javascript:;";m.textContent=T[0];m.style.cssText="display:block;margin:8px auto 14px;width:max-content;padding:8px 16px;border:2px solid #0284c7;border-radius:6px;color:#0369a1;font:700 14px Arial,sans-serif;text-decoration:none;background:#fff";
m.onclick=function(){open=!open;b.style.maxHeight=open?"none":"640px";fd.style.display=open?"none":"block";m.textContent=T[open?1:0];if(!open)di.scrollIntoView({block:"start"})};b.parentNode.insertBefore(m,b.nextSibling)}}catch(e){console.warn("ELS aprasymas",e)}}
if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",run);else run()})();
/* ELS: komplektų kortelės v2 (2 stulpeliai, nuotraukos, bendra kaina) – 2026-11-17 */
(function(){function run(){try{var ks=document.querySelectorAll(".els-kmp:not([data-kx])");if(!ks.length)return;
var L=(location.pathname.match(/^\/(en|ru|lv|ee|pl)\//)||[0,"lt"])[1];
var T={lt:["Komplekto kaina:","Į krepšelį visą komplektą","Dedama…","✓ Įdėta {a} iš {b} prekių","Kainos su PVM imamos iš e-parduotuvės realiu laiku. Komplektą krepšelyje galima koreguoti.","vnt."],
en:["Set price:","Add the whole set to cart","Adding…","✓ Added {a} of {b} items","Prices incl. VAT are taken live from the e-shop. You can adjust the set in the cart.","pcs"],
ru:["Цена комплекта:","Весь комплект в корзину","Добавляем…","✓ Добавлено {a} из {b} товаров","Цены с НДС берутся из магазина в реальном времени. Комплект можно изменить в корзине.","шт."],
lv:["Komplekta cena:","Visu komplektu grozā","Pievieno…","✓ Pievienoti {a} no {b} produktiem","Cenas ar PVN tiek ņemtas no e-veikala reāllaikā. Komplektu grozā var mainīt.","gab."],
ee:["Komplekti hind:","Kogu komplekt ostukorvi","Lisatakse…","✓ Lisatud {a}/{b} toodet","Hinnad koos KM-ga võetakse e-poest reaalajas. Komplekti saab ostukorvis muuta.","tk"],
pl:["Cena zestawu:","Cały zestaw do koszyka","Dodawanie…","✓ Dodano {a} z {b} produktów","Ceny z VAT pobierane są ze sklepu na bieżąco. Zestaw można zmienić w koszyku.","szt."]}[L];
if(!document.getElementById("els-kx-css")){var st=document.createElement("style");st.id="els-kx-css";st.textContent=".els-kmp-n{display:none!important}.els-kmp-w>h3{font:700 22px/1.3 Arial,Helvetica,sans-serif;color:#0f172a;margin:26px 0 12px}.els-kmp-g{grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr))!important;gap:16px!important}.els-kx{border:1px solid #cbd5e1;border-radius:10px;background:#fff;display:flex;flex-direction:column;font-family:Arial,Helvetica,sans-serif;color:#0f172a;overflow:hidden}.els-kx .kx-h{display:flex;gap:14px;align-items:flex-start;padding:14px 14px 10px}.els-kx .kx-ic{flex:none;width:64px;height:56px;border-radius:8px;background:#e0f2fe;display:flex;align-items:center;justify-content:center}.els-kx .kx-t{font-size:18px;font-weight:700;line-height:1.25;margin:2px 0 4px}.els-kx .kx-d{font-size:13px;color:#475569;line-height:1.4}.els-kx .kx-rs{padding:0 14px;flex:1}.els-kx .kx-r{display:flex;gap:12px;align-items:center;padding:8px 0;border-top:1px solid #e2e8f0;text-decoration:none!important;color:inherit}.els-kx .kx-r:hover .kx-n b{color:#0369a1}.els-kx .kx-im{flex:none;width:44px;height:44px;object-fit:contain;background:#fff}.els-kx .kx-n{flex:1;min-width:0;font-size:13px;line-height:1.3}.els-kx .kx-n b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:700;color:#0f172a}.els-kx .kx-n small{display:block;color:#64748b;font-size:12px;margin-top:2px}.els-kx .kx-p{white-space:nowrap;font-size:14px;font-weight:700;color:#0f172a}.els-kx .kx-tot{display:flex;justify-content:space-between;align-items:center;margin:0 14px;padding:10px 0 4px;border-top:1px solid #e2e8f0;font-size:15px;font-weight:700}.els-kx .kx-tot b{font-size:26px;color:#0284c7}.els-kx .kx-no{margin:0 14px;font-size:11px;color:#94a3b8}.els-kx .kx-b{margin:10px 14px 14px;padding:12px;border:0;border-radius:6px;background:#0284c7;color:#fff;font:700 15px Arial,sans-serif;cursor:pointer}.els-kx .kx-b:hover{background:#0369a1}.els-kx .kx-b.ok{background:#0b4f8a}.els-kx .kx-b:disabled{opacity:.7;cursor:wait}";document.head.appendChild(st)}
var IC={pv:'