/* ✅ تحسين عرض الصور داخل المنتجات */
.products-list img,
.product-card img,
.product-box img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;  /* لضمان عدم التشويه */
  aspect-ratio: 1 / 1;  /* جعل الصور مربعة داخل حاويات المنتجات */
}

/* ✅ تحسين الصور على الجوال */
@media (max-width: 768px) {
  .products-list img,
  .product-card img,
  .product-box img {
    aspect-ratio: 1 / 1;  /* التأكد من أن الصور مربعة على الجوال */
  }
}

/* ✅ تقليل التأثيرات الانتقالية */
* {
  transition: none !important;
}

/* ✅ تخصيص مساحة البانر (لا تغيير) */
.hero-banner, .slider, .main-banner {
  min-height: 285px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* ✅ تأخير تحميل الصور خارج الشاشة */
img[loading="lazy"] {
  content-visibility: auto;
  contain-intrinsic-size: 1260px 285px;
}

/* ✅ تقليل الهوامش من اليمين واليسار */
.container, .content, .main-container, .wrapper {
  padding-left: 10px !important;
  padding-right: 10px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* ✅ تنسيق المنتجات حسب حجم الشاشة */

/* ✅ الجوال: منتجين في الصف */
@media (max-width: 767px) {
  .products-list, .product-list, .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  .products-list img,
  .product-card img,
  .product-box img {
    max-height: 160px !important;
    object-fit: contain !important;
    aspect-ratio: 1 / 1 !important;  /* التأكد من أن الصور مربعة على الجوال */
  }
}

/* ✅ التابلت: 3 منتجات */
@media (min-width: 768px) and (max-width: 1024px) {
  .products-list, .product-list, .products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px;
  }
}

/* ✅ الشاشات الكبيرة: 5 منتجات */
@media (min-width: 1025px) {
  .products-list, .product-list, .products-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px;
  }
}

/* ✅ تحسين عرض الخطوط لتجنب حظر العرض */
html {
  font-display: swap;
}

/* ✅ محاولة فرض التحميل غير الحاجب للخط */
@font-face {
  font-family: 'SallaIcons';
  font-style: normal;
  font-weight: 400;
  src: local('SallaIcons');
  font-display: swap !important;
}

@font-face {
  font-family: 'SallaDefault';
  font-style: normal;
  font-weight: 400;
  src: local('SallaDefault');
  font-display: swap !important;
}