body {
    transition: margin-top 0.3s ease;
    margin: 0;
    padding: 0;
  }
  .navbar {
    direction: rtl;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 15px 20px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    z-index: 1000;
    flex-wrap: wrap;
  }
  @keyframes slideDown {
    from { top: -60px; }
    to { top: 0; }
  }
  .navbar.fixed {
    position: fixed;
    background-color: #fff;
    padding: 10px 20px;
    box-shadow: 0px 6px 12px rgba(0,0,0,0.15);
    top: 0;
    width: 100%;
  }
  .content {
    padding-top: 80px;
  }
  
  /* تنسيق الشعار */
  .logo {
    display: flex;
    align-items: center;
  }
  .logo img {
    max-height: 50px;
    width: auto;
  }
  .menu-toggle {
    display: none;
    font-size: 24px;
    margin-left: 15px;
    cursor: pointer;
  }
  
  /* القائمة الرئيسية */
  .menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 70%;
  }
  .menu-item {
    position: relative;
    margin: 0 5px;
  }
  .menu-link {
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    color: #000;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    font-size: 16px;
    transition: color 0.3s ease;
  }
  .menu-link:hover {
    color: #b00;
  }
  .menu-item > .menu-link.has-submenu::after {
    content: '▼';
    font-size: 12px;
    margin-right: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
  }
  .menu-item.active > .menu-link.has-submenu::after {
    transform: rotate(-180deg);
  }

  /* القائمة الفرعية */
  .dropdown {
    display: none;
    list-style-type: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin: 0;
    padding: 0;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  /* إظهار القائمة عند التمرير أو التفاعل */
  .menu-item:hover .dropdown,
  .menu-item.active .dropdown {
    display: block;
    opacity: 1;
    pointer-events: all;
  }

  /* تنسيق العناصر داخل القائمة المنسدلة */
  .dropdown li {
    padding: 12px 20px;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #e9e9e9;
  }

  .dropdown li a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    display: block;
  }

  .dropdown li:hover {
    background-color: #b00;
  }

  .dropdown li:hover a {
    color: #fff;
  }
  
  /* تنسيق عداد السلة */
  .cart-count {
    background-color: #b00;
    color: white;
    padding: 3px 8px;
    border-radius: 50%;
    position: absolute;
    top: -5px;
    right: 1px;
    font-size: 12px;
  }
  
  /* تنسيق الأيقونات (user-icon و cart-icon) */
  .icons {
    display: flex;
    align-items: center;
    position: relative;
  }
  .icon-wrapper {
    margin-right: 15px;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  .icon-wrapper:hover {
    background-color: #e0e0e0;
  }
  .icon-wrapper i {
    font-size: 20px;
    color: #333;
  }
  
  /* قائمة المستخدم المنسدلة */
  .user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 5px;
    min-width: 180px;
    z-index: 1000;
  }
  
  .user-dropdown.show {
    display: block;
  }
  
  .user-dropdown a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
  }
  
  .user-dropdown a:hover {
    background-color: #f0f0f0;
  }
  
  .user-dropdown a.logout {
    color: #b00;
  }
  
  .user-dropdown a.logout:hover {
    background-color: #b00;
    color: #fff;
  }
  
  /* أنماط البوب آب */
  .popup-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
  }
  
  .popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    position: relative;
  }
  
  .close-btn2 {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    cursor: pointer;
  }
  
  /* القائمة السفلية */
/* القائمة السفلية - النسخة المحسنة بالكامل */
.fixed-bottom-menu {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
  z-index: 999;
  padding: 8px 0;
  display: none;
  border-top: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  transform: translateY(100%);
  animation: slideUp 0.5s ease-out forwards;
}

.fixed-bottom-menu .menu-list {
  display: flex;
  justify-content: space-around;
  margin: 0;
  padding: 0;
  list-style: none;
  direction: rtl;
}

.fixed-bottom-menu .menu-item {
  flex: 1;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.fixed-bottom-menu .menu-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  text-decoration: none;
  color: #555;
  font-size: 12px;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 5px;
  position: relative;
  overflow: hidden;
}

.fixed-bottom-menu .menu-item a i {
  font-size: 20px;
  margin-bottom: 5px;
  display: block;
  transition: all 0.3s ease;
}

.fixed-bottom-menu .menu-item a:hover,
.fixed-bottom-menu .menu-item a.active {
  background-color: rgba(0, 123, 255, 0.1);
  color: #007bff;
}

.fixed-bottom-menu .menu-item a:hover i,
.fixed-bottom-menu .menu-item a.active i {
  transform: translateY(-3px);
}

.fixed-bottom-menu .menu-item a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 123, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fixed-bottom-menu .menu-item a:hover::after {
  opacity: 1;
}

.fixed-bottom-menu .menu-item a.active::after {
  background: linear-gradient(to top, rgba(0, 123, 255, 0.2), transparent);
  opacity: 1;
}

.fixed-bottom-menu .cart-count {
  position: absolute;
  top: 0px;
  left: calc(50% + 10px);
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  animation: pulse 1.5s infinite;
}

/* تأثيرات خاصة بكل عنصر */
.fixed-bottom-menu .menu-item:nth-child(1) a:hover,
.fixed-bottom-menu .menu-item:nth-child(1) a.active {
  color: #007bff;
  background-color: rgba(0, 123, 255, 0.1);
}

.fixed-bottom-menu .menu-item:nth-child(2) a:hover,
.fixed-bottom-menu .menu-item:nth-child(2) a.active {
  color: #25D366;
  background-color: rgba(37, 211, 102, 0.1);
}

.fixed-bottom-menu .menu-item:nth-child(3) a:hover,
.fixed-bottom-menu .menu-item:nth-child(3) a.active {
  color: #6f42c1;
  background-color: rgba(111, 66, 193, 0.1);
}

.fixed-bottom-menu .menu-item:nth-child(4) a:hover,
.fixed-bottom-menu .menu-item:nth-child(4) a.active {
  color: #ff8800;
  background-color: rgba(255, 136, 0, 0.1);
}

/* مؤشر الصفحة الحالية */
.fixed-bottom-menu .active-indicator {
  position: absolute;
  bottom: -8px;
  width: 20px;
  height: 3px;
  background-color: #007bff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.fixed-bottom-menu .menu-item:nth-child(2) .active-indicator {
  background-color: #25D366;
}

.fixed-bottom-menu .menu-item:nth-child(3) .active-indicator {
  background-color: #6f42c1;
}

.fixed-bottom-menu .menu-item:nth-child(4) .active-indicator {
  background-color: #ff8800;
}

/* تأثيرات حركية */
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.fixed-bottom-menu .menu-item a:hover i {
  animation: bounce 0.6s ease;
}

.fixed-bottom-menu .menu-item a.active i {
  animation: pulse 0.5s ease;
}

/* تأثيرات View Transition */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

::view-transition-old(root) {
  animation: fade-out 0.3s ease;
}

::view-transition-new(root) {
  animation: fade-in 0.3s ease;
}

::view-transition-old(bottom-menu),
::view-transition-new(bottom-menu) {
  height: 100%;
  width: 100%;
}

/* التكيف مع الشاشات الصغيرة */
@media (max-width: 768px) {
  .fixed-bottom-menu {
      display: block;
  }
  
  .fixed-bottom-menu .menu-item a {
      font-size: 11px;
      padding: 6px 0;
  }
  
  .fixed-bottom-menu .menu-item a i {
      font-size: 18px;
  }
  
  .fixed-bottom-menu .cart-count {
      width: 18px;
      height: 18px;
      font-size: 11px;
  }
}

@media (max-width: 480px) {
  .fixed-bottom-menu {
      padding: 6px 0;
  }
  
  .fixed-bottom-menu .menu-item a {
      font-size: 10px;
      padding: 5px 0;
  }
  
  .fixed-bottom-menu .menu-item a i {
      font-size: 16px;
  }
  
  .active-indicator {
      width: 15px;
      height: 2px;
      bottom: -6px;
  }
}
  
  /* القائمة الجانبية للجوال - التعديلات الجديدة */
  .side-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background-color: #f8f9fa;
    z-index: 1002;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 20px;
    box-shadow: -2px 0 15px rgba(0,0,0,0.2);
  }
  
  .side-menu.show {
    right: 0;
  }
  
  .side-menu .close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #555;
    background: #eee;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  
  .side-menu ul {
    list-style: none;
    padding: 0;
    margin-top: 40px;
  }
  
  .side-menu .menu-item {
    margin-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .side-menu .menu-item:last-child {
    border-bottom: none;
  }
  
  .side-menu .menu-link {
    padding: 12px 15px;
    display: block;
    color: #333;
    font-size: 16px;
    transition: all 0.3s;
    position: relative;
  }
  
  .side-menu .menu-link.has-submenu::after {
    content: '◀';
    font-size: 12px;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s;
  }
  
  .side-menu .menu-item.active > .menu-link.has-submenu::after {
    transform: translateY(-50%) rotate(-90deg);
  }
  
  .side-menu .menu-link:hover {
    background-color: #e9ecef;
    color: #b00;
  }
  
  .side-menu .dropdown {
    position: static;
    box-shadow: none;
    display: none;
    padding: 0;
    margin: 0;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin-top: 5px;
    margin-bottom: 10px;
  }
  
  .side-menu .dropdown li {
    padding: 10px 25px;
    border-bottom: 1px solid #ddd;
  }
  
  .side-menu .dropdown li:last-child {
    border-bottom: none;
  }
  
  .side-menu .dropdown li a {
    color: #555;
    font-size: 14px;
  }
  
  .side-menu .dropdown li:hover {
    background-color: #e0e0e0;
  }
  
  .side-menu .dropdown li:hover a {
    color: #b00;
  }
  
  /* أنماط الإشعارات */
  .notification {
      position: fixed;
      top: 20px;
      right: 20px;
      background-color: #28a745;
      color: white;
      padding: 12px 24px;
      border-radius: 8px;
      z-index: 1001;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      animation: slideIn 0.3s ease-out;
  }
  
  @keyframes slideIn {
      from { transform: translateY(-20px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
  }
  
  /* وسائط الاستجابة */
  @media (max-width: 1200px) {
    .menu {
      max-width: 60%;
    }
  }
  
  @media (max-width: 992px) {
    .menu {
      max-width: 50%;
    }
    .menu-link {
      padding: 10px 12px;
      font-size: 15px;
    }
  }
  
  @media (max-width: 768px) {
    .navbar {
      padding: 10px 15px;
    }
    .menu {
      display: none;
    }
    .menu-toggle {
      display: block;
    }
    .logo img {
      max-height: 40px;
    }
  }