
/* ============================
   🌿 إخفاء عدد العناصر
============================ */
.category-count {
  display: none !important;
}

/* ============================
   🌿 تنسيق الحاوية — ترتيب 4 صور جنب بعض
============================ */
ul.products {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 10px !important; /* 🔹 مسافة صغيرة بين الصور */
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 1200px; /* 🔹 لتحديد عرض الحاوية */
}

/* ============================
   🌿 العنصر الواحد (المربع + الصورة)
============================ */
.category,
.product-category {
  position: relative !important;
  overflow: hidden;
  border-radius: 10px;
  display: flex !important;
  justify-content: center;
  align-items: center;
  background: none !important;
  box-shadow: none !important;
  width: 23%; /* 🔹 يجعل الأربع صور جنب بعض */
  min-width: 200px;
}

/* ============================
   🌿 إعدادات الصورة
============================ */
.category a img,
.product-category a img {
  display: block;
  width: 100%; /* 🔹 تماثل الحجم */
  height: auto;
  border-radius: 10px;
  transition: transform 0.5s ease, filter 0.5s ease;
  background: none !important;
}

/* ============================
   🌿 المربع الأبيض والنص بداخله
============================ */
.category .category-overlay,
.product-category .category-overlay {
  position: absolute !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  text-align: center;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 110px;
  transition: all 0.4s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

/* ============================
   🌿 النص داخل المربع
============================ */
.category .category-title,
.product-category .category-title {
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  margin: 0;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

/* ============================
   🌿 تأثير hover — يتحول للأخضر
============================ */
.category:hover img,
.product-category:hover img {
  transform: scale(1.03);
  filter: brightness(1.05) contrast(1.05);
}

.category:hover .category-overlay,
.product-category:hover .category-overlay {
  background: rgba(54, 121, 65, 0.2);
  border-color: #367941;
  box-shadow: 0 0 10px rgba(54, 121, 65, 0.5);
}

.category:hover .category-title,
.product-category:hover .category-title {
  color: #367941 !important;
  text-shadow: none;
}

/* ============================
   🌿 حجم أصغر للموبايل
============================ */
@media (max-width: 767px) {
  ul.products {
    gap: 8px !important;
  }

  .category,
  .product-category {
    width: 45%;
  }

  .category-overlay,
  .product-category .category-overlay {
    width: 120px;
    height: 85px;
  }

  .category-title {
    font-size: 10px !important;
  }
}
.category a,
.product-category a {
  position: relative !important; /* 🔹 يخلي الصورة هي المرجع للتمركز */
  display: inline-block;
}

.category .category-overlay,
.product-category .category-overlay {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* ============================
   🌿 حذف أي خلفية زرقاء من الثيم بدون حذف المربع الأبيض
============================ */

/* منع أي تأثير hover أو خلفية على الرابط أو الحاويات */
.category a,
.product-category a,
.category a:hover,
.product-category a:hover,
.category a:focus,
.product-category a:focus,
.category a:active,
.product-category a:active {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
  text-decoration: none !important;
}

/* منع الخلفية الزرقاء اللي بيضيفها الثيم حول الصورة */
.category,
.product-category,
.category a img,
.product-category a img {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* إزالة أي pseudo-element بيضيف لون أو ظل */
.category::before,
.category::after,
.product-category::before,
.product-category::after,
.category a::before,
.category a::after,
.product-category a::before,
.product-category a::after {
  content: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* المربع الأبيض يظل ظاهر بدون تأثير */
.category .category-overlay,
.product-category .category-overlay {
  background: rgba(255, 255, 255, 0.25) !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6) !important;
}

