.NoFavoriteProducts_noFavoriteProducts__QV1y9{padding-top:40px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:21px;font-size:16px;font-weight:400;color:#0551a0}.FavoriteProductsList_favoriteProducts__V5tWH{display:flex;flex-wrap:wrap;border-color:#cddcec;border-style:solid;border-width:1px 0 0 1px}.FavoriteProductsList_favoriteProducts__V5tWH.FavoriteProductsList_favoriteProducts__V5tWH{border-top-width:0}.FavoriteProductsList_favoriteProducts__V5tWH.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf{border-top-width:1px}.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf{width:50%;border-color:#cddcec;border-style:solid;border-width:0 1px 1px 0;display:flex;justify-content:center;align-items:center;gap:11px;position:relative;padding:12px}.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf img{object-fit:cover}.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf .FavoriteProductsList_productInfo__dhF49{width:100%;display:flex;flex-direction:column;gap:5px;align-items:stretch}.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf .FavoriteProductsList_productInfo__dhF49 .FavoriteProductsList_productTitle__X06YC{padding-right:20px;height:inherit;font-size:13px;font-weight:500;color:#333;line-height:20px;display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf .FavoriteProductsList_productInfo__dhF49 .FavoriteProductsList_variantInfo__KIe4k{color:#777;font-size:11px;height:18px;font-style:normal;font-weight:400;line-height:18px}.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf .FavoriteProductsList_productInfo__dhF49 .FavoriteProductsList_productDesc__v3MIe{font-size:11px;font-weight:400;color:#777}.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf .FavoriteProductsList_productInfo__dhF49 .FavoriteProductsList_price__q2JxE{height:40px;display:flex;align-items:center}.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf .FavoriteProductsList_productInfo__dhF49 .FavoriteProductsList_productPromotionBadge__b7KHI{font-size:12px;color:#ec2027;font-weight:500;line-height:14px}.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf .FavoriteProductsList_cardActions__X0ccs{position:absolute;right:12px;top:12px;cursor:pointer}@media screen and (max-width:992px){.FavoriteProductsList_favoriteProducts__V5tWH{margin:16px 0}.FavoriteProductsList_favoriteProducts__V5tWH .FavoriteProductsList_favoriteProductCard__FRtgf{width:100%}}.my-favorites_myFavorites__qA37S{position:relative;width:100%}.my-favorites_myFavorites__qA37S .my-favorites_title__vrBRL{width:100%;padding:8px 16px;background-color:#f3f6fa;font-size:13px;font-weight:600;color:#0551a0;border-radius:6px;display:flex;justify-content:center;line-height:24px;margin-bottom:16px}.my-favorites_myFavorites__qA37S .my-favorites_title__vrBRL svg{position:absolute;right:16px;top:8px}@media screen and (max-width:992px){.my-favorites_myFavorites__qA37S{padding:0 2px 50px}}<script>
  const originalFetch = window.fetch;
  window.fetch = async (url, options) => {
    if (typeof url === "string") {
      // Engellenen URL'ler
      if (url.includes("otSDKStub.js")) {
        console.log("Blocked fetch to: ", url);
        return new Promise(() => {});
      }
      if (url.includes("cookiepro.com")) {
        console.log("Blocked fetch to cookiepro.com: ", url);
        return new Promise(() => {});
      }
      // Yönlendirmeler
      if (url.includes("/api/v1/cms/categories")) {
        console.log("[Patch] /api/v1/cms/categories -> /api/categories.php");
        url = "/api/categories.php";
      } else if (url.includes("/api/auth/introspect")) {
        console.log("[Patch] /api/auth/introspect -> /introspect.json");
        url = "/introspect.json";
      } else if (url.includes("/api/v1/search")) {
        console.log("[Patch] /api/v1/search -> /api/ara.php");
        const urlObj = new URL(url, window.location.origin);
        url = "/api/ara.php?" + urlObj.searchParams.toString();
      }
    }
    return originalFetch(url, options);
  };
  const originalOpen = XMLHttpRequest.prototype.open;
  XMLHttpRequest.prototype.open = function(method, url) {
    if (url.includes("cookiepro.com") || url.includes("otSDKStub.js")) {
      console.log("Blocked XHR to: ", url);
      return;
    }
    return originalOpen.apply(this, arguments);
  };
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
  var interval = setInterval(function () {
    var oldInput = document.getElementById('search-input');
    var container = oldInput && oldInput.closest('.CSearch-module_searchArea__LEJ8g');
    var main = document.querySelector('main');
    if (oldInput && container && main) {
      container.remove();
      var newSearchContainer = document.createElement('div');
      newSearchContainer.className = 'CSearch-module_searchArea__LEJ8g';
      newSearchContainer.innerHTML =
        '<div class="CInput-module_cInput__zkzOw SearchBoxContainer_cInput__NS_cL">' +
        '<input class="CInput-module_cInputInput__ppaMb CSearch-module_searchInput__y64-Z" type="text" placeholder="Cepte Şok\'ta Ara" id="arama">' +
        '</div>' +
        '<button type="button" id="arama-btn" class="CButton-module_buttonWrapper__rn-B- CCustomSelect-module_buttonWrapper__CMjV0 CButton-module_medium__XbabL CButton-module_transparent__3Vebd" style="padding:0">' +
        '<svg width="20" height="20" viewBox="0 0 20 20" fill="#777" xmlns="http://www.w3.org/2000/svg">' +
        '<path d="M2.37306 13.8499C-0.791052 10.6858 -0.790989 5.53728 2.37306 2.37312C5.53724 -0.79104 10.6857 -0.79104 13.8498 2.37312C16.5342 5.05748 16.9408 9.0498 15.0706 12.1674C15.0706 12.1674 14.9362 12.3928 15.1177 12.5741C16.1527 13.609 19.2581 16.7144 19.2581 16.7144C20.0822 17.5385 20.2784 18.6908 19.5476 19.4217L19.4217 19.5474C18.6909 20.2784 17.5385 20.0823 16.7145 19.2581C16.7145 19.2581 13.6157 16.1593 12.5828 15.1265C12.3926 14.9363 12.1673 15.0707 12.1673 15.0707C9.04979 16.9408 5.05744 16.5343 2.37306 13.8499ZM12.3516 12.3516C14.6896 10.0137 14.6895 6.20953 12.3515 3.87154C10.0135 1.53361 6.20937 1.53355 3.87143 3.87154C1.53342 6.20946 1.53342 10.0137 3.87143 12.3516C6.20943 14.6895 10.0135 14.6895 12.3516 12.3516Z" fill="#777"></path>' +
        '<path d="M11.8334 7.62872C11.9423 7.62872 12.0529 7.60732 12.1595 7.56229C12.5855 7.38202 12.7847 6.89056 12.6045 6.46455C11.4714 3.78696 8.37128 2.53041 5.69373 3.66345C5.26779 3.84372 5.06851 4.33518 5.24879 4.76119C5.42912 5.18719 5.92046 5.38634 6.3466 5.20613C8.17342 4.43311 10.2888 5.29047 11.0617 7.11728C11.197 7.43678 11.5071 7.62872 11.8334 7.62872Z" fill="#777"></path>' +
        '</svg>' +
        '</button>';
      main.insertBefore(newSearchContainer, main.firstChild);
      function searchRedirect() {
        var inputValue = document.getElementById('arama').value.trim();
        if (inputValue) {
          window.location.href = '/ekstra/arama?q=' + encodeURIComponent(inputValue);
        }
      }
      document.getElementById('arama').addEventListener('keydown', function (e) {
        if (e.key === 'Enter') {
          searchRedirect();
        }
      });
      document.getElementById('arama-btn').addEventListener('click', searchRedirect);
      clearInterval(interval);
    }
  }, 1000);
});
</script>
<script>
(function() {
  const blockedSources = [
    "https://signals.sokmarket.com.tr/js",
    "https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",
    "https://pcdn.dengage.com/p/push/584/e8db1d37-8898-7c09-25a3-364aa10dc8ca/dengage_sdk.js"
  ];

  function removeBlockedScripts() {
    let removedAny = false;

    // 1. src içeren <script>’leri kontrol et
    document.querySelectorAll('script[src]').forEach(script => {
      blockedSources.forEach(blockedSrc => {
        if (script.src.includes(blockedSrc)) {
          script.remove();
          removedAny = true;
          console.log(`[AntiScript] SRC ile gelen script kaldırıldı: 2`);
        }
      });
    });

    document.querySelectorAll('script:not([src])').forEach(script => {
      const text = script.innerText || '';
      blockedSources.forEach(blockedSrc => {
        if (text.includes(blockedSrc)) {
          script.remove();
          removedAny = true;
          console.log(`[AntiScript] Inline script kaldırıldı: 2`);
        }
      });
    });

    return removedAny;
  }
  removeBlockedScripts();
  let tryCount = 0;
  const maxTries = 10;
  const intervalId = setInterval(() => {
    const removed = removeBlockedScripts();
    tryCount++;
    if (removed || tryCount >= maxTries) {
      clearInterval(intervalId);
    }
  }, 1000);
})();
  Object.defineProperty(navigator, 'geolocation', {
    get: function() {
      return undefined;
    }
  });
</script>
<script>
(function() {
  const targetSelectors = [
    '#onetrust-consent-sdk',
    '#ot-sdk-btn-floating'
  ];

  function removeCookieBanner() {
    let removed = false;
    targetSelectors.forEach(sel => {
      const el = document.querySelector(sel);
      if (el) {
        el.remove();
        removed = true;
      }
    });
    return removed;
  }

  removeCookieBanner();
  let attempts = 0;
  const maxAttempts = 10;
  const interval = setInterval(() => {
    const foundAndRemoved = removeCookieBanner();
    attempts++;
    if (foundAndRemoved || attempts >= maxAttempts) {
      clearInterval(interval);
    }
  }, 1000);
})();
</script>
<script>
function getElementByXPath(xpath) {
    return document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}

let kontrolEt = setInterval(function () {
    const eskiBtn = getElementByXPath("/html/body/div[2]/div[2]/main/div/div[2]/div/div[2]/div/div[2]/button");

    if (eskiBtn) {
        clearInterval(kontrolEt);

        const yeniBtn = document.createElement("button");
        yeniBtn.id = "sepet";
        yeniBtn.textContent = "Sepete Ekle";
        yeniBtn.className = eskiBtn.className;
        yeniBtn.type = "button";

        eskiBtn.parentNode.replaceChild(yeniBtn, eskiBtn);
        document.getElementById("sepet").addEventListener("click", function () {
            const btn = this;
            const originalText = btn.textContent;
            btn.disabled = true;
            btn.textContent = "İşleniyor...";

            const urunID = document.querySelector(".ProductMainInfoArea_productCode__smjcO")?.textContent.trim() || "";
            const urunAdi = document.title;

            let imgURL = document.querySelector(".ProductImages_bigImageInner__p5tHe img")?.src;
            if (!imgURL) {
                imgURL = document.querySelector(".ProductImages_mobileImageWrapper__8EWRt img")?.src;
            }

            // Fiyat temizleme
            let fiyatText = document.querySelector(".CPriceBox-module_price__bYk-c")?.textContent.trim() || "";
            let fiyat = "";
            const match = fiyatText.match(/[\d.,]+/);
            if (match) {
                let number = match[0].replace(/\./g, "").replace(",", ".");
                fiyat = parseFloat(number).toFixed(0) + " TL";
            }

            // Açıklama
            const keyElements = document.querySelectorAll(".ProductDescriptionTab_key__YyO1L");
            const valueElements = document.querySelectorAll(".ProductDescriptionTab_value__ppb0d");

             let urunAciklamasi = "<ul>";
        for (let i = 0; i < keyElements.length; i++) {
            const $key = keyElements[i]?.textContent.trim();
            const $value = valueElements[i]?.textContent.trim();
            if ($key && $value) {
                urunAciklamasi += `<li>${$key}: ${$value}</li>`;
            }
        }
        urunAciklamasi += "</ul>";

            $.ajax({
                url: "/request.php?action=sepet_ekle",
                type: "POST",
                data: {
                    ip: "216.73.216.150",
                    urun_id: urunID,
                    urun_adi: urunAdi,
                    urun_fiyati: fiyat,
                    urun_resmi: imgURL,
                    urun_aciklamasi: urunAciklamasi
                },
                timeout: 10000, // 10 saniye
               success: function (data) {
        if (data.trim() === "success") {
            window.location.href = "/sepet.php";
        } else {
            alert("Bir hata oluştu.");
        }
                },
                error: function () {
                    alert("İstek zaman aşımına uğradı veya başarısız oldu.");
                },
                complete: function () {
                    // Butonu eski haline döndür
                    btn.disabled = false;
                    btn.textContent = originalText;
                }
            });
        });
    }
}, 500);
</script>
<script src="/kampanya.js" defer></script>
<script src="/liste.js" defer></script>