 body {
    font-family: "Tahoma", sans-serif;
    background-color: #f9fafb;
    color: #111827;
    margin: 0;
    padding: 0;
    line-height: 1.8;
  }

/* تعديل خاص بالصفحة اللي فيها special-header */
.special-header {
  
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  flex-direction: row-reverse; /* يعكس الاتجاه */
}


header {
 
  flex-direction: reverse; /* ده اللي هيعكس الاتجاه */
}

header nav a {
  color: white;
  text-decoration: none;
  margin: 0 15px;
  font-weight: bold;
  
}

header nav a:hover {
  text-decoration: underline;
}

main {
  
  padding: 15px 20px;
}

.hero {
  text-align: center;
  padding: 50px 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 10px;
  margin-bottom: 30px;
}

.hero h2 {
  font-size: 2rem;
}

.hero p {
  font-size: 1.2rem;
  margin: 15px 0;
}

.btn {
  background-color: #fbbf24;
  padding: 10px 20px;
  color: #1e293b;
  font-weight: bold;
  border-radius: 5px;
  text-decoration: none;
}

.btn:hover {
  background-color: #f59e0b;
}

.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.feature-card {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  width: 250px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.feature-card h3 {
  margin-bottom: 10px;
}

/* بطاقات الأجزاء */
.card {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  margin: 10px;
  display: inline-block;
  width: 200px;
  background-color: #fff;
  cursor: pointer;
  transition: box-shadow 0.2s;
  text-align: center;
}

.card:hover {
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
}

/* فلاتر المحاكي */
#filter-bar {
  margin-bottom: 15px;
}

#filter-bar select {
  margin-right: 5px;
  padding: 3px;
}


.result-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  color: #333;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  font-size: 1.2rem;
  text-align: center;
  z-index: 999;
}

.result-message.hidden {
  display: none;
}

/* شريط البحث */
.search-wrap {
  display: flex;
  justify-content: center;
  margin: 20px auto 25px;
}

.search-wrap input {
  width: min(800px, 90%);
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.search-wrap input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102,126,234,0.2);
}

/* شبكة العناصر */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  align-items: stretch;
}

/* كارت القطعة (موجود سابقًا – نضمن الشكل المودرن) */
.card {
  border: 1px solid #e5e7eb;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  text-align: center;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 8px;
}
.card .badge {
  display: inline-block;
  background: #eef2ff;
  color: #4338ca;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .8rem;
  margin-bottom: 6px;
}

/* منطقة التجميعة */
.build-section {
  margin-top: 28px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}
.build-list .build-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: .95rem;
}
.build-item .type {
  font-weight: 700;
  color: #1e293b;
}
.build-item .name {
  color: #334155;
}
.build-item .price {
  color: #0f766e;
  font-weight: 700;
}
.build-item button {
  border: none;
  background: #ef4444;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.build-item button:hover {
  background: #dc2626;
}

.total { font-size: 1.05rem; margin-top: 10px; }

/* الرسالة النهائية (موجودة سابقًا – نعيدها للتأكيد) */
.result-message {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2,6,23,0.45);
  z-index: 9999;
}
.result-message.hidden { display: none; }
.result-message > div {
  background: #fff;
  padding: 24px 28px;
  border-radius: 14px;
  width: min(90%, 420px);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.result-message h2 { margin: 0 0 8px; font-size: 1.5rem; }
.result-message p { margin: 0; font-size: 1.05rem; }
.result-message .ok-btn {
  margin-top: 14px;
  border: none;
  background: #10b981;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.result-message .ok-btn:hover { background: #059669; }



/* الرسالة النهائية في المنتصف */
/* الرسالة النهائية + الخلفية */
.result-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  color: #333;
  padding: 24px 28px;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  font-size: 1.2rem;
  text-align: center;
  z-index: 2001;
  max-width: 400px;
  line-height: 1.5;
  display: none; /* مخفية افتراضيًا */
}

.result-message.show {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

/* تأثير الظهور */
@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -55%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* الخلفية الشفافة وراء الرسالة */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: none;
}

.overlay.show {
  display: block;
}

header {
  background-color: #1e293b;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
  width: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid white; /* اختياري لإضافة إطار أبيض حول الشعار */
}




.card22 {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  margin: 10px;
  display: inline-block;
  width: 550px;
  background-color: #fff;
  cursor: pointer;
  transition: box-shadow 0.2s;
  text-align: center;
}


