﻿style>.product-categories-header-slim,.product-categories-header-slim-title{font-size:.9375rem;line-height:1.35}.product-categories-header-slim-count{font-size:.75rem}style><meta name="viewport" content="width=device-width, initial-scale=1"> <!-- jo-trust-badges P0-5 liquids-only + decl-map-4 start --> <style> .jo-trust-strip{--jo-blue:#3e52b8;--jo-ink:#26345e;--jo-line:#dfe4f4;--jo-bg:#f7f8fd;box-sizing:border-box;width:100%;padding:14px 18px;background:var(--jo-bg);border:1px solid var(--jo-line);border-radius:12px;font-family:inherit;color:var(--jo-ink)}.jo-trust-strip__inner{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;max-width:1180px;margin:0 auto}.jo-trust-strip__item{display:flex;align-items:center;gap:9px;min-width:0;padding:8px 10px;border-radius:9px;background:#fff;text-decoration:none;color:inherit;line-height:1.22}.jo-trust-strip__item--link{cursor:pointer;transition:box-shadow .15s ease}.jo-trust-strip__item--link:hover{box-shadow:0 2px 10px rgba(62,82,184,.12)}.jo-trust-strip__icon{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:var(--jo-blue);color:#fff;font-size:14px;font-weight:700;overflow:hidden}.jo-trust-strip__icon img,.jo-trust-strip__icon svg{width:18px;height:18px;display:block}.jo-trust-strip__text{font-size:13px;font-weight:600}.jo-trust-strip__text small{display:block;margin-top:2px;font-size:11px;font-weight:400;color:#6f7899}.jo-trust-strip--pdp{margin:16px 0 18px;max-width:420px}.jo-trust-strip--pdp .jo-trust-strip__inner{grid-template-columns:1fr}.jo-trust-strip--home{margin:22px auto 28px;max-width:1240px}@media(max-width:900px){.jo-trust-strip--home .jo-trust-strip__inner{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:560px){.jo-trust-strip{padding:10px 9px;border-radius:10px}.jo-trust-strip--home .jo-trust-strip__inner{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.jo-trust-strip__item{padding:8px 7px;gap:7px}.jo-trust-strip__icon{flex-basis:24px;width:24px;height:24px;font-size:12px}.jo-trust-strip__icon img,.jo-trust-strip__icon svg{width:15px;height:15px}.jo-trust-strip__text{font-size:11px}.jo-trust-strip__text small{font-size:10px}.jo-trust-strip--home{margin:14px 0 20px}.jo-trust-strip--pdp{margin:12px 0 14px}}style><script> (function(){var CZ = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgYXJpYS1oaWRkZW49InRydWUiPjxnIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSI0LjIiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiPjxwYXRoIGQ9Ik0xNCAyNCBWMTQgSDI0Ii8+PHBhdGggZD0iTTQwIDE0IEg1MCBWMjQiLz48cGF0aCBkPSJNNTAgNDAgVjUwIEg0MCIvPjxwYXRoIGQ9Ik0yNCA1MCBIMTQgVjQwIi8+PC9nPjxwYXRoIGQ9Ik0yMCAzMyBMMjguNSA0MS41IEw0NiAyMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==";var HOME_ITEMS =[{"kind":"text","icon":"✓","title":"Оригинал","sub":"японский импорт"},{"kind":"cznak","title":"Честный ЗНАК","sub":"для масел"},{"kind":"text","icon":"↗","title":"Доставка","sub":"СДЭК + Яндекс Доставка"},{"kind":"text","icon":"₽","title":"Оплата СБП","sub":"быстро и безопасно"},{"kind":"text","icon":"VIN","title":"Поможем подобрать","sub":"по номеру кузова","href":"https://t.me/japanoils"}];var PDP_ITEMS =[{"kind":"cznak","title":"Честный ЗНАК","sub":"для масел"}];var DECL_TITLE = "Декларация о соответствии требованиям технического регламента Евразийского экономического союза (технического регламента Таможенного союза)";var DECL_BY_ART ={"08886-81875":"https://pub.fsa.gov.ru/rds/declaration/view/21558828/common","08880-84132":"https://pub.fsa.gov.ru/rds/declaration/view/21558828/common","830077277":"https://pub.fsa.gov.ru/rds/declaration/view/19623027/common","MZ321232":"https://pub.fsa.gov.ru/rds/declaration/view/21059184/common","20016":"https://pub.fsa.gov.ru/rds/declaration/view/20474099/common","KLAPE-05304":"https://pub.fsa.gov.ru/rds/declaration/view/20474099/common"};function normArt(s){return String(s || "").trim().toUpperCase().replace(/\s+/g,"").replace(/\u00a0/g,"");}function findProductArt(){var i,t,m,el,nodes;nodes = document.querySelectorAll(".details-row, .product-details, .details-param, [itemprop=\"sku\"], .sku, .details-sku");for(i = 0;i < nodes.length;i++){t =(nodes[i].textContent || "").replace(/\s+/g," ");m = t.match(/Артикул\s*[:№]?\s*([A-Za-z0-9\/\-_]+)/i);if(m)return m[1];}t =(document.body && document.body.innerText)|| "";m = t.match(/Артикул\s*[:№]?\s*([A-Za-z0-9\/\-_]+)/i);if(m)return m[1];el = document.querySelector("[itemprop=\"sku\"]");if(el)return(el.getAttribute("content")|| el.textContent || "").trim();var path =(location.pathname || "").toLowerCase();var arts = Object.keys(DECL_BY_ART);for(i = 0;i < arts.length;i++){if(path.indexOf(arts[i].toLowerCase())!== -1)return arts[i];}return "";}function pdpItemsWithDecl(){var items = PDP_ITEMS.slice();var art = normArt(findProductArt());var url = "";var k;for(k in DECL_BY_ART){if(DECL_BY_ART.hasOwnProperty(k)&& normArt(k)=== art){url = DECL_BY_ART[k];break;}}if(!url && art){for(k in DECL_BY_ART){if(DECL_BY_ART.hasOwnProperty(k)&& normArt(k)=== art){url = DECL_BY_ART[k];break;}}}if(url){items.push({kind:"text",icon:"PDF",title:"Декларация ТР ТС",sub:"открыть документ",href:url,titleAttr:DECL_TITLE});}return items;}function makeItem(it){var el;if(it.href){el = document.createElement('a');el.href = it.href;el.target = '_blank';el.rel = 'noopener noreferrer';el.className = 'jo-trust-strip__item jo-trust-strip__item--link';if(it.titleAttr)el.title = it.titleAttr;}else{el = document.createElement('div');el.className = 'jo-trust-strip__item';}var icon = document.createElement('span');icon.className = 'jo-trust-strip__icon';if(it.kind === 'cznak'){var img = document.createElement('img');img.src = CZ;img.alt = '';icon.appendChild(img);}else{icon.textContent = it.icon;}var text = document.createElement('span');text.className = 'jo-trust-strip__text';text.appendChild(document.createTextNode(it.title));var small = document.createElement('small');small.textContent = it.sub;text.appendChild(small);el.appendChild(icon);el.appendChild(text);return el;}function build(mod,items){var root = document.createElement('div');root.className = 'jo-trust-strip jo-trust-strip--' + mod;root.setAttribute('aria-label','Покупайте с уверенностью');var inner = document.createElement('div');inner.className = 'jo-trust-strip__inner';for(var i = 0;i < items.length;i++)inner.appendChild(makeItem(items[i]));root.appendChild(inner);return root;}function pathName(){var p = location.pathname || '/';if(p.length > 1 && p.charAt(p.length - 1)=== '/')p = p.slice(0,-1);return p || '/';}function isProductPage(){return(location.pathname || '').indexOf('/products/')=== 0;}function isLiquidProduct(){var path =(location.pathname || '').toLowerCase();if(path.indexOf('filtr')!== -1)return false;if(path.indexOf('aromat')!== -1)return false;if(path.indexOf('eikosha')!== -1)return false;if(path.indexOf('svech')!== -1)return false;if(path.indexOf('lzkar')!== -1)return false;if(path.indexOf('denso')!== -1)return false;if(path.indexOf('/products/')=== 0 && path.indexOf('ngk')!== -1)return false;if(path.indexOf('molygreen')!== -1)return true;if(path.indexOf('gigas')!== -1)return true;if(path.indexOf('coolant')!== -1)return true;if(path.indexOf('antifriz')!== -1)return true;if(path.indexOf('0w-')!== -1)return true;if(path.indexOf('5w-')!== -1)return true;if(path.indexOf('10w-')!== -1)return true;if(path.indexOf('atf')!== -1)return true;if(path.indexOf('cvt')!== -1)return true;if(path.indexOf('maslo')!== -1)return true;if(path.indexOf('tcl-')!== -1)return true;if(path.indexOf('seiken')!== -1)return true;if(path.indexOf('mazda')!== -1)return true;if(path.indexOf('mitsubishi')!== -1)return true;if(path.indexOf('toyota')!== -1)return true;if(path.indexOf('honda')!== -1)return true;if(path.indexOf('profix')!== -1)return true;if(path.indexOf('nissan')!== -1)return true;var nodes = document.querySelectorAll('a[href*="/categories/"]');var i,href,hasDeny = false,hasAllow = false;for(i = 0;i < nodes.length;i++){href =(nodes[i].getAttribute('href')|| '').toLowerCase();if(href.indexOf('filtr')!== -1 || href.indexOf('aromatizator')!== -1 || href.indexOf('eikosha')!== -1 || href.indexOf('svech')!== -1 || href.indexOf('/categories/ngk')!== -1)hasDeny = true;if(href.indexOf('motornye')!== -1 || href.indexOf('molygreen')!== -1 || href.indexOf('transmission')!== -1 || href.indexOf('antifriz')!== -1 || href.indexOf('gigas')!== -1 || href.indexOf('/categories/tcl')!== -1 || href.indexOf('/categories/toyota')!== -1 || href.indexOf('/categories/nissan')!== -1 || href.indexOf('/categories/honda')!== -1 || href.indexOf('seiken')!== -1 || href.indexOf('mazda')!== -1 || href.indexOf('mitsubishi')!== -1 || href.indexOf('profix')!== -1)hasAllow = true;}if(hasAllow)return true;if(hasDeny)return false;return false;}function placeHome(){if(document.querySelector('.jo-trust-strip'))return true;var a = document.querySelector('.slider-main-block');if(!a || !a.parentNode)return false;a.parentNode.insertBefore(build('home',HOME_ITEMS),a.nextSibling);return true;}function placePdp(){if(document.querySelector('.jo-trust-strip'))return true;var payReady = document.querySelector('.details-row.details-payment, .details-payment-cell .cart-add-container, .cart-add.btn-confirm');if(!payReady)return false;if(!isLiquidProduct())return true;var pay = document.querySelector('.details-row.details-payment');if(pay && pay.parentNode){pay.parentNode.insertBefore(build('pdp',pdpItemsWithDecl()),pay.nextSibling);return true;}var cart = document.querySelector('.details-payment-cell .cart-add-container, .cart-add.btn-confirm');if(cart){var row = cart.closest ?(cart.closest('.details-row')|| cart.closest('.details-payment-cell')):null;row = row || cart.parentElement;if(row && row.parentNode){row.parentNode.insertBefore(build('pdp',pdpItemsWithDecl()),row.nextSibling);return true;}}return false;}function poll(fn,max){if(fn())return;var n = 0;var t = setInterval(function(){n += 1;if(fn()|| n >= max)clearInterval(t);},250);}function run(){if(pathName()=== '/')poll(placeHome,20);else if(isProductPage())poll(placePdp,40);}if(document.readyState === 'loading')document.addEventListener('DOMContentLoaded',run);else run();})();script><!-- jo-trust-badges P0-5 liquids-only + decl-map-4 end --> <!-- jo-tg-cta-pdp P0 start --> <style> .jo-tg-cta{--jo-blue:#3e52b8;--jo-ink:#26345e;--jo-line:#dfe4f4;--jo-bg:#f7f8fd;box-sizing:border-box;width:100%;max-width:420px;margin:0 0 14px;padding:12px 14px;background:var(--jo-bg);border:1px solid var(--jo-line);border-radius:10px;font-family:inherit;color:var(--jo-ink)}.jo-tg-cta__ask{margin:0 0 8px;font-size:13px;font-weight:600;line-height:1.35;color:var(--jo-ink)}.jo-tg-cta__link{display:inline-flex;align-items:center;gap:7px;color:var(--jo-blue);text-decoration:none;font-size:14px;font-weight:700;line-height:1.25;border-bottom:1px solid rgba(62,82,184,.35);padding-bottom:1px}.jo-tg-cta__link:hover{color:#2f3f96;border-bottom-color:#2f3f96}.jo-tg-cta__link svg{width:15px;height:15px;flex:0 0 auto;display:block}.jo-tg-cta__note{margin:8px 0 0;font-size:12px;font-weight:500;color:#6f7899;line-height:1.35}.jo-tg-cta__note b{color:var(--jo-ink);font-weight:700}@media(max-width:560px){.jo-tg-cta{padding:10px 12px;border-radius:9px;margin-bottom:12px}}style><script> (function(){var TG = 'https://t.me/japanoils';function isProductPage(){return(location.pathname || '').indexOf('/products/')=== 0;}function build(){var root = document.createElement('div');root.className = 'jo-tg-cta';root.setAttribute('aria-label','Вопрос по допуску — Telegram');var ask = document.createElement('p');ask.className = 'jo-tg-cta__ask';ask.textContent = 'Есть вопрос по допуску или подбору?';var link = document.createElement('a');link.className = 'jo-tg-cta__link';link.href = TG;link.target = '_blank';link.rel = 'noopener noreferrer';var svg = document.createElementNS('http://www.w3.org/2000/svg','svg');svg.setAttribute('viewBox','0 0 24 24');svg.setAttribute('aria-hidden','true');var path = document.createElementNS('http://www.w3.org/2000/svg','path');path.setAttribute('fill','#3e52b8');path.setAttribute('d','M21.8 4.2c.4-.2.8.1.7.6L19 19.6c-.1.4-.5.6-.9.4l-5-2.4-2.7 2.6c-.3.3-.8.1-.9-.3l-.5-4.4 9.1-8.2c.2-.2 0-.5-.2-.4L6.7 13.4 2.5 12c-.5-.2-.5-.8.1-1L21.8 4.2z');svg.appendChild(path);link.appendChild(svg);link.appendChild(document.createTextNode('Написать в Telegram'));var note = document.createElement('p');note.className = 'jo-tg-cta__note';note.appendChild(document.createTextNode('Подписчикам Telegram — '));var b = document.createElement('b');b.textContent = 'скидка 5%';note.appendChild(b);note.appendChild(document.createTextNode(' на первый заказ'));root.appendChild(ask);root.appendChild(link);root.appendChild(note);return root;}function place(){if(document.querySelector('.jo-tg-cta'))return true;var strip = document.querySelector('.jo-trust-strip');if(strip && strip.parentNode){strip.parentNode.insertBefore(build(),strip);return true;}var pay = document.querySelector('.details-row.details-payment');if(pay && pay.parentNode){pay.parentNode.insertBefore(build(),pay.nextSibling);return true;}var cart = document.querySelector('.details-payment-cell .cart-add-container, .cart-add.btn-confirm');if(cart){var row = cart.closest ?(cart.closest('.details-row')|| cart.closest('.details-payment-cell')):null;row = row || cart.parentElement;if(row && row.parentNode){row.parentNode.insertBefore(build(),row.nextSibling);return true;}}return false;}function poll(fn,max){if(fn())return;var n = 0;var t = setInterval(function(){n += 1;if(fn()|| n >= max)clearInterval(t);},250);}function run(){if(!isProductPage())return;poll(place,40);}if(document.readyState === 'loading')document.addEventListener('DOMContentLoaded',run);else run();})();script><!-- jo-tg-cta-pdp P0 end --> <!-- jo-delivery-city-fix start --> <script> (function(){var ACCUSATIVE ={'Москва':'Москву','Санкт-Петербург':'Санкт-Петербург','СПб':'СПб','Новосибирск':'Новосибирск','Екатеринбург':'Екатеринбург','Казань':'Казань','Нижний Новгород':'Нижний Новгород','Самара':'Самару','Омск':'Омск','Челябинск':'Челябинск','Ростов-на-Дону':'Ростов-на-Дону','Уфа':'Уфу','Красноярск':'Красноярск','Воронеж':'Воронеж','Пермь':'Пермь','Волгоград':'Волгоград','Краснодар':'Краснодар','Токио':'Москву','Tokyo':'Москву'};var FOREIGN = /^(токио|tokyo|osaka|osaka|new york|london|berlin|paris)$/i;function toAccusative(city){if(!city)return 'Москву';var t = city.replace(/\s+/g,' ').trim();if(FOREIGN.test(t)|| ACCUSATIVE[t]=== 'Москву' && /токио|tokyo/i.test(t))return 'Москву';if(ACCUSATIVE.hasOwnProperty(t))return ACCUSATIVE[t];if(/а$/i.test(t)&& !/ая$/i.test(t))return t.slice(0,-1)+ 'у';if(/я$/i.test(t))return t.slice(0,-1)+ 'ю';return t;}function rewriteText(node){if(!node || node.nodeType !== 3)return;var s = node.nodeValue;if(!s || s.indexOf('Доставка')=== -1)return;var m = s.match(/Доставка\s+в\s+([^\n\r<(]+)/i);if(!m)return;var raw = m[1].replace(/\s+/g,' ').trim();var fixed = toAccusative(raw);if(fixed === raw && !FOREIGN.test(raw)&& raw !== 'Москва')return;node.nodeValue = s.replace(m[0],'Доставка в ' + fixed);}function walk(root){if(!root)return;var w = document.createTreeWalker(root,NodeFilter.SHOW_TEXT,null);var n;while((n = w.nextNode()))rewriteText(n);}function fixCityPickerLinks(){var nodes = document.querySelectorAll('a, span, button, div');for(var i = 0;i < nodes.length;i++){var el = nodes[i];if(!el.childNodes || el.childNodes.length !== 1)continue;var t =(el.textContent || '').trim();if(/^Токио$|^Tokyo$/i.test(t)){el.textContent = 'Москва';}}}function run(){walk(document.body);fixCityPickerLinks();}if(document.readyState === 'loading')document.addEventListener('DOMContentLoaded',run);else run();setInterval(run,800);try{var mo = new MutationObserver(function(){run();});mo.observe(document.documentElement,{childList:true,subtree:true,characterData:true});}catch(e){}})();</script> <!-- jo-delivery-city-fix end --> <!-- jo-jsonld-product start --> <script>(function(){if((location.pathname || '').indexOf('/products/')!== 0)return;if(document.getElementById('jo-jsonld-product'))return;function text(sel){var el = document.querySelector(sel);return el ?(el.textContent || '').replace(/\s+/g,' ').trim():'';}function meta(name){var el = document.querySelector('meta[name="' + name + '"], meta[property="' + name + '"]');return el ?(el.getAttribute('content')|| '').trim():'';}function absUrl(../userfiles/u){if(!u)return '';try{return new location.origin).href;}catch(e){return u;}}function parsePrice(s){if(!s)return null;var n = s.replace(/[^\d,\\2e]/g,'').replace(/\s/g,'').replace(',','.');var v = parseFloat(n);return isFinite(v)? v :null;}function build(){var name = text('h1')|| meta('og:title')|| document.title;if(!name)return null;var image = meta('og:image');var description = meta('Description')|| meta('og:description')|| '';var sku = '';var brand = '';var rows = document.querySelectorAll('.properties-table tr, .product-properties tr, .details-row, [itemprop="brand"], .brand-name');for(var i = 0;i < rows.length;i++){var rowText =(rows[i].textContent || '').replace(/\s+/g,' ').trim();var mArt = rowText.match(/Артикул[:\s]+([^\s]+)/i);if(mArt && !sku)sku = mArt[1];var mBrand = rowText.match(/Производитель[:\s]+(.+)$/i);if(mBrand && !brand)brand = mBrand[1].trim();}var brandEl = document.querySelector('[itemprop="brand"], .brand a, a[href*="/manufacturers/"]');if(!brand && brandEl)brand =(brandEl.textContent || '').trim();var priceText = text('.price, .details-price, [itemprop="price"], .product-price, .price-number');if(!priceText){var body = document.body ? document.body.innerText :'';var pm = body.match(/([\d\s]+)\s*руб/i);if(pm)priceText = pm[1];}var price = parsePrice(priceText);var stockText =(document.body ? document.body.innerText :'').toLowerCase();var inStock = /есть в наличии|в наличии/.test(stockText)&& !/нет в наличии|под заказ/.test(stockText.split('есть в наличии')[0].slice(-40)+ '');if(/нет в наличии/.test(stockText)&& !/есть в наличии/.test(stockText))inStock = false;if(/есть в наличии/.test(stockText))inStock = true;var product ={'@context':'https://schema.org','@type':'Product','name':name,'url':location.href.split('#')[0],'description':description};if(image)product.image =[absUrl(../userfiles/image)];if(sku){product.sku = sku;product.mpn = sku;}if(brand)product.brand ={'@type':'Brand','name':brand};if(price != null){product.offers ={'@type':'Offer','url':location.href.split('#')[0],'priceCurrency':'RUB','price':String(price),'availability':inStock ? 'https://schema.org/InStock' :'https://schema.org/OutOfStock','itemCondition':'https://schema.org/NewCondition'};}var crumbs =[];var crumbLinks = document.querySelectorAll('.bread-crumbs a, .breadcrumb a, .breadcrumbs a, nav.bread a');for(var c = 0;c < crumbLinks.length;c++){var a = crumbLinks[c];var cn =(a.textContent || '').replace(/\s+/g,' ').trim();if(!cn)continue;crumbs.push({'@type':'ListItem','position':crumbs.length + 1,'name':cn,'item':absUrl(../userfiles/a.getAttribute('href')|| '')});}if(crumbs.length){crumbs.push({'@type':'ListItem','position':crumbs.length + 1,'name':name,'item':location.href.split('#')[0]});}var graph =[product];if(crumbs.length > 1){graph.push({'@context':'https://schema.org','@type':'BreadcrumbList','itemListElement':crumbs});}return graph.length === 1 ? product :{'@context':'https://schema.org','@graph':graph};}function inject(){if(document.getElementById('jo-jsonld-product'))return true;var data = build();if(!data || !data.name && !(data['@graph']&& data['@graph'][0]&& data['@graph'][0].name)){return false;}var s = document.createElement('script');s.type = 'application/ld+json';s.id = 'jo-jsonld-product';s.text = JSON.stringify(data);document.head.appendChild(s);return true;}function poll(){if(inject())return;var n = 0;var t = setInterval(function(){n += 1;if(inject()|| n >= 40)clearInterval(t);},250);}if(document.readyState === 'loading')document.addEventListener('DOMContentLoaded',poll);else poll();})();</script> <!-- jo-jsonld-product end --> <!-- jo-yandex-rating-badge --> <style id="jo-yandex-badge-mobile-organic"> @media(max-width:767px){#jo-yandex-rating-badge.jo-yandex-rating-badge{position:relative!important;right:auto!important;top:auto!important;display:block!important;width:150px!important;height:50px!important;max-width:100%;margin-top:10px!important;margin-right:0!important;margin-bottom:14px!important;margin-left:0!important;padding:0!important;overflow:hidden!important;line-height:0!important;clear:both!important;float:none!important;}#jo-yandex-rating-badge.jo-yandex-rating-badge iframe{transform:none!important;transform-origin:top left!important;width:150px!important;height:50px!important;display:block!important;border:0!important;}}</style> <script>(function(){try{var late = false;function isMobile(){return window.matchMedia('(max-width: 767px)').matches;}function flushLeftToViewport(el){try{el.style.setProperty('left','0px','important');var left = el.getBoundingClientRect().left;var vw = window.innerWidth || document.documentElement.clientWidth || 0;if(left > .5 && left < vw){el.style.setProperty('left',(-Math.round(left))+ 'px','important');}else if(left < -.5){el.style.setProperty('left','0px','important');}}catch(e){}}function findFooter(){return document.querySelector('footer.site-footer')|| document.querySelector('footer')|| document.querySelector('.site-footer')|| document.querySelector('#footer');}function insertMobile(wrap,footer){var panel = footer.querySelector('.footer-social');if(panel && panel.parentNode){panel.parentNode.insertBefore(wrap,panel.nextSibling);return 'after-footer-social';}if(!late)return 'wait-social';var list = footer.querySelector('.footer-menu-list.social-list');if(list){var col = list.closest('.footer-menu')|| list.closest('[class*="col-"]')|| list.parentElement;if(col && col.parentNode){wrap.style.setProperty('flex','0 0 100%','important');wrap.style.setProperty('max-width','100%','important');col.parentNode.insertBefore(wrap,col.nextSibling);return 'after-social-col';}}var tg = footer.querySelector('.social--telegram, a[href*="t.me/japanoils"]');if(tg){var col2 = tg.closest('.footer-menu')|| tg.closest('[class*="col-"]');if(col2 && col2.parentNode){wrap.style.setProperty('flex','0 0 100%','important');wrap.style.setProperty('max-width','100%','important');col2.parentNode.insertBefore(wrap,col2.nextSibling);return 'after-tg-col';}}var menu = footer.querySelector('.footer-menu');if(menu && menu.parentNode){menu.parentNode.insertBefore(wrap,menu);return 'before-menu';}footer.appendChild(wrap);return 'footer-append';}function isWellPlaced(el,mobile,footer){if(!el || !footer || !footer.contains(el))return false;if(!mobile)return el.dataset.joPos === 'footer-pay-br-v11';if(el.dataset.joPos !== 'footer-organic-m-v13-left')return false;var panel = footer.querySelector('.footer-social');if(panel && el.previousElementSibling === panel)return true;if(!late)return false;var list = footer.querySelector('.footer-menu-list.social-list');if(list){var col = list.closest('.footer-menu')|| list.closest('[class*="col-"]');if(col && el.previousElementSibling === col)return true;}return false;}function place(){var mobile = isMobile();var POS = mobile ? 'footer-organic-m-v13-left' :'footer-pay-br-v11';var footer = findFooter();var old = document.getElementById('jo-yandex-rating-badge');if(old && old.dataset.joPos === POS && isWellPlaced(old,mobile,footer)){if(mobile)flushLeftToViewport(old);return;}if(old)old.remove();if(!footer)return;var SCALE = mobile ? 1 :1.5;var NW = 150,NH = 50;var BW = Math.round(NW * SCALE),BH = Math.round(NH * SCALE);var GAP = 16;var wrap = document.createElement('div');wrap.id = 'jo-yandex-rating-badge';wrap.className = 'jo-yandex-rating-badge';var iframe = document.createElement('iframe');iframe.src = 'https://yandex.ru/sprav/widget/rating-badge/52907114177?type=rating' +(mobile ? '' :'&theme=dark');iframe.width = String(NW);iframe.height = String(NH);iframe.frameBorder = '0';iframe.style.cssText = 'display:block;border:0;width:' + NW + 'px;height:' + NH + 'px;transform:scale(' + SCALE + ');transform-origin:top left;';iframe.title = 'Рейтинг организации на Яндексе';iframe.loading = 'lazy';wrap.appendChild(iframe);if(mobile){wrap.style.cssText = 'display:block;position:relative;width:' + BW + 'px;height:' + BH + 'px;overflow:hidden;margin:10px 0 14px 0;padding:0;line-height:0;clear:both;';var where = insertMobile(wrap,footer);if(where === 'wait-social'){if(wrap.parentNode)wrap.parentNode.removeChild(wrap);return;}wrap.dataset.joPos = POS;wrap.dataset.joPlace = where;flushLeftToViewport(wrap);requestAnimationFrame(function(){flushLeftToViewport(wrap);});setTimeout(function(){flushLeftToViewport(wrap);},50);setTimeout(function(){flushLeftToViewport(wrap);},400);return;}wrap.dataset.joPos = POS;var payList = footer.querySelector('.footer-payment__list');var payBlock = payList ?(payList.closest('.static-block')|| payList.parentElement):null;var host = footer.querySelector('.footer-bottom-level')|| footer.querySelector('.footer-bottom-level-wrap')|| footer;var viewW = document.documentElement.clientWidth || document.body.clientWidth || window.innerWidth;wrap.style.cssText = 'display:inline-block;width:' + BW + 'px;height:' + BH + 'px;overflow:hidden;margin:0;padding:0;line-height:0;vertical-align:top;flex:0 0 ' + BW + 'px;';if(host){var cs = window.getComputedStyle(host);if(cs.position === 'static')host.style.position = 'relative';if(cs.overflow === 'hidden' || cs.overflowX === 'hidden')host.style.overflow = 'visible';var hr = host.getBoundingClientRect();var topPx = 0;if(payList){var imgs = payList.querySelectorAll('img');if(imgs.length)topPx = Math.max(0,Math.round(imgs[0].getBoundingClientRect().top - hr.top));else topPx = Math.max(0,Math.round(payList.getBoundingClientRect().top - hr.top));}var rightPx = Math.round(hr.right - viewW);wrap.style.cssText = 'position:absolute;right:' + rightPx + 'px;top:' + topPx + 'px;left:auto;z-index:2;display:block;margin:0;padding:0;line-height:0;width:' + BW + 'px;height:' + BH + 'px;overflow:hidden;';host.appendChild(wrap);var badgeLeft = viewW - BW;var target = payList || payBlock;if(target){var parent = target.parentElement || target;var parentRight = parent.getBoundingClientRect().right;var mr = Math.max(0,Math.round(parentRight -(badgeLeft - GAP)));target.style.marginRight = mr + 'px';}return;}if(payList){payList.style.display = 'flex';payList.style.justifyContent = 'flex-end';payList.style.alignItems = 'flex-start';payList.appendChild(wrap);wrap.style.marginLeft = 'auto';return;}footer.appendChild(wrap);}if(document.readyState === 'loading')document.addEventListener('DOMContentLoaded',place);else place();setTimeout(place,800);setTimeout(place,2000);setTimeout(function(){late = true;place();},2800);window.addEventListener('resize',function(){var b = document.getElementById('jo-yandex-rating-badge');if(b)b.dataset.joPos = '';place();});}catch(e){}})();</script>