(function () {
  function addStyle() {
    if (document.getElementById("ax-force-dark-style")) return;

    const style = document.createElement("style");
    style.id = "ax-force-dark-style";
    style.innerHTML = `
      body, main, section, div, article {
        background-color: #070711 !important;
      }

      .s-product-card-entry,
      .s-product-card-content,
      .s-product-card-content-main,
      .s-product-card-content-sub,
      .product-card,
      [class*="product-card"],
      [class*="product"] {
        background: #0d0d1c !important;
        color: #fff !important;
        border-color: rgba(168,85,247,.45) !important;
      }

      .s-product-card-entry *,
      [class*="product-card"] *,
      [class*="product"] * {
        color: #fff !important;
      }

      .s-product-card-price,
      .price,
      [class*="price"] {
        color: #a855f7 !important;
        font-weight: 800 !important;
      }

      button,
      .s-button-btn,
      [class*="button"],
      [class*="btn"] {
        background: linear-gradient(135deg,#7c3aed,#a855f7) !important;
        color: #fff !important;
        border: 1px solid rgba(255,255,255,.15) !important;
      }

      input,
      textarea,
      select {
        background: #0b0b18 !important;
        color: #fff !important;
        border: 1px solid rgba(168,85,247,.45) !important;
      }

      input::placeholder {
        color: #9ca3af !important;
      }

      /* الفاتورة / الطلب */
      [class*="order"],
      [class*="invoice"],
      [class*="payment"],
      [class*="summary"],
      [class*="checkout"],
      [class*="cart"] {
        background: #0d0d1c !important;
        color: #fff !important;
      }

      [class*="order"] *,
      [class*="invoice"] *,
      [class*="payment"] *,
      [class*="summary"] *,
      [class*="checkout"] *,
      [class*="cart"] * {
        color: #fff !important;
      }

      .card,
      .box,
      .panel,
      .bg-white,
      [class*="bg-white"] {
        background: #111122 !important;
        color: #fff !important;
        border: 1px solid rgba(168,85,247,.35) !important;
      }

      .fa-star,
      [class*="star"],
      svg {
        color: #a855f7 !important;
        fill: #a855f7 !important;
      }
    `;
    document.head.appendChild(style);
  }

  function forceFix() {
    addStyle();

    document.querySelectorAll("*").forEach(function (el) {
      const bg = getComputedStyle(el).backgroundColor;

      if (
        bg === "rgb(255, 255, 255)" ||
        bg === "rgba(255, 255, 255, 1)" ||
        bg === "rgb(248, 250, 252)" ||
        bg === "rgb(249, 250, 251)"
      ) {
        el.style.setProperty("background", "#111122", "important");
        el.style.setProperty("color", "#ffffff", "important");
        el.style.setProperty("border-color", "rgba(168,85,247,.35)", "important");
      }
    });
  }

  document.addEventListener("DOMContentLoaded", forceFix);
  window.addEventListener("load", forceFix);

  setInterval(forceFix, 700);
})();
/* إصلاح الخلفية البيضاء بين المنتجات */
section,
.section,
.container,
.s-block,
.s-block--default,
.s-block__content {
  background: #070711 !important;
}

/* تحديد سكشن المنتجات تحديدًا */
.s-products,
.s-products-slider,
.products,
.products-list {
  background: #070711 !important;
}

/* الفراغ بين الكروت */
.s-block + .s-block {
  background: #070711 !important;
}

/* إزالة أي خلفية بيضاء */
.bg-white,
[style*="background: #fff"],
[style*="background-color: #fff"] {
  background: #070711 !important;
}