/* إعادة تعيين الهوامش والحشو */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* تنسيق الجسم الأساسي */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    padding: 20px;
}

/* رأس الصفحة */
header {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 24px;
}

/* رابط إضافة إعلان جديد */
.add-ad-link {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    margin-bottom: 20px;
    display: inline-block;
}

.add-ad-link:hover {
    text-decoration: underline;
}

/* تنسيق الحاوية الرئيسية */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* تنسيق قائمة المنتجات */
.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 20px;
}

/* تنسيق عنصر المنتج */
.product-item {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 250px;
    margin: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s;
}

/* تأثير عند تحريك الماوس على العنصر */
.product-item:hover {
    transform: scale(1.05);
}

/* تنسيق الصور */
.product-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    cursor: pointer;
    object-fit: cover; /* حفظ نسبة العرض إلى الارتفاع */
    margin-bottom: 10px;
}

/* تنسيق اسم المنتج */
.product-item h3 {
    margin: 10px 0;
    color: #333;
    font-size: 16px;
    white-space: nowrap; /* منع تقطيع الاسم */
    overflow: hidden;
    text-overflow: ellipsis; /* إضافة ثلاث نقاط عند تجاوز النص */
}

/* تنسيق وصف المنتج */
.product-item p {
    color: #777;
    font-size: 14px;
    word-wrap: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    max-height: 100px; /* تعديل الحد الأقصى لطول النص */
    overflow: hidden; /* إخفاء النص الزائد */
    text-overflow: ellipsis; /* إضافة ثلاث نقاط عند تجاوز النص */
}

/* تنسيق السعر */
.product-item .price {
    font-size: 16px;
    font-weight: bold;
    color: #28a745;
    margin-top: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* تنسيق التفاصيل (التاريخ والمشاهدات) */
.product-item .details {
    color: #555;
    font-size: 12px;
    margin-top: 10px;
}

/* تنسيق الحاوية الخاصة بالنموذج */
.form-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

/* تنسيق المدخلات في النموذج */
.form-container input, .form-container textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* تنسيق زر الإرسال في النموذج */
.form-container button {
    background-color: #333;
    color: white;
    padding: 10px;
    border: none;
    width: 100%;
    cursor: pointer;
    border-radius: 5px;
}

/* تأثير عند تحريك الماوس على الزر */
.form-container button:hover {
    background-color: #555;
}
