/* ====================================================
   تصميم احترافي - متجر خفايا العود
   نسخة نهائية مصححة - Version 6.0
   ==================================================== */

/* ============== الهيدر الكامل - خلفية سوداء فاخرة ============== */
header,
.s-header,
header.s-header-style-default,
header.s-header-style-centered,
body > header,
#salla-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%) !important;
  background-color: #1a1a1a !important;
  border-bottom: 2px solid #c9a961 !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4) !important;
}

/* النصوص داخل الهيدر - بيضاء */
header *,
.s-header *,
header a,
header span,
header label,
header p,
header div {
  color: #e8e8e8 !important;
}

/* استثناء النصوص داخل الأزرار والـ inputs */
header input {
  color: #ffffff !important;
}

a[href*="login"],
a[href*="login"] *,
header a[href*="login"],
header a[href*="login"] * {
  color: #1a1a1a !important;
}

/* ============== شريط البحث ============== */
header input[type="search"],
header input[type="text"],
.s-header input,
header form input {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid rgba(201, 169, 97, 0.5) !important;
  border-radius: 50px !important;
  padding: 12px 25px !important;
  color: #ffffff !important;
  font-size: 14px !important;
  height: auto !important;
  transition: all 0.3s ease !important;
}

header input::placeholder,
.s-header input::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

header input:focus,
.s-header input:focus {
  border-color: #c9a961 !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.2) !important;
  outline: none !important;
}

/* أيقونة البحث داخل شريط البحث */
header form svg,
header [class*="search"] svg {
  color: #c9a961 !important;
  fill: #c9a961 !important;
}

/* ============== الشعار ============== */
header img,
.s-header img,
.logo img,
header .logo img {
  border-radius: 50% !important;
  border: 3px solid #c9a961 !important;
  padding: 3px !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  transition: all 0.3s ease !important;
  max-height: 60px !important;
  width: auto !important;
}

header img:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 0 30px rgba(201, 169, 97, 0.7) !important;
}

/* ============== أيقونات السلة واللغة ============== */
header svg,
.s-header svg,
header i {
  color: #c9a961 !important;
  fill: #c9a961 !important;
}

/* أزرار الأيقونات (السلة، اللغة) */
header > div > a,
header > div > button,
header a[class*="cart"],
header button[class*="cart"],
header a[class*="lang"],
header button[class*="lang"],
header [class*="cart-icon"],
header [class*="lang-switcher"] {
  background-color: rgba(201, 169, 97, 0.15) !important;
  border: 1px solid rgba(201, 169, 97, 0.4) !important;
  border-radius: 50% !important;
  width: 42px !important;
  height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  position: relative !important;
}

/* أيقونة العملة/اللغة - النص بداخلها */
header [class*="currency"],
header [class*="lang"] span {
  color: #c9a961 !important;
  font-weight: 600 !important;
}

header a[class*="cart"]:hover,
header button[class*="cart"]:hover,
header a[class*="lang"]:hover {
  background-color: #c9a961 !important;
  border-color: #c9a961 !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 15px rgba(201, 169, 97, 0.5) !important;
}

header a[class*="cart"]:hover svg,
header a[class*="cart"]:hover i {
  color: #1a1a1a !important;
  fill: #1a1a1a !important;
}

/* ============== عداد السلة ============== */
header sup,
.s-header sup,
header .badge {
  background: linear-gradient(135deg, #c9a961 0%, #8b7340 100%) !important;
  color: #1a1a1a !important;
  font-weight: 700 !important;
  border: 2px solid #1a1a1a !important;
  font-size: 11px !important;
  min-width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  animation: pulse-luxury 2s infinite !important;
}

@keyframes pulse-luxury {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 97, 0.7); }
  50% { box-shadow: 0 0 0 8px rgba(201, 169, 97, 0); }
}

/* ============== زر تسجيل الدخول ============== */
a[href*="login"],
a[href*="auth"],
header a[href*="login"] {
  background: linear-gradient(135deg, #c9a961 0%, #8b7340 100%) !important;
  background-color: #c9a961 !important;
  color: #1a1a1a !important;
  font-weight: 700 !important;
  padding: 10px 24px !important;
  border-radius: 50px !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(201, 169, 97, 0.4) !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  white-space: nowrap !important;
}

a[href*="login"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(201, 169, 97, 0.6) !important;
}

a[href*="login"] svg,
a[href*="login"] i,
a[href*="login"] span {
  color: #1a1a1a !important;
  fill: #1a1a1a !important;
}

/* ============== القائمة الرئيسية (تخفيضات، العروض، إلخ) ============== */
/* خلفية بيضاء عشان النصوص تكون داكنة وواضحة */
nav.menu,
nav.s-menu,
.s-menu-container,
.menu-container,
salla-menu,
header + nav,
body > nav {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-top: 1px solid rgba(201, 169, 97, 0.2) !important;
  border-bottom: 1px solid rgba(201, 169, 97, 0.15) !important;
  padding: 12px 0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

/* روابط القائمة - باللون الأسود الفاتح */
nav.menu a,
nav.s-menu a,
.s-menu-container a,
.menu-container a,
salla-menu a {
  color: #2c2c2c !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
  transition: all 0.3s ease !important;
  font-size: 14px !important;
}

nav.menu a *,
nav.s-menu a *,
.menu-container a * {
  color: #2c2c2c !important;
}

nav.menu a:hover,
nav.s-menu a:hover,
.menu-container a:hover {
  color: #c9a961 !important;
}

nav.menu a:hover *,
nav.s-menu a:hover * {
  color: #c9a961 !important;
}

/* قسم التخفيضات النشط */
nav .active,
nav .active a,
nav a.active {
  color: #c9a961 !important;
  background-color: rgba(201, 169, 97, 0.1) !important;
  border-radius: 8px !important;
}

nav .active *,
nav a.active * {
  color: #c9a961 !important;
}

/* ============== بطاقات المنتجات ============== */
salla-product-card,
.s-product-card-content,
.s-product-card-vertical {
  border-radius: 14px !important;
  border: 1px solid rgba(201, 169, 97, 0.2) !important;
  transition: all 0.3s ease !important;
  overflow: hidden !important;
}

salla-product-card:hover,
.s-product-card-content:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 15px 35px rgba(201, 169, 97, 0.25) !important;
  border-color: #c9a961 !important;
}

/* ============== الفوتر ============== */
footer,
.s-footer {
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%) !important;
  border-top: 3px solid #c9a961 !important;
  color: #e8e8e8 !important;
}

footer a,
.s-footer a {
  color: #d0d0d0 !important;
}

footer a:hover {
  color: #c9a961 !important;
}

footer h3,
footer h4,
.s-footer h3,
.s-footer h4 {
  color: #c9a961 !important;
}

/* ============== شريط التمرير ============== */
::-webkit-scrollbar {
  width: 10px !important;
}

::-webkit-scrollbar-track {
  background: #f5f5f5 !important;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #c9a961 0%, #8b7340 100%) !important;
  border-radius: 10px !important;
}

/* ====================================================
   ============== الموبايل (الأهم!) ==============
   ==================================================== */

@media (max-width: 768px) {
  
  /* الهيدر في الموبايل */
  header,
  .s-header {
    padding: 10px 12px !important;
  }
  
  /* الشعار في الموبايل - أصغر */
  header img,
  .logo img {
    max-height: 42px !important;
    border-width: 2px !important;
    padding: 2px !important;
  }
  
  /* شريط البحث في الموبايل */
  header input[type="search"],
  header input[type="text"] {
    padding: 8px 16px !important;
    font-size: 13px !important;
  }
  
  /* أزرار الأيقونات في الموبايل */
  header > div > a,
  header > div > button,
  header a[class*="cart"],
  header a[class*="lang"] {
    width: 36px !important;
    height: 36px !important;
  }
  
  header svg,
  header i {
    width: 18px !important;
    height: 18px !important;
  }
  
  /* عداد السلة في الموبايل */
  header sup,
  header .badge {
    font-size: 10px !important;
    min-width: 18px !important;
    height: 18px !important;
  }
  
  /* زر تسجيل الدخول في الموبايل */
  a[href*="login"] {
    padding: 7px 14px !important;
    font-size: 12px !important;
  }
  
  /* القائمة الرئيسية في الموبايل - قابلة للسحب */
  nav.menu,
  nav.s-menu,
  .s-menu-container,
  .menu-container,
  salla-menu {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
    padding: 10px 8px !important;
    scrollbar-width: none !important;
  }
  
  nav.menu::-webkit-scrollbar,
  nav.s-menu::-webkit-scrollbar,
  .menu-container::-webkit-scrollbar {
    display: none !important;
  }
  
  nav.menu a,
  nav.s-menu a,
  .menu-container a {
    padding: 6px 12px !important;
    font-size: 13px !important;
    display: inline-block !important;
  }
  
  /* بطاقات المنتجات في الموبايل */
  salla-product-card {
    border-radius: 10px !important;
  }
  
  salla-product-card:hover {
    transform: translateY(-3px) !important;
  }
  
  /* الفوتر في الموبايل */
  footer,
  .s-footer {
    text-align: center !important;
    padding: 30px 15px !important;
  }
}

/* الموبايل الصغير - شاشة أصغر من 480px */
@media (max-width: 480px) {
  
  header,
  .s-header {
    padding: 8px 10px !important;
  }
  
  header img,
  .logo img {
    max-height: 36px !important;
  }
  
  header input {
    padding: 7px 14px !important;
    font-size: 12px !important;
  }
  
  header > div > a,
  header > div > button,
  header a[class*="cart"],
  header a[class*="lang"] {
    width: 32px !important;
    height: 32px !important;
  }
  
  header svg,
  header i {
    width: 16px !important;
    height: 16px !important;
  }
  
  a[href*="login"] {
    padding: 6px 12px !important;
    font-size: 11px !important;
  }
  
  nav.menu a,
  nav.s-menu a,
  .menu-container a {
    padding: 5px 10px !important;
    font-size: 12px !important;
  }
}