/* --- حاوية البحث الرئيسية --- */
.search-container {
  background-color: #fff;
  border-radius: 12px;
  padding: 40px 20px;
  margin-top: 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* --- العنوان الرئيسي --- */
.shop-title {
  font-size: 1.8rem;
  margin-bottom: 10px; /* مسافة صغيرة أسفل العنوان لترك مجال للنص الإرشادي */
  color: #333;
  font-weight: 700;
}

/* --- النص الإرشادي الجديد --- */
.search-hint {
  color: #666;
  font-size: 1rem;
  margin-bottom: 25px; /* مسافة قبل صندوق البحث */
}

/* --- شريط البحث الرئيسي --- */
.main-search-bar {
  max-width: 800px;
  margin: 0 auto 30px;
}

/* --- غلاف المدخل (Input Wrapper) --- */
.search-input-wrapper {
  display: flex;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* تأثير عند الضغط على المدخل */
.search-input-wrapper:focus-within {
  border-color: #f9a825; /* اللون الأصفر المميز */
  box-shadow: 0 0 0 3px rgba(249, 168, 37, 0.2);
}

/* --- حقل الإدخال النصي --- */
#filter-search {
  flex: 1;
  padding: 15px 20px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  outline: none;
  width: 100%;
}

/* --- زر البحث --- */
.main-search-btn {
  background: #f9a825;
  color: #111;
  border: none;
  padding: 0 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.1s;
}

.main-search-btn:hover {
  background: #f09800;
}

.main-search-btn svg {
  stroke-width: 3; /* جعل أيقونة البحث أكثر وضوحاً */
}

/* --- إخفاء عنوان الـ SEO عن العين (فقط لمحركات البحث) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- روابط الكلمات الدلالية --- */
.keyword-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 25px 0;
  justify-content: center;
}

.keyword-tag {
  display: inline-block;
  padding: 8px 18px;
  background-color: #f0f2f5;
  color: #444;
  text-decoration: none;
  border-radius: 50px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  font-weight: 500;
}

.keyword-tag:hover {
  background-color: #e4e6e9;
  border-color: #ddd;
  color: #000;
  transform: translateY(-2px);
}

.keyword-tag.highlight {
  background-color: #fff4e5;
  color: #d97706;
  border-color: #fcd34d;
}

.keyword-tag.highlight:hover {
  background-color: #fef3c7;
  border-color: #fbbf24;
}

/* --- نتائج البحث --- */
.shop-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.shop-content .product-box {
  flex: 0 1 calc(25% - 1.5rem);
  min-width: 250px;
}

/* --- مؤشر التحميل --- */
.products-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
}

.lds-dual-ring {
  display: inline-block;
  width: 60px;
  height: 60px;
}

.lds-dual-ring:after {
  content: " ";
  display: block;
  width: 48px;
  height: 48px;
  margin: 6px;
  border-radius: 50%;
  border: 5px solid #f9a825;
  border-color: #f9a825 transparent #f9a825 transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- رسالة لا توجد نتائج --- */
.no-results-suggestions {
  text-align: center;
  padding: 40px 20px;
  background: #fff9e6;
  border-radius: 12px;
  border: 1px solid #ffeeba;
  margin-top: 20px;
}

.suggest-links {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

/* --- التجاوب مع الشاشات الصغيرة (Mobile) --- */
@media (max-width: 768px) {
  .search-container {
    padding: 30px 15px;
  }
  
  .shop-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }
  
  .search-hint {
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 0 10px; /* منع التصاق النص بحواف الشاشة */
  }
  
  .search-input-wrapper {
    border-radius: 12px; /* زوايا أكثر نعومة على الموبايل */
  }
  
  #filter-search {
    padding: 12px 15px;
    font-size: 1rem;
  }
  
  .main-search-btn {
    padding: 0 15px;
  }
  
  /* إخفاء كلمة "بحث" في الموبايل والاكتفاء بالأيقونة لتوفير المساحة */
  .main-search-btn span {
    display: none;
  }

  .shop-content .product-box {
    flex: 0 1 calc(50% - 1rem);
    min-width: 160px;
  }
}

@media (max-width: 480px) {
  .shop-content .product-box {
    flex: 1 1 100%;
    max-width: 100%;
  }
}
