:root{
  --bg:#0f1115;
  --card:#141823;
  --muted:#a5adbb;
  --text:#e8ebf1;
  --brand:#4da3ff;
  --brand-2:#00d1b2;
  --danger:#ff5c7a;
  --shadow:0 10px 30px rgba(0,0,0,.25);
  --radius:14px;
  --bottom-nav-height:70px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Tajawal", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:linear-gradient(180deg,#0c0e14, #0f1115 30% 70%, #0c0e14);
  color:var(--text);
  transition: background 0.3s ease, color 0.3s ease;
  padding-bottom: var(--bottom-nav-height);
}

/* ============================================
   Bottom Navigation Bar (Mobile Only)
   ============================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--card);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 9999;
  padding: 0 8px;
}

.bottom-nav-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 0.2s ease;
  min-width: 64px;
  min-height: 56px;
  gap: 4px;
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
  color: var(--brand);
  background: rgba(77, 163, 255, 0.12);
}

.bottom-nav-link i {
  font-size: 22px;
}

.bottom-nav-link span {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

/* Light theme support for bottom nav */
[data-theme="light"] .bottom-nav {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

[data-theme="light"] .bottom-nav-link {
  color: #64748b;
}

[data-theme="light"] .bottom-nav-link:hover,
[data-theme="light"] .bottom-nav-link.active {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

/* Show bottom nav only on small screens */
@media (max-width: 600px) {
  .bottom-nav {
    display: block;
  }
  
  body {
    padding-bottom: var(--bottom-nav-height);
  }
  
  /* Hide the old mobile menu on small screens */
  .mobile-menu {
    display: none !important;
  }
}

/* تحسينات خاصة للوضع الفاتح */
[data-theme="light"] body {
  background: linear-gradient(180deg, #f8fafc, #ffffff 20% 80%, #f1f5f9);
  color: #0f172a;
}

.container{width:min(1200px,92%);margin-inline:auto}

/* ============================================
   New Header - Clean Design
   ============================================ */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.currency-btn {
  background: var(--brand);
  color: #0b0e13;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: "Tajawal", sans-serif;
  font-weight: 600;
  font-size: 14px;
}

.cart-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 18px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-btn span {
  background: var(--brand);
  color: #0b0e13;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ============================================
   Hero Section - Genesis Car
   ============================================ */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('https://images.unsplash.com/photo-1709085582795-4aca78fd76a2?q=80&w=1920&auto=format&fit=crop') center/cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 17, 21, 0.7) 0%,
    rgba(15, 17, 21, 0.5) 50%,
    rgba(15, 17, 21, 0.85) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 20px;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(24px, 5vw, 48px);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 50px;
  line-height: 1.4;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.search-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50px;
  padding: 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-family: "Tajawal", sans-serif;
  color: #1a1a1a;
  outline: none;
}

.search-input::placeholder {
  color: #888;
}

.search-btn {
  background: var(--brand);
  color: #0b0e13;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.search-btn:hover {
  background: #3a8fe8;
  transform: scale(1.05);
}

/* ============================================
   Brands Section
   ============================================ */
.brands-section {
  padding: 60px 0;
  background: linear-gradient(180deg, #0c0e14, #0f1115);
}

.brands-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.brand-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 30px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 160px;
}

.brand-card.active {
  border-color: var(--brand);
}

.brand-card.active:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(77, 163, 255, 0.2);
}

.brand-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.brand-logo {
  margin-bottom: 12px;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.coming-soon {
  font-size: 12px;
  color: var(--brand);
  margin-top: 8px;
}

/* ============================================
   Models Section - Grid of 4
   ============================================ */
.models-section {
  padding: 60px 0;
  background: linear-gradient(180deg, #0c0e14, #0f1115);
}

.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 40px;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.model-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.model-card:hover {
  transform: translateY(-8px);
  border-color: var(--brand);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.model-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.model-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.model-card:hover .model-image img {
  transform: scale(1.1);
}

.model-name {
  padding: 16px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* ============================================
   Features Section - Why Choose Us
   ============================================ */
.features-section {
  padding: 60px 0;
  background: #0f1115;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 30px rgba(77, 163, 255, 0.1);
}

.feature-icon {
  font-size: 40px;
  color: var(--brand);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  padding: 60px 0;
  background: linear-gradient(180deg, #0f1115, #0c0e14);
}

.cta-button {
  display: block;
  background: var(--brand);
  color: #0b0e13;
  text-decoration: none;
  padding: 20px 40px;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s ease;
  max-width: 500px;
  margin: 0 auto;
}

.cta-button:hover {
  background: #3a8fe8;
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(77, 163, 255, 0.3);
}

/* ============================================
   Navigation Menu
   ============================================ */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.2), rgba(0, 209, 178, 0.2));
  color: var(--text);
}

.notification-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 16px;
}

.menu-toggle {
  display: none;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 16px;
}

.mobile-menu {
  display: none;
  background: rgba(15, 17, 21, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
}

.mobile-menu.active {
  display: block;
}

.mobile-nav-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  transition: background 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(77, 163, 255, 0.15);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .models-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    min-height: 60vh;
  }
}

@media (max-width: 600px) {
  .models-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .model-image {
    height: 120px;
  }
  
  .model-name {
    padding: 12px;
    font-size: 16px;
  }
  
  .hero-title {
    font-size: 22px;
    margin-bottom: 30px;
  }
  
  .search-container {
    flex-direction: row;
    border-radius: 50px;
    padding: 4px;
    max-width: 90%;
  }
  
  .search-input {
    width: 100%;
    text-align: start;
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-top: 0;
    font-size: 12px;
    flex-shrink: 0;
  }
  
  .cta-button {
    font-size: 16px;
    padding: 16px 24px;
  }
}

.site-header{position:sticky;top:0;z-index:50;background:rgba(15,17,21,.65);backdrop-filter:saturate(150%) blur(12px);border-bottom:1px solid rgba(255,255,255,.06)}

/* Header محسن للوضع الفاتح */
[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:14px 0}
.logo{color:var(--text);text-decoration:none;font-weight:700;letter-spacing:.5px}

/* Logo محسن للوضع الفاتح */
[data-theme="light"] .logo {
  color: #0f172a;
  font-weight: 800;
}
.nav{display:flex;align-items:center;gap:18px}
.nav{flex-wrap:wrap}
.nav-link{color:var(--muted);text-decoration:none;padding:8px 12px;border-radius:10px;transition:.2s}
.nav-link:hover{background:rgba(255,255,255,.06);color:var(--text)}
.nav-link.active{background:linear-gradient(135deg,rgba(77,163,255,.18),rgba(0,209,178,.18));color:var(--text)}

/* تحسينات للهواتف المحمولة */
@media (max-width: 768px) {
  .nav {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 8px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
  }
  
  .nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  
  .nav-link {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  
  .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
  }
  
  .nav-link:active {
    transform: translateY(0) scale(0.98);
  }
  
  .nav-link.active {
    background: linear-gradient(135deg, rgba(77, 163, 255, 0.2), rgba(0, 209, 178, 0.2));
    border-color: rgba(77, 163, 255, 0.3);
    box-shadow: 0 2px 8px rgba(77, 163, 255, 0.2);
  }
  
  /* تحسينات للوضع الفاتح في الهواتف */
  [data-theme="light"] .nav-link {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.8);
    color: #475569;
  }
  
  [data-theme="light"] .nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
  }
  
  [data-theme="light"] .nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  }
  
  /* تحسينات إضافية للهواتف الصغيرة */
  @media (max-width: 480px) {
    .nav {
      gap: 6px;
      padding: 6px 0;
    }
    
    .nav-link {
      padding: 8px 12px;
      font-size: 13px;
      border-radius: 16px;
    }
  }
  
  /* تحسينات للهواتف الكبيرة */
  @media (min-width: 481px) and (max-width: 768px) {
    .nav {
      gap: 10px;
      padding: 10px 0;
    }
    
    .nav-link {
      padding: 12px 18px;
      font-size: 15px;
      border-radius: 22px;
    }
  }
}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */
.cart-btn{background:transparent;color:var(--text);border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:8px 12px;cursor:pointer}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

.hero{padding:56px 0;}
.hero-inner{display:grid;grid-template-columns:1.1fr .9fr;gap:28px;align-items:center}
.hero-text h1{margin:0 0 8px;font-size:clamp(28px,4vw,44px)}
.hero-text p{margin:0 0 18px;color:var(--muted)}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */
.btn{display:inline-block;padding:10px 18px;border-radius:12px;text-decoration:none}
.btn-primary{background:linear-gradient(135deg,var(--brand),var(--brand-2));color:#0b0e13;font-weight:700}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */
.hero-art{height:260px;border-radius:22px;background:radial-gradient(1200px 120px at 60% -10%, rgba(77,163,255,.35), transparent 60%),
 linear-gradient(135deg, rgba(77,163,255,.15), rgba(0,209,178,.15)), url('https://images.unsplash.com/photo-1595433707802-6b2626efbf0f?q=80&w=1600&auto=format&fit=crop') center/cover;box-shadow:var(--shadow)}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

.section{padding:36px 0}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */
.link{color:var(--brand);text-decoration:none}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

.filters{display:flex;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.input,.select{background:#0c0f15;border:1px solid rgba(255,255,255,.12);color:var(--text);border-radius:12px;padding:10px 12px;outline:none;min-width:180px;font-size:14px}
.input::placeholder{color:#7d8799}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
.card{background:var(--card);border:1px solid rgba(255,255,255,.06);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column;cursor:pointer;transition:transform .2s,box-shadow .2s}
.card:active{transform:scale(.98)}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */
.card .media{aspect-ratio:4/3;background:#0a0d12}
.card img{width:100%;height:100%;object-fit:contain}
.card .content{padding:12px}
.title{margin:0 0 6px;font-size:16px}
.price{margin:0;color:var(--brand-2);font-weight:700}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */
.tag{display:inline-block;margin-top:6px;background:rgba(0,209,178,.16);color:var(--brand-2);padding:4px 8px;border-radius:999px;font-size:12px}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */
.card .actions{display:flex;gap:8px;margin-top:10px}
.btn-secondary{background:#10141c;color:var(--text);border:1px solid rgba(255,255,255,.12)}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

.site-footer{border-top:1px solid rgba(255,255,255,.06);padding:18px 0;color:var(--muted);background:#0b0e13}

.footer-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 8px;
}

.footer-contact-link:hover {
  color: var(--brand);
  background: rgba(77, 163, 255, 0.1);
}

.footer-contact-link i {
  font-size: 16px;
}

/* Light theme support for footer contact */
[data-theme="light"] .footer-contact-link {
  color: #64748b;
}

[data-theme="light"] .footer-contact-link:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

.cart-fab{position:fixed;left:14px;bottom:14px;background:linear-gradient(135deg,var(--brand),var(--brand-2));color:#0b0e13;border:none;border-radius:999px;padding:12px 16px;font-weight:700;cursor:pointer;box-shadow:var(--shadow);z-index:60}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

@media (max-width:900px){
  .hero-inner{grid-template-columns:1fr}
  .hero-art{height:200px}
}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

@media (max-width:600px){
  .header-inner{padding:10px 0}
  .nav-link,.cart-btn{padding:8px 10px}
  .btn,.btn-primary,.btn-secondary{padding:10px 12px}
  
  /* تحسينات البطاقات للهواتف */
  .grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .card{border-radius:12px}
  .card .media{aspect-ratio:1/1}
  .card .content{padding:10px}
  .card .title{font-size:14px}
  .card .price{font-size:15px}
  .card .actions{flex-direction:column;gap:6px}
  .card .actions .btn{width:100%;text-align:center;padding:8px 10px;font-size:13px}
  .card .tag{font-size:10px;padding:3px 6px}
  .card .description{display:none}
  
  /* تحسينات المودال للهواتف */
  #detailsOverlay{align-items:flex-end}
  #detailsOverlay>div{width:100%;max-width:100%;border-radius:20px 20px 0 0;max-height:90vh;overflow-y:auto}
  
  /* تحسينات الفلاتر للهواتف */
  .filters{flex-direction:column}
  .input,.select{width:100%;min-width:100%}
}

/* Order modal tweaks (minimal) */
#orderOverlay .input{background:#0b0e13;border:1px solid rgba(255,255,255,.12);color:var(--text);border-radius:12px;padding:10px 12px}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* إصلاح عام لألوان النصوص في الحقول - مهم جداً */
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  outline: none !important;
}

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

/* تم نقل أنماط الوضع الفاتح إلى الأعلى */

[data-theme="light"] #settingsTab > div {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] #settingsTab > div > div {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] #settingsTab > div > div > div {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] #settingsTab h3 {
  color: #0f172a !important;
}

[data-theme="light"] #settingsTab p {
  color: #64748b !important;
}

[data-theme="light"] .tab-content > div {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] .tab-content > div > div {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] #totalProducts,
[data-theme="light"] #totalOrders,
[data-theme="light"] #newOrders {
  color: #0f172a !important;
}

/* إصلاح ألوان مربعات معلومات البائعين */
[data-theme="light"] .seller-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .seller-card:hover {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .seller-card h3 {
  color: #0f172a !important;
}

[data-theme="light"] .seller-card p {
  color: #64748b !important;
}

[data-theme="light"] .seller-card .status {
  color: #0f172a !important;
}

[data-theme="light"] .seller-card .status.pending {
  background: #fef3c7 !important;
  color: #92400e !important;
}

[data-theme="light"] .seller-card .status.approved {
  background: #d1fae5 !important;
  color: #065f46 !important;
}

[data-theme="light"] .seller-card .status.rejected {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

[data-theme="light"] .seller-card button {
  background: #3b82f6 !important;
  color: white !important;
  border: none !important;
}

[data-theme="light"] .seller-card button:hover {
  background: #2563eb !important;
}

[data-theme="light"] .seller-card button.secondary {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .seller-card button.secondary:hover {
  background: #e2e8f0 !important;
}

/* إصلاح شامل لجميع المربعات السوداء */
[data-theme="light"] #sellersList > div {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

/* إصلاح شامل لجميع العناصر في قائمة البائعين */
[data-theme="light"] #sellersList * {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] #sellersList * p {
  color: #64748b !important;
}

[data-theme="light"] #sellersList * h3 {
  color: #0f172a !important;
}

[data-theme="light"] #sellersList * span {
  color: #0f172a !important;
}

/* ============================================
   Mobile Product Card - New Design
   ============================================ */

/* Grid Layout for Products - Mobile (default) */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  align-items: stretch;
}

/* Desktop: 2 columns */
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
    padding: 0;
  }
}

/* Desktop Large: 3 columns */
@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    padding: 0;
  }
}

/* ============================================
   Product Card - Desktop
   ============================================ */
.product-card-mobile {
  background: var(--card-bg, #141823);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
              0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

.product-card-mobile:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 
              0 10px 10px -5px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-color, #4a90e2);
}

.product-card-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-image-container {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  background: #1a1a1a;
  flex-shrink: 0;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
}

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

.product-info {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 8px;
  flex: 1;
}

.product-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #e8ebf1);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-company {
  display: inline-block;
  font-size: 10px;
  color: #4a90e2;
  background: rgba(74, 144, 226, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.product-description {
  font-size: 13px;
  color: var(--text-secondary, #a5adbb);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.product-badge {
  font-size: 10px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.product-seller {
  font-size: 10px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.product-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-color, #4a90e2);
}

.product-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-add-cart {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-cart:hover {
  background: linear-gradient(135deg, #357abd, #2d6cb5);
  transform: scale(1.02);
}

.btn-order {
  flex: 1;
  background: transparent;
  color: var(--text-primary, #e8ebf1);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-order:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color, #4a90e2);
}

/* ============================================
   Product Card - Mobile/Tablet (max-width: 768px)
   تصميم يشبه iqcars.net - الصورة على اليسار
   ============================================ */
@media (max-width: 768px) {
  /* البطاقات بأكملها - عرض كامل مع هوامش */
  .product-card-mobile {
    height: auto;
    min-height: auto;
    border-radius: 12px;
    display: flex;
    flex-direction: row;
    width: 100%;
    margin: 0 0 12px 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  /* الحاوية الداخلية - الصورة على اليسار */
  .product-card-inner {
    display: flex;
    flex-direction: row;
    flex: 1;
    height: 100%;
    width: 100%;
    min-height: 130px;
  }
  
  /* الصورة على اليسار - تملأ كامل الجهة */
  .product-image-container {
    width: 130px;
    min-width: 130px;
    height: auto;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
  }
  
  .product-image-container > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    align-self: stretch;
  }
  
  .product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  /* معلومات المنتج - جهة اليمين */
  .product-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    flex: 1;
    padding: 10px 12px;
    gap: 4px;
    min-height: 130px;
    text-align: right;
  }
  
  .product-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary, #e8ebf1);
    line-height: 1.3;
    order: 1;
  }
  
  .product-company {
    font-size: 10px;
    order: 2;
  }
  
  .product-description {
    display: none;
    order: 3;
  }
  
  .product-tags {
    order: 4;
    justify-content: flex-end;
  }
  
  .product-price-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-top: auto;
    order: 5;
    width: 100%;
  }
  
  .product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-color, #4a90e2);
  }
  
  /* الأزرار في أسفل جهة اليسار تحت السعر */
  .product-actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
    width: 100%;
    order: 6;
    margin-top: 8px;
  }
  
  .btn-add-cart,
  .btn-order {
    flex: 1;
    padding: 8px 10px;
    font-size: 11px;
    border-radius: 6px;
    min-width: 0;
  }
  
  .btn-add-cart {
    padding: 8px 12px;
  }
  
  .btn-order {
    padding: 8px 12px;
  }
  
  /* الشبكة - عمود واحد */
  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 12px;
  }
  
  /* الفلتات ثابتة في الأعلى */
  .filters {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
}

/* ============================================
   Extra Small Mobile (max-width: 400px)
   ============================================ */
@media (max-width: 400px) {
  .product-card-inner {
    min-height: 110px;
  }
  
  .product-image-container {
    width: 110px;
    min-width: 110px;
    height: auto;
    border-radius: 6px 0 0 6px;
  }
  
  .product-info {
    padding: 8px 10px;
    gap: 3px;
  }
  
  .product-title {
    font-size: 12px;
  }
  
  .product-price {
    font-size: 14px;
  }
  
  .product-actions {
    gap: 4px;
    margin-top: 6px;
  }
  
  .btn-add-cart,
  .btn-order {
    padding: 6px 8px;
    font-size: 10px;
  }
}

/* ============================================
   Light Theme Support
   ============================================ */
[data-theme="light"] .product-card-mobile {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 
              0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .product-card-mobile:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
              0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-color: #3b82f6;
}

[data-theme="light"] .product-image-container {
  background: #f1f5f9;
}

[data-theme="light"] .product-title {
  color: #0f172a;
}

[data-theme="light"] .product-company {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

[data-theme="light"] .product-description {
  color: #64748b;
}

[data-theme="light"] .product-price {
  color: #3b82f6;
}

[data-theme="light"] .btn-order {
  color: #0f172a;
  border-color: #e2e8f0;
}

[data-theme="light"] .btn-order:hover {
  background: #f1f5f9;
  border-color: #3b82f6;
}

/* ============================================
   Mobile Light Theme - Product Card
   ============================================ */
@media (max-width: 768px) {
  [data-theme="light"] .product-card-mobile {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  }
  
  [data-theme="light"] .product-card-mobile:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
  }
  
  [data-theme="light"] .product-image-container {
    background: #f1f5f9;
  }
  
  [data-theme="light"] .product-title {
    color: #0f172a;
  }
  
  [data-theme="light"] .product-price {
    color: #3b82f6;
  }
  
  [data-theme="light"] .btn-add-cart {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
  }
  
  [data-theme="light"] .btn-order {
    color: #0f172a;
    border-color: #e2e8f0;
    background: transparent;
  }
  
  [data-theme="light"] .btn-order:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
  }
  
  [data-theme="light"] .product-price-row {
    align-items: flex-end;
  }
  
  [data-theme="light"] .product-tags {
    justify-content: flex-end;
  }
}

/* ============================================
   Skeleton Loader - Loading State
   ============================================ */

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* ============================================
   Empty State - Mobile Responsive
   ============================================ */
.empty-state-container {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

@media (max-width: 480px) {
  .empty-state-container {
    padding: 30px 12px;
  }
  
  .empty-state-container .empty-icon {
    font-size: 40px !important;
    margin-bottom: 12px !important;
  }
  
  .empty-state-container .empty-title {
    font-size: 18px !important;
    margin-bottom: 10px !important;
  }
  
  .empty-state-container .empty-reason {
    font-size: 12px !important;
    max-width: 95% !important;
  }
  
  .empty-state-container .reset-btn {
    background: #4da3ff !important;
    padding: 10px 24px !important;
    font-size: 13px !important;
    min-width: 160px !important;
  }
  
  .empty-state-container .suggestion-chip {
    padding: 5px 10px !important;
    font-size: 11px !important;
  }
  
  .empty-state-container .popular-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
  }
  
  /* Fix for product cards in empty state - mobile */
  .empty-state-container .popular-grid .product-card-mobile {
    min-height: auto !important;
    height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  .empty-state-container .popular-grid .product-card-inner {
    min-height: auto !important;
    display: flex !important;
    flex-direction: row !important;
  }
  
  .empty-state-container .popular-grid .product-image-container {
    width: 80px !important;
    min-width: 80px !important;
    aspect-ratio: auto !important;
    height: 80px !important;
  }
  
  .empty-state-container .popular-grid .product-info {
    padding: 8px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  
  .empty-state-container .popular-grid .product-title {
    font-size: 12px !important;
    -webkit-line-clamp: 2 !important;
    margin-bottom: 4px !important;
  }
  
  .empty-state-container .popular-grid .product-price {
    font-size: 13px !important;
  }
  
  .empty-state-container .popular-grid .product-actions {
    display: none !important;
  }
  
  .empty-state-container .popular-title {
    font-size: 14px !important;
    margin: 8px 0 12px 0 !important;
  }
}

/* Popular grid in empty state - compact cards */
.empty-state-container .popular-grid > div {
  background: var(--card) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

.empty-state-container .popular-grid > div:hover {
  transform: translateY(-3px) !important;
}

/* Desktop/Tablet styles for empty state */
@media (min-width: 768px) {
  .empty-state-container {
    padding: 60px 20px;
  }
  
  .empty-state-container .empty-icon {
    font-size: 64px !important;
    margin-bottom: 20px !important;
  }
  
  .empty-state-container .empty-title {
    font-size: 24px !important;
    margin-bottom: 12px !important;
  }
  
  .empty-state-container .empty-reason {
    font-size: 14px !important;
    max-width: 90% !important;
  }
  
  .empty-state-container .reset-btn {
    background: #4da3ff !important;
    padding: 12px 28px !important;
    font-size: 14px !important;
    min-width: 180px !important;
  }
  
  .empty-state-container .suggestion-chip {
    padding: 6px 14px !important;
    font-size: 13px !important;
  }
  
  .empty-state-container .popular-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    justify-content: center !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
  }
  
  .empty-state-container .popular-title {
    font-size: 18px !important;
    margin: 10px 0 20px 0 !important;
  }
  
  /* Desktop product cards in empty state */
  .empty-state-container .popular-grid .product-card-mobile {
    min-height: 350px !important;
  }
}

/* Extra large screens */
@media (min-width: 1200px) {
  .empty-state-container .popular-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    max-width: 100% !important;
    padding: 0 20px !important;
  }
}

@media (min-width: 768px) {
  .skeleton-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .skeleton-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skeleton-card {
  background: var(--card-bg, #141823);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  border-radius: 20px;
  overflow: hidden;
}

.skeleton-inner {
  display: flex;
  flex-direction: row;
  padding: 12px;
  gap: 12px;
}

.skeleton-image {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background: linear-gradient(90deg, 
    #1a1a1a 25%, 
    #2a2a2a 50%, 
    #1a1a1a 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-title {
  height: 16px;
  width: 80%;
  border-radius: 4px;
  background: linear-gradient(90deg, 
    #1a1a1a 25%, 
    #2a2a2a 50%, 
    #1a1a1a 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  height: 12px;
  width: 60%;
  border-radius: 4px;
  background: linear-gradient(90deg, 
    #1a1a1a 25%, 
    #2a2a2a 50%, 
    #1a1a1a 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text.short {
  width: 40%;
}

.skeleton-price {
  height: 18px;
  width: 35%;
  border-radius: 4px;
  margin-top: 4px;
  background: linear-gradient(90deg, 
    #1a1a1a 25%, 
    #2a2a2a 50%, 
    #1a1a1a 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.skeleton-btn {
  height: 32px;
  flex: 1;
  border-radius: 8px;
  background: linear-gradient(90deg, 
    #1a1a1a 25%, 
    #2a2a2a 50%, 
    #1a1a1a 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Light theme for skeleton */
[data-theme="light"] .skeleton-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .skeleton-image,
[data-theme="light"] .skeleton-title,
[data-theme="light"] .skeleton-text,
[data-theme="light"] .skeleton-price,
[data-theme="light"] .skeleton-btn {
  background: linear-gradient(90deg, 
    #e2e8f0 25%, 
    #f1f5f9 50%, 
    #e2e8f0 75%
  );
  background-size: 200% 100%;
}

/* Responsive adjustments for skeleton */
@media (max-width: 360px) {
  .skeleton-inner {
    padding: 10px;
    gap: 10px;
  }
  
  .skeleton-image {
    width: 60px;
    height: 60px;
  }
}

@media (min-width: 480px) {
  .skeleton-inner {
    padding: 14px;
    gap: 14px;
  }
  
  .skeleton-image {
    width: 80px;
    height: 80px;
  }
}

