/* Top Bar */
.top-bar {
  background: #1a1a1a;
  color: white;
  font-size: 12px;
  padding: 10px 0;
  letter-spacing: 0.5px;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.language-switcher {
  background: linear-gradient(135deg, #ff8c42, #ff6b35);
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
}

.language-switcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
  background: linear-gradient(135deg, #ff6b35, #ff5722);
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  color: white;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #ff9966;
}

/* Header */
header {
  background: white;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #e0e0e0;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.logo-img {
  height: 50px;
  width: auto;
}

.search-bar {
  flex: 1;
  display: flex;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  max-width: 600px;
}

.search-bar input {
  flex: 1;
  padding: 12px 20px;
  border: none;
  outline: none;
  font-size: 14px;
}

.search-bar select {
  padding: 12px 15px;
  border: none;
  border-left: 1px solid #e0e0e0;
  outline: none;
  background: white;
  cursor: pointer;
  font-size: 13px;
}

.search-bar button {
  padding: 12px 20px;
  background: #ff8c42;
  border: none;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.search-bar button:hover {
  background: #ff9966;
}

.header-actions {
  display: flex;
  gap: 25px;
  align-items: center;
}

.login-link,
.cart-link {
  color: #2d2d2d;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.login-link:hover,
.cart-link:hover {
  color: #ff9966;
}

.cart-link {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #ff8c42;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Navigation */
nav {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  justify-content: center;
  gap: 50px;
  padding: 0;
}

.nav-menu li a {
  color: #2d2d2d;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 20px 0;
  display: block;
  transition: color 0.3s;
  letter-spacing: 0.5px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: #ff9966;
}

/* Mobile Elements - Enhanced */
.mobile-hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-hamburger:hover {
  background: rgba(255, 140, 66, 0.1);
}

.mobile-hamburger span {
  width: 24px;
  height: 2.5px;
  background: linear-gradient(90deg, #ff8c42, #ff6b35);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(9px, 9px);
  background: #ff6b35;
}

.mobile-hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.mobile-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
  background: #ff6b35;
}

.mobile-search-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #ff8c42;
  padding: 8px;
  align-items: center;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.mobile-search-btn:hover {
  background: rgba(255, 140, 66, 0.1);
  transform: scale(1.1);
}

/* Mobile Menu */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-nav-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  z-index: 1001;
  flex-direction: column;
  padding: 0;
  gap: 0;
  animation: slideInLeft 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow-y: auto;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-nav-menu.active {
  display: flex;
}

.mobile-nav-list {
  list-style: none;
  padding: 20px 0;
  margin: 0;
  width: 100%;
}

.mobile-nav-list li {
  margin: 0;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-list li:first-child {
  border-top: 1px solid #f0f0f0;
}

.mobile-nav-list a {
  display: block;
  padding: 16px 20px;
  color: #1a1a1a;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.mobile-nav-list a:hover {
  color: #ff8c42;
  background: rgba(255, 140, 66, 0.05);
  padding-left: 24px;
}

/* Mobile Dropdown Styles */
.mobile-dropdown {
  position: relative;
}

.mobile-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: none;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-dropdown-trigger:hover {
  color: #ff8c42;
  background: rgba(255, 140, 66, 0.05);
}

.mobile-dropdown-trigger i {
  transition: transform 0.3s ease;
  font-size: 13px;
}

.mobile-dropdown.active .mobile-dropdown-trigger i {
  transform: rotate(180deg);
}

.mobile-dropdown.active .mobile-dropdown-trigger {
  color: #ff8c42;
  background: rgba(255, 140, 66, 0.08);
}

.mobile-dropdown-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  background: #f8f8f8;
  transition: max-height 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-dropdown.active .mobile-dropdown-menu {
  max-height: 500px;
}

.mobile-dropdown-menu li {
  border-bottom: 1px solid #e8e8e8;
}

.mobile-dropdown-menu li:last-child {
  border-bottom: none;
}

.mobile-dropdown-menu a {
  display: block;
  padding: 14px 20px 14px 40px;
  color: #555;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.mobile-dropdown-menu a::before {
  content: "›";
  position: absolute;
  left: 22px;
  color: #ff8c42;
  font-size: 18px;
  opacity: 0;
  transition: all 0.3s ease;
}

.mobile-dropdown-menu a:hover {
  color: #ff8c42;
  background: rgba(255, 140, 66, 0.08);
  padding-left: 44px;
}

.mobile-dropdown-menu a:hover::before {
  opacity: 1;
  left: 20px;
}



/* RTL Support */
html[dir="rtl"] .mobile-dropdown-trigger {
  text-align: right;
}

html[dir="rtl"] .mobile-dropdown-menu a {
  padding: 14px 40px 14px 20px;
}

html[dir="rtl"] .mobile-dropdown-menu a::before {
  content: "‹";
  left: auto;
  right: 22px;
}

html[dir="rtl"] .mobile-dropdown-menu a:hover {
  padding-left: 20px;
  padding-right: 44px;
}

html[dir="rtl"] .mobile-dropdown-menu a:hover::before {
  left: auto;
  right: 20px;
}

/* Mobile Search Modal */
.mobile-search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.mobile-search-modal.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.mobile-search-modal-content {
  background: white;
  width: 95%;
  max-width: 500px;
  border-radius: 12px;
  padding: 24px;
  animation: slideDown 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.mobile-search-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 140, 66, 0.1);
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.mobile-search-input-wrapper {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.mobile-search-input-wrapper:focus-within {
  border-color: #ff8c42;
  box-shadow: 0 0 12px rgba(255, 140, 66, 0.2);
}

.mobile-search-input-wrapper input {
  flex: 1;
  padding: 14px 16px;
  border: none;
  outline: none;
  font-size: 16px;
  background: white;
}

.mobile-search-input-wrapper button {
  padding: 14px 18px;
  background: linear-gradient(135deg, #ff8c42, #ff6b35);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}


/* إضافة الـ select الذي تم حذفه بالخطأ */
.mobile-search-modal-content select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
  background: white;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-search-modal-content select:hover {
  border-color: #ff8c42;
}

.mobile-search-modal-content select:focus {
  border-color: #ff8c42;
  box-shadow: 0 0 12px rgba(255, 140, 66, 0.2);
}

/* RTL Support */
html[dir="rtl"] .mobile-search-modal-close {
  right: auto;
  left: 12px;
}

/* Animations */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* RTL Support */
html[dir="rtl"] .mobile-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(-9px, 9px);
}

html[dir="rtl"] .mobile-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(-8px, -8px);
}

html[dir="rtl"] .mobile-nav-menu {
  left: auto;
  right: 0;
  animation: slideInRight 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
}

html[dir="rtl"] .mobile-nav-list a:hover {
  padding-left: 20px;
  padding-right: 24px;
}

html[dir="rtl"] .mobile-search-modal-close {
  right: auto;
  left: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {

  /* Header Mobile */
  header .container {
    padding: 0px 35px;
    gap: 15px;
  }

  .mobile-hamburger {
    display: flex;
    order: 1;
  }

  header .logo {
    order: 2;
    flex: 1;
    text-align: center;
  }

  .logo-img {
    height: 40px;
  }

  .search-bar {
    display: none;
  }

  .header-actions {
    order: 3;
    gap: 12px;
  }

  .mobile-search-btn {
    display: flex;
    font-size: 20px;
  }

  .user-dropdown,
  .login-link {
    display: none;
  }

  .cart-link {
    font-size: 18px;
  }

  nav {
    display: none;
  }

  /* Top Bar Mobile */
  .top-bar {
    display: block;
    padding: 8px 0;
  }

  .top-bar .container {
    padding: 0 15px;
    flex-direction: column;
    gap: 10px;
  }

  .top-bar-left {
    display: none;
  }

  .top-bar-right {
    width: 100%;
    justify-content: space-between;
    gap: 15px;
  }

  .language-switcher {
    order: 1;
    padding: 6px 12px;
    font-size: 12px;
  }

  .social-icons {
    order: 2;
  }
}

@media (max-width: 480px) {
  header .container {
    padding: 0px 22px;
    gap: 10px;
  }

  .logo-img {
    height: 36px;
  }

  .mobile-hamburger {
    padding: 6px;
  }

  .mobile-hamburger span {
    width: 22px;
    height: 2px;
  }

  .mobile-search-btn {
    font-size: 18px;
  }

  .cart-count {
    width: 16px;
    height: 16px;
    font-size: 9px;
  }

  .mobile-nav-menu {
    max-width: 280px;
  }

  .mobile-nav-list a {
    padding: 14px 16px;
    font-size: 14px;
  }

  .mobile-search-modal-content {
    width: 90%;
    padding: 20px;
  }

  .mobile-search-input-wrapper input {
    padding: 12px 14px;
    font-size: 15px;
  }

  .top-bar {
    padding: 10px 0;
  }

  .top-bar .container {
    padding: 0 10px;
  }

  .language-switcher {
    padding: 5px 10px;
    font-size: 11px;
  }
}











/* تحسين user dropdown styling احترافي */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.user-trigger i:last-child {
  font-size: 11px;
  transition: transform 0.3s ease;
}

.user-dropdown:hover .user-trigger i:last-child {
  transform: rotate(180deg);
}

.user-dropdown:hover .user-trigger {
  color: #ff8c42;
}

.user-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 1px solid #f0f0f0;
  overflow: hidden;
}

.user-dropdown:hover .user-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu a {
  display: block;
  padding: 14px 18px;
  color: #2d2d2d;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f5f5f5;
  position: relative;
  overflow: hidden;
}

.user-menu a:last-child {
  border-bottom: none;
}

.user-menu a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #ff8c42, #ff6b35);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.user-menu a:hover {
  background: rgba(255, 140, 66, 0.05);
  color: #ff8c42;
  padding-left: 22px;
}

.user-menu a:hover::before {
  transform: scaleY(1);
}

/* RTL Support */
html[dir="rtl"] .user-menu {
  left: 0;
  right: auto;
}

html[dir="rtl"] .user-menu a {
  border-left: 1px solid #f5f5f5;
  border-bottom: none;
}

html[dir="rtl"] .user-menu a:last-child {
  border-left: none;
}

html[dir="rtl"] .user-menu a::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .user-menu a:hover {
  padding-left: 18px;
  padding-right: 22px;
}

/* Responsive */
@media (max-width: 768px) {
  .user-menu {
    min-width: 180px;
    top: calc(100% + 8px);
  }

  .user-menu a {
    padding: 12px 16px;
    font-size: 12px;
  }

  .user-menu a:hover {
    padding-left: 20px;
  }

  html[dir="rtl"] .user-menu a:hover {
    padding-left: 16px;
    padding-right: 20px;
  }
}

@media (max-width: 480px) {
  .user-menu {
    min-width: 160px;
    right: -20px;
  }

  html[dir="rtl"] .user-menu {
    left: -20px;
    right: auto;
  }
}



.mobile-nav-list li:nth-last-child(-n+3) a {
    background: linear-gradient(135deg, #fff8f0 0%, #ffe8d6 100%);   
    
}

