:root {
  --bg-body: #f7f7fb;
  --primary: #dc3545;  ;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Cairo", sans-serif;
  background: var(--bg-body);
}

.btn-primary {
  background: var(--primary) !important;
  border: none;
}

.a-y {
  text-decoration: none;
}
.iti {
    width: 100%;
}

.iti__country-list {
    left: 0;
}
/* ================== pagination start ================= */
.pagination-container {
  text-align: center;
}

.pagination {
  display: inline-block;
  list-style: none;
  padding-left: 0;
}

.pagination .page-item {
  display: inline;
  margin: 0 5px;
}

.pagination .page-link {
  position: relative;
  display: inline-block;
  padding: 10px 15px;
  margin: 0;
  border: 1px solid #ddd;
  border-radius: 1rem;
  color: var(--primary);
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.pagination .page-link:hover {
  background-color: var(--primary);
  color: white;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary);
  color: white;
}

.pagination .page-item.disabled .page-link {
  color: #ccc;
  pointer-events: none;
}

/* ================== pagination end ================= */

/* ==================  swiper button start ================= */
/* التصميم الأساسي للأزرار */
.swiper-button-next,
.swiper-button-prev {
  width: 40px; /* الحجم */
  height: 40px;
  background: rgba(255, 255, 255, 0.18) !important; /* اللون الأساسي مع شفافية 50% */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary); /* لون الأيقونة */
  font-weight: 700;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* ظل خفيف */
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-size: 15px;
    font-weight: 900;
}

/* تخصيص المواضع */
.swiper-button-next {
  right: 10px; /* موقع الزر الأيمن */
}

.swiper-button-prev {
  left: 10px; /* موقع الزر الأيسر */
}
.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 15px;
}

/* ==================  swiper button end ================= */

/* ==================  Product Card start ================= */
.product-card {
  transition: all 0.3s ease;
  overflow: hidden;
  cursor: pointer;
  border-radius: 1rem;
}

.product-name {
  overflow: hidden; /* إخفاء النص الزائد */
  display: -webkit-box; /* لضمان دعم النصوص متعددة الأسطر */
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; /* اتجاه النص عمودي */
  text-overflow: ellipsis; /* إضافة النقاط الثلاث */
  white-space: normal; /* السماح بلف النص */
}

.product-description {
  overflow: hidden; /* إخفاء النص الزائد */
  display: -webkit-box; /* لضمان دعم النصوص متعددة الأسطر */
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; /* اتجاه النص عمودي */
  text-overflow: ellipsis; /* إضافة النقاط الثلاث */
  white-space: normal; /* السماح بلف النص */
}

.product-card h6 {
  height: 42px;
  overflow: hidden; /* إخفاء النص الزائد */
  display: -webkit-box; /* لضمان دعم النصوص متعددة الأسطر */
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; /* اتجاه النص عمودي */
  text-overflow: ellipsis; /* إضافة النقاط الثلاث */
  white-space: normal; /* السماح بلف النص */
}

.product-card .overflow-hidden img {
  width: 250px;
  height: 255px;
  aspect-ratio: 3/3;
  object-fit: contain;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
  transition: all 0.5s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-card .badge .right {
  position: absolute;
  top: 10px;
  right: 10px;
}

.product-card .left {
  position: absolute;
  top: 10px;
  left: 10px;
}

.price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.btn-custom {
  background: linear-gradient(45deg, var(--primary), var(--primary));
  border: none;
  transition: all 0.3s ease;
}

.btn-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}
.product-card .out_of_stock {
    height: 38px;
    font-size: 12px;
    display: flex; /* تفعيل Flexbox */
    justify-content: center; /* توسيط النص أفقيًا */
    align-items: center; /* توسيط النص عموديًا */
  }

/* ==================  Responsive Design for Small Screens ================= */
@media (max-width: 576px) {
    .product-card {
      width: 100%; /* عرض 48% لعرض منتجين بجانب بعض */
      margin: 1%;
    }

    .product-card .overflow-hidden img {
      width: 100%; /* ملاءمة الصورة بالكامل داخل الكارت */
      height: auto;
    }
    .product-card .out_of_stock {
        height: 38px;
        width: 70px;
        font-size: 10px;
    }
        /* تعديل تنسيق النصوص بحيث يتناسب مع المساحة */
    .product-name,
    .product-description {
      -webkit-line-clamp: 1; /* تقليص النصوص لتناسب المساحة */
    }

    .price {
      font-size: 1.2rem; /* تقليص حجم الخط للسعر */
    }

    /* جعل العناصر في صفوف باستخدام Flexbox */
    .product-container {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
    }

    .start-product {
        display: none;
    }
  }
/* ==================  Product Card end ================= */
/* ==================  language dropdown start ================= */

.language-dropdown {
  position: relative;
  display: inline-block;
}

.language-dropdown-toggle {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #333;
}

.language-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 5px;
  padding: 0;
  list-style: none;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: none; /* مخفية افتراضياً */
  z-index: 1050;
  width: 150px;
}

.language-dropdown-item {
  padding: 10px 15px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.language-dropdown-item:hover {
  background-color: #f5f5f5;
}


.subcategory-list {
    margin-left: 20px;
    display: none; /* إخفاء الفئات الفرعية افتراضيًا */
}

.toggle-subcategories {
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
}

/* ==================  language dropdown end ================= *

/* ==================  user dropdown start ================= */

.user-dropdown {
    position: relative;
    display: inline-block;
  }

  .user-dropdown-toggle {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #333;
  }

  .user-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    padding: 0;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none; /* مخفية افتراضياً */
    z-index: 1050;
    width: 150px;
  }

  .user-dropdown-item {
    padding: 10px 15px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  .user-dropdown-item:hover {
    background-color: #f5f5f5;
  }
  /* ==================  user dropdown end ================= */


/* ==================  search start ================= */

.search-container {
  position: relative;
  width: 50%;
}

.search-input {
  height: 40px;
  border-radius: 30px;
  padding-left: 35px;
}
.search-input:focus {
  border: 1px solid var(--primary);
  outline: none;
  box-shadow: none;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #888;
}

/* ==================  search end ================= */

/* ==================  Header start ================= */

.sticky-top {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--primary);
  transition: box-shadow 0.3s ease-in-out;
}

.sticky-top.scrolled {
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* General Styling for Navigation */
.custom-navigation {
  background: var(--primary);
  z-index: 1040;
}
/* Navigation Menu Styling */
.menu-item {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    font-size: 16px;
    position: relative; /* تأكد من أن العنصر يحتوي على position relative */
    overflow: hidden; /* لإخفاء أي شيء يتجاوز الحدود */
    padding-bottom: 5px; /* لضمان أن السطر يظهر أسفل النص */
}

/* عند التمرير أو النشاط */
.menu-item.active,
.menu-item:hover {
    color: #fff; /* تغيير اللون عند التمرير أو النشاط */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.203); /* تأثير الظلال */
    border-radius: 20px; /* الزوايا المدورة عند التمرير أو النشاط */
}

/* السطر الذي يظهر أسفل الرابط */
.menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--bg-body); /* لون السطر */
    transform: scaleX(0); /* السطر مخفي في البداية */
    transform-origin: bottom right; /* بداية التحويل من الجهة اليمنى */
    transition: transform 0.3s ease-out; /* إضافة تأثير التحويل */
}

/* عند التمرير أو النشاط، يظهر السطر ويبدأ من اليمين لليسار */
.menu-item:hover::after,
.menu-item.active::after {
    transform: scaleX(1); /* السطر يظهر ويتوسع بالكامل */
    transform-origin: bottom left; /* تغيير بداية التحويل من الجهة اليسرى */
}

/* Cart Icon Styling */
.cart-icon {
  display: flex;
  align-items: center;
  color: #ffffff;
  /* لون أيقونة العربة */
  transition: color 0.3s ease;
}

.cart-icon:hover {
  color: #fff;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 20px 0px 0px 20px;
}

.cart-count {
  font-size: 14px;
  padding: 1px 6px;
  border-radius: 12px;
  color: #ffffff;
  margin-left: 5px;
}

/* تصميم الدائرة الحمراء */
.cart-badge {
    position: absolute;
    top: -5px; /* تعديل حسب موقع الأيقونة */
    right: -10px; /* تعديل حسب موقع الأيقونة */
    background-color: #ff0000; /* لون الدائرة */
    color: #ffffff; /* لون النص داخل الدائرة */
    border-radius: 50%; /* لجعلها دائرة */
    padding: 1.5px 5px; /* حجم الدائرة */
    font-size: 12px; /* حجم النص */
    font-weight: bold; /* وزن النص */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px; /* لضمان أن الدائرة متناسقة حتى مع النصوص الصغيرة */
    height: 18px; /* ارتفاع الدائرة */
}


/* Dropdown Styling */
.categories-menu {
  position: relative;
  padding-top: 12px;
  padding-bottom: 12px;
  width: 270px;
  cursor: pointer;
  background: #0000001d;
  font-weight: 600;
}

.categories-dropdown {
  display: none;
  position: absolute;
  top: 48px;
  left: 0;
  width: 270px;
  background: #fff;
  list-style: none;
  padding: 10px 0;
  border-radius: 0 0 0 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1050;
}

.categories-dropdown-item {
  padding: 10px 15px;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
  transition: background 0.3s ease;
  position: relative;
  font-weight: 600;
}

.categories-dropdown-item:hover {
  background-color: #f1f1f1;
}

.submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  width: 250px;
  background: #fff;
  list-style: none;
  padding: 10px 0;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.submenu li {
  padding: 10px 15px;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
  transition: background 0.3s ease;
  position: relative;
  font-size: 14px;
}

.submenu li:hover {
  background-color: #f1f1f1;
}

.submenu li a {
  text-decoration: none;
  color: #000000;
}

/* RTL Styling (if applicable) */
html[dir="rtl"] .categories-dropdown {
  left: auto;
  right: 0;
}

html[dir="rtl"] .submenu {
  left: auto;
  right: 100%;
}

/* Active Dropdown */
.categories-menu.active .categories-dropdown {
  display: block;
}
.categories-dropdown-item a {
    text-decoration: none;
    color: #000000;
}

.categories-dropdown-item:hover .submenu {
  display: block;
}

.category-name-sm {
    display: inline-block;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 1000px) {
  .header-xl {
    display: none;
  }
}

@media (min-width: 1000px) {
  .mobile-header {
    display: none;
  }
}

/* Desktop Header: Default */
.desktop-header {
  display: block;
}

/* Mobile Header: Hidden by default */

/* Media Query for Screens < 1000px */
@media (max-width: 1000px) {
  .desktop-header {
    display: none;
  }

  .mobile-header {
    display: flex;
  }
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
}

/* Sidebar Content */
.mobile-sidebar .sidebar-content {
  position: fixed;
  top: 0;
  right: 0;
  width: 250px;
  height: 100%;
  background-color: #fff;
  padding: 1rem;
  z-index: 1050;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.sidebar-content .mobile-menu-item {
  background-color: rgba(0, 0, 0, 0.089);
  border-radius: 5px;
  padding: 5px;
  text-decoration: none;
  color: #000000;
  font-weight: 600;
}

/* ==================  Header end ================= */

/* ================================= Footer start ================================= */
footer {
  background-color: var(--primary);
  color: #fff;
  padding: 3rem 0;
}

.social-icons a {
  font-size: 1.25rem;
}

.social-icons {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    font-size: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-icon:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/*  ================================= Footer end =================================  */

/* لإزالة الأزرار داخل الحقل */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* لأغلب المتصفحات */
input[type="number"] {
    -moz-appearance: textfield;
}
