/* ===== تنسيق صفحة إضافة غرض - أُلفة ===== */

#add {
  direction: rtl;
  padding: 40px 20px 60px;
}

/* عنوان الصفحة */
#add .section-heading {
  text-align: center;
  margin-bottom: 30px;
}

#add .section-heading small {
  color: #687A5E;
  font-size: 15px;
}

#add .section-heading h1 {
  color: #435340;
  font-size: 34px;
  margin: 12px 0;
}

#add .section-heading p {
  color: #8A6B52;
  line-height: 1.8;
}

/* الإطار الخارجي للنموذج */
#add .form-card {
  max-width: 850px;
  margin: 0 auto;
  padding: 35px;
  background: #F8F3E8;
  border: 1px solid #DDE5D7;
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(67, 83, 64, 0.12);
}

/* عنوان بيانات الغرض */
#add .form-card h2 {
  color: #435340;
  font-size: 25px;
  text-align: center;
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid #DDE5D7;
}

/* ترتيب الحقول */
#add #addItemForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* تنسيق العناوين */
#add #addItemForm label {
  display: block;
  color: #435340;
  font-weight: bold;
  margin-bottom: 9px;
  font-size: 15px;
}

/* تنسيق مربعات الإدخال */
#add #addItemForm input,
#add #addItemForm select,
#add #addItemForm textarea {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 13px;
  border: 1px solid #D5DCCB;
  border-radius: 12px;
  background: #FFFFFF;
  color: #435340;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: 0.3s;
}

/* ارتفاع الحقول */
#add #addItemForm input,
#add #addItemForm select {
  min-height: 48px;
}

/* مساحة وصف الغرض */
#add #addItemForm textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.8;
}

/* تأثير عند الضغط على الحقل */
#add #addItemForm input:focus,
#add #addItemForm select:focus,
#add #addItemForm textarea:focus {
  border-color: #687A5E;
  box-shadow: 0 0 0 3px rgba(104, 122, 94, 0.15);
}

/* الحقول التي تأخذ عرضًا كاملًا */
#add #itemImage,
#add #itemDetails,
#add #sellerName,
#add #priceGroup,
#add #addNotice {
  grid-column: 1 / -1;
}

/* زر إضافة الغرض */
#add #addItemForm .submit-button {
  grid-column: 1 / -1;
  width: 100%;
  padding: 16px;
  margin-top: 8px;
  border: none;
  border-radius: 13px;
  background: #435340;
  color: white;
  font-family: inherit;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

#add #addItemForm .submit-button:hover {
  background: #687A5E;
  transform: translateY(-2px);
}

/* رسالة النتيجة */
#add #addNotice {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #DDE5D7;
  color: #435340;
  text-align: center;
}

/* تحسين الشكل على الجوال */
@media (max-width: 600px) {
  #add {
    padding: 25px 12px 40px;
  }

  #add .section-heading h1 {
    font-size: 28px;
  }

  #add .form-card {
    padding: 22px 16px;
    border-radius: 20px;
  }

  #add #addItemForm {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  #add #itemImage,
  #add #itemDetails,
  #add #sellerName,
  #add #priceGroup,
  #add #addNotice {
    grid-column: 1;
  }

  #add #addItemForm .submit-button {
    grid-column: 1;
  }
}
