/* ========================== */
/* الأساسيات */
body {
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  background: #f8f9fa;
  color: #222;
}

/* ========================== */
/* الهيدر */
.site-header {
  background: #003366;
  color: #fff;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.logo { 
  display: flex; 
  align-items: center; 
  gap: 20px; 
}
.logo img { 
  height: 60px; 
}
.logo span { 
  font-size: 20px; 
  font-weight: bold; 
  color: #fff; 
}

.nav-links {
  display: flex;
  gap: 15px;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.auth-btns {
  display: flex;
  gap: 10px;
}
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: #ff9900;
  color: #fff;
}
.btn-secondary {
  background: #fff;
  color: #003366;
}

/* ========================== */
/* البانر الرئيسي */
.hero {
  text-align: center;
  padding: 40px 20px;
  background: #e6f0ff;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.hero h1 { 
  font-size: 24px; 
  color: #003366; 
  margin-bottom: 15px; 
}
.search-bar {
  max-width: 600px;
  margin: 20px auto;
  display: flex;
}
.search-bar input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px 0 0 6px;
}
.search-bar button {
  background: #ff9900;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

/* ========================== */
/* أقسام المركبات */
.categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 20px;
}
.category-item {
  background: white;
  padding: 8px 16px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  color: #003366;
  font-weight: bold;
  text-decoration: none;
  min-width: 100px;
  text-align: center;
}
.category-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* ========================== */
/* الإعلانات */
.ads-section {
  padding: 20px;
}
.section-title {
  text-align: center;
  color: #003366;
  margin: 20px 0 30px;
  font-size: 22px;
}
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.ad-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.ad-image {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}
.ad-image img {
  max-height: 160px;
  max-width: 100%;
  object-fit: contain;
}
.ad-content {
  padding: 15px;
}
.ad-title {
  font-size: 16px;
  color: #003366;
  margin-bottom: 10px;
  min-height: 40px;
}
.ad-price {
  font-weight: bold;
  color: #ff9900;
  font-size: 16px;
  margin: 10px 0;
}
.ad-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

/* ========================== */
/* الفوتر */
.site-footer {
  background: #102a72;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}
.site-footer a {
  color: #ffcc00;
  text-decoration: none;
  margin: 0 8px;
}

/* رسالة النجاح */
.alert-success {
  background: #d4edda;
  color: #155724;
  padding: 12px;
  margin: 20px auto;
  max-width: 600px;
  text-align: center;
  border-radius: 6px;
  font-weight: bold;
  border: 1px solid #c3e6cb;
}

/* ========================== */
/* الجوال */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .auth-btns {
    width: 100%;
    justify-content: center;
  }
  .hero h1 {
    font-size: 20px;
  }
  .categories {
    gap: 8px;
  }
  .category-item {
    padding: 6px 12px;
    font-size: 13px;
  }
}