/* ====================================
   تصميم الهيدر الجديد - متجر العميد
   ==================================== */

/* الشريط العلوي */
.top-bar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 8px 0;
  font-size: 13px;
  position: relative;
  z-index: 1001;
}

.top-bar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-right span {
  margin-left: 20px;
}

.top-bar-right i {
  margin-left: 6px;
  color: #e94560;
}

.top-bar-divider {
  color: rgba(255,255,255,0.3);
  margin: 0 10px;
}

.top-bar-left a {
  color: #fff;
  margin-right: 15px;
  font-size: 14px;
  transition: all 0.3s ease;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.top-bar-left a:hover {
  background: #e94560;
  transform: translateY(-2px);
  text-decoration: none;
}

/* الهيدر الرئيسي */
.main-header {
  background: #fff;
  padding: 15px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

/* الشعار */
.header-logo a {
  display: block;
}

.header-logo img {
  max-height: 65px;
  width: auto;
  transition: transform 0.3s ease;
}

.header-logo img:hover {
  transform: scale(1.05);
}

/* مربع البحث */
.header-search {
  flex: 1;
  max-width: 550px;
}

.search-wrapper {
  display: flex;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.search-wrapper:focus-within {
  border-color: #e94560;
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.1);
  background: #fff;
}

.search-wrapper input {
  flex: 1;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  background: transparent;
  outline: none;
  font-family: 'Cairo', sans-serif;
}

.search-wrapper input::placeholder {
  color: #999;
}

.search-wrapper button {
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  border: none;
  padding: 12px 25px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-wrapper button:hover {
  background: linear-gradient(135deg, #d63851 0%, #e94560 100%);
}

/* أيقونات الهيدر */
.header-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 15px;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
}

.header-icon-link:hover {
  background: #f8f9fa;
  text-decoration: none;
  color: #e94560;
}

.icon-wrapper {
  position: relative;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 20px;
  transition: all 0.3s ease;
}

.header-icon-link:hover .icon-wrapper {
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

.icon-label {
  font-size: 11px;
  margin-top: 5px;
  font-weight: 600;
  color: #666;
}

.header-icon-link:hover .icon-label {
  color: #e94560;
}

/* أيقونة النقاط */
.points-icon {
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  color: #fff;
}

.points-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #1a1a2e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* أيقونة واتساب */
.whatsapp-wrapper {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
}

.whatsapp-icon-link:hover .whatsapp-wrapper {
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* أيقونة السلة */
.icon-wrapper.cart-wrapper {
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  color: #fff;
  position: relative;
}

.icon-wrapper.wishlist-wrapper {
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
  color: #fff;
  position: relative;
}

.cart-badge, .wishlist-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ffc107;
  color: #333;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* أيقونات الجوال */
.mobile-icons {
  display: none;
}

@media (max-width: 768px) {
  .mobile-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
  }
  
  .mobile-cart-icon, .mobile-wishlist-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    position: relative;
    text-decoration: none;
  }
  
  .mobile-wishlist-icon {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
  }
  
  .mobile-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ffc107;
    color: #333;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* أيقونة واتساب على الجوال */
.mobile-whatsapp-icon {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 10px;
  color: #fff;
  font-size: 20px;
  text-decoration: none;
  flex-shrink: 0;
}

.mobile-whatsapp-icon:hover {
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}

/* زر القائمة للجوال */
.mobile-menu-btn {
  display: none;
  background: #f0f0f0;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  font-size: 20px;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  background: #e94560;
  color: #fff;
}

/* واتساب على الجوال - تنسيقات إضافية */
.mobile-whatsapp-icon {
  display: none;
  position: relative;
  color: #fff;
  font-size: 22px;
}

.mobile-whatsapp-extra {
  background: #e94560;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ====================================
   قائمة التنقل الرئيسية
   ==================================== */
.main-nav {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  position: sticky;
  top: 95px;
  z-index: 999;
  overflow: visible;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
  overflow: visible;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0;
  overflow: visible;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: #e94560;
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 3px 3px 0 0;
}

.nav-link:hover {
  color: #e94560;
  text-decoration: none;
  background: rgba(255,255,255,0.05);
}

.nav-link:hover::after {
  width: 60%;
}

.home-item .nav-link {
  background: rgba(233, 69, 96, 0.2);
}

.home-item .nav-link i {
  font-size: 14px;
}

.dropdown-arrow {
  font-size: 9px;
  transition: transform 0.3s ease;
  margin-right: 2px;
}

.has-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* القائمة المنسدلة */
.dropdown-menu-custom {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  min-width: 220px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 9999;
  overflow: visible;
}

.has-dropdown:hover .dropdown-menu-custom {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item.has-dropdown {
  position: relative;
}

.dropdown-inner {
  padding: 10px 0;
}

.dropdown-item-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.dropdown-item-custom i {
  font-size: 10px;
  color: #e94560;
  transition: transform 0.3s ease;
}

.dropdown-item-custom:hover {
  background: #f8f9fa;
  color: #e94560;
  padding-right: 25px;
  text-decoration: none;
}

.dropdown-item-custom:hover i {
  transform: translateX(-5px);
}

/* ====================================
   قائمة الجوال
   ==================================== */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-navigation {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: #fff;
  z-index: 1051;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -5px 0 30px rgba(0,0,0,0.2);
}

.mobile-navigation.active {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.mobile-nav-logo {
  max-height: 45px;
}

.close-navigation {
  background: rgba(255,255,255,0.1);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-navigation:hover {
  background: #e94560;
  transform: rotate(90deg);
}

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  color: #333;
  font-size: 14px;
}

.mobile-user-info i {
  font-size: 24px;
}

.mobile-search {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.mobile-search form {
  display: flex;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  overflow: hidden;
}

.mobile-search input {
  flex: 1;
  border: none;
  padding: 10px 15px;
  font-size: 14px;
  outline: none;
  font-family: 'Cairo', sans-serif;
}

.mobile-search button {
  background: #e94560;
  border: none;
  padding: 10px 15px;
  color: #fff;
}

.mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-menu > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 600;
  transition: all 0.3s ease;
}

.mobile-nav-menu > li > a:hover {
  background: #f8f9fa;
  color: #e94560;
  padding-right: 25px;
}

.mobile-nav-menu > li > a i {
  color: #e94560;
  width: 20px;
}

.mobile-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.mobile-category-header:hover {
  background: #f8f9fa;
}

.toggle-icon {
  color: #e94560;
  transition: transform 0.3s ease;
}

.mobile-category-header.active .toggle-icon {
  transform: rotate(45deg);
}

.mobile-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f8f9fa;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-submenu.active {
  max-height: 500px;
}

.mobile-submenu li a {
  display: block;
  padding: 12px 20px 12px 40px;
  color: #666;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
}

.mobile-submenu li a:hover {
  color: #e94560;
  background: #fff;
}

.mobile-nav-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  margin-top: auto;
}

.mobile-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  background: #f0f0f0;
  color: #333;
}

.mobile-nav-btn:hover {
  background: #e94560;
  color: #fff;
  text-decoration: none;
}

.mobile-nav-btn.logout-btn {
  background: #ff4444;
  color: #fff;
}

.mobile-nav-btn.register-btn {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
}

/* ====================================
   التوافق مع الجوال
   ==================================== */
@media (max-width: 992px) {
  .main-nav {
    display: none;
  }
  
  .header-icons {
    display: none;
  }
  
  .mobile-menu-btn,
  .mobile-whatsapp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .header-search {
    max-width: 350px;
    flex: 1;
  }
  
  .header-container {
    gap: 12px;
    padding: 0 15px;
  }
  
  .header-logo img {
    max-height: 55px;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
  
  .main-header {
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }
  
  .header-logo img {
    max-height: 45px;
  }
  
  .header-search {
    display: none;
  }
  
  .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 0 12px;
  }
  
  .header-logo {
    order: 2;
    flex: 1;
    display: flex;
    justify-content: center;
  }
  
  .mobile-menu-btn {
    order: 1;
    width: 42px;
    height: 42px;
    font-size: 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    flex-shrink: 0;
  }
  
  .mobile-menu-btn:hover,
  .mobile-menu-btn:active {
    background: #e94560;
  }
  
  .mobile-whatsapp-icon {
    order: 3;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 10px;
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    flex-shrink: 0;
  }
  
  .mobile-whatsapp-icon:hover {
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
  }
  
  /* تعديل المحتوى الرئيسي للصفحة */
  .main-content {
    margin-top: 70px;
  }
  
  body {
    padding-top: 70px !important;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 10px;
  }
  
  .header-logo img {
    max-height: 40px;
  }
  
  .mobile-menu-btn,
  .mobile-whatsapp-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  
  .mobile-navigation {
    width: 85%;
    max-width: 300px;
  }
  
  .mobile-nav-header {
    padding: 15px;
  }
  
  .mobile-nav-logo {
    max-height: 38px;
  }
  
  .close-navigation {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
  
  .mobile-search {
    padding: 12px 15px;
  }
  
  .mobile-search input {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .mobile-search button {
    padding: 8px 12px;
  }
  
  .mobile-nav-menu > li > a,
  .mobile-category-header {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .mobile-submenu li a {
    padding: 10px 15px 10px 30px;
    font-size: 13px;
  }
  
  .mobile-nav-footer {
    padding: 15px;
  }
  
  .mobile-nav-btn {
    padding: 10px;
    font-size: 13px;
  }
  
  .mobile-user-info {
    padding: 12px 15px;
    font-size: 13px;
  }
  
  .mobile-user-info i {
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  .header-logo img {
    max-height: 35px;
  }
  
  .mobile-menu-btn,
  .mobile-whatsapp-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
    border-radius: 8px;
  }
  
  .mobile-navigation {
    width: 90%;
  }
}

/* ====================================
   زر المفضلة في بطاقات المنتجات
   ==================================== */
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 35px;
  height: 35px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.wishlist-btn:hover {
  background: #fff;
  transform: scale(1.1);
}

.wishlist-btn i {
  font-size: 16px;
  color: #e94560;
  transition: all 0.3s ease;
}

.wishlist-btn.active i,
.wishlist-btn:hover i {
  color: #e94560;
}

.wishlist-btn.active {
  background: #e94560;
}

.wishlist-btn.active i {
  color: #fff;
}

/* زر إضافة للسلة */
.add-cart-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(233,69,96,0.3);
}

.add-cart-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(233,69,96,0.4);
}

.add-cart-btn i {
  font-size: 14px;
  color: #fff;
}

/* زر المفضلة في صفحة التفاصيل */
.wishlist-detail-btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.wishlist-detail-btn:hover {
  background: #e94560;
  color: #fff;
  border-color: #e94560;
}

.wishlist-detail-btn.active {
  background: #e94560;
  color: #fff;
  border-color: #e94560;
}

.wishlist-detail-btn.active i {
  font-weight: 900;
}

/* زر أضف للسلة */
.add-to-cart-btn {
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  border: none;
  color: #fff;
  padding: 8px 15px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 10px;
}

.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #d63850 0%, #e94560 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(233,69,96,0.4);
  color: #fff;
}

.add-to-cart-btn i {
  margin-left: 5px;
}

/* ====================================
   شريط آخر المنتجات المتحرك
   ==================================== */
.latest-products-ticker {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-bottom: 2px solid #e94560;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  margin-bottom: 0;
  z-index: 99;
}

/* إزالة المسافة الزائدة */
.main-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.main-content-wrapper {
  margin-top: 0;
  padding-top: 0;
}

.custom-carousel {
  margin-top: 0;
}

.ticker-label {
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 3px 0 10px rgba(0,0,0,0.1);
}

.ticker-label i {
  font-size: 16px;
  animation: fireAnimation 0.5s ease-in-out infinite alternate;
}

@keyframes fireAnimation {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}

.ticker-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ticker-content {
  display: flex;
  animation: ticker 20s linear infinite;
  width: max-content;
}

.ticker-content:hover {
  animation-play-state: paused;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 25px;
  text-decoration: none;
  color: #333;
  border-left: 1px solid #eee;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.ticker-item:hover {
  background: rgba(233, 69, 96, 0.1);
  text-decoration: none;
  color: #e94560;
}

.ticker-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ticker-name {
  font-weight: 600;
  font-size: 13px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-price {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 700;
}

/* تجاوب الشريط المتحرك مع الجوال */
@media (max-width: 768px) {
  .latest-products-ticker {
    display: flex !important;
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    z-index: 998;
  }
  
  .ticker-label {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .ticker-label span {
    display: none;
  }
  
  .ticker-item {
    padding: 6px 15px;
    gap: 8px;
  }
  
  .ticker-item img {
    width: 32px;
    height: 32px;
  }
  
  .ticker-name {
    font-size: 12px;
    max-width: 100px;
  }
  
  .ticker-price {
    font-size: 11px;
    padding: 2px 8px;
  }
  
  /* تعديل padding للمحتوى */
  body {
    padding-top: 120px !important;
  }
  
  .main-content {
    margin-top: 60px;
  }
}

@media (max-width: 480px) {
  .latest-products-ticker {
    top: 60px;
  }
  
  .ticker-item img {
    width: 28px;
    height: 28px;
  }
  
  .ticker-name {
    max-width: 80px;
    font-size: 11px;
  }
  
  body {
    padding-top: 110px !important;
  }
}

/* ====================================
   زر طلب واتساب في المنتجات
   ==================================== */
.whatsapp-order-btn {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.whatsapp-order-btn:hover {
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  color: #fff !important;
}

.whatsapp-order-btn i {
  font-size: 18px;
}

/* ====================================
   تعديل body padding
   ==================================== */
body {
  padding-top: 0 !important;
}

/* إخفاء الهيدر القديم */
.navbar-custom,
.category-menu,
.mobile-menu-controls,
.open-navigation {
  display: none !important;
}

/* ====================================
   تحسينات إضافية للجوال
   ==================================== */
@media (max-width: 768px) {
  /* تحسين قائمة الجوال */
  .mobile-navigation {
    display: flex;
    flex-direction: column;
  }
  
  .mobile-nav-menu {
    flex: 1;
    overflow-y: auto;
  }
  
  /* تأثير التمرير السلس */
  .mobile-navigation::-webkit-scrollbar {
    width: 4px;
  }
  
  .mobile-navigation::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  .mobile-navigation::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 4px;
  }
  
  /* تحسين أزرار القائمة */
  .mobile-category-header {
    background: #fff;
  }
  
  .mobile-category-header:active {
    background: #f0f0f0;
  }
  
  .mobile-nav-menu > li > a:active {
    background: #f0f0f0;
  }
}

/* ====================================
   شريط التنقل السفلي للجوال - تحديث
   ==================================== */
.mobile-bottom-nav {
  background: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.mobile-bottom-nav-item i {
  color: #666;
  transition: all 0.3s ease;
}

.mobile-bottom-nav-item.active i,
.mobile-bottom-nav-item:hover i {
  color: #e94560;
}

.mobile-bottom-nav-item span {
  color: #666;
  font-weight: 500;
}

.mobile-bottom-nav-item.active span {
  color: #e94560;
}

/* ====================================
   إصلاحات عامة للجوال
   ==================================== */
@media (max-width: 768px) {
  /* إصلاح ترتيب العناصر */
  .header-container {
    flex-wrap: nowrap;
  }
  
  /* إخفاء أيقونات سطح المكتب */
  .whatsapp-icon-link {
    display: none !important;
  }
  
  /* التأكد من ظهور عناصر الجوال */
  .mobile-menu-btn {
    display: flex !important;
  }
  
  .mobile-whatsapp-icon {
    display: flex !important;
    position: relative;
  }
  
  /* تحسين مساحة اللمس */
  .mobile-menu-btn,
  .mobile-whatsapp-icon {
    min-width: 42px;
    min-height: 42px;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* إخفاء قائمة سطح المكتب */
  .main-nav {
    display: none !important;
  }
  
  /* تحسين الـ overlay */
  .mobile-nav-overlay {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
}

/* ====================================
   تحسين القائمة المنسدلة للجوال
   ==================================== */
.mobile-submenu {
  background: #f5f5f5;
}

.mobile-submenu li {
  border-bottom: 1px solid #e8e8e8;
}

.mobile-submenu li:last-child {
  border-bottom: none;
}

.mobile-submenu li a {
  position: relative;
  padding-right: 35px;
}

.mobile-submenu li a::before {
  content: '\f104';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #e94560;
  font-size: 12px;
}

/* ====================================
   تحسين الأنيميشن
   ==================================== */
.mobile-navigation {
  will-change: transform;
}

.mobile-nav-overlay {
  will-change: opacity;
}

.mobile-submenu {
  will-change: max-height;
}

/* ====================================
   Safe area للأجهزة ذات النوتش
   ==================================== */
@supports (padding-top: env(safe-area-inset-top)) {
  .main-header {
    padding-top: calc(12px + env(safe-area-inset-top));
  }
  
  .mobile-nav-header {
    padding-top: calc(20px + env(safe-area-inset-top));
  }
  
  .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
