/* --- 1. الإعدادات العامة للموبايل --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: #fcfcfc;
    direction: rtl;
    max-width: 480px;
    margin: 0 auto;
    overflow-x: hidden;
    padding-bottom: 90px;
}

/* --- 2. الهيدر والبحث وبنر الدخول --- */
.home-header {
    background: #ffffff;
    padding: 20px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.top-bar { display: flex; justify-content: space-between; align-items: center; }
.brand-name { font-size: 1.4rem; font-weight: 900; color: #1a1a1a; }

.search-form { 
    display: flex; 
    align-items: center; 
    background-color: #f2f2f2; 
    border-radius: 12px; 
    padding: 10px 15px; 
    border: 1px solid #ededed; 
    margin-top: 15px;
    width: 100%;
}

.search-form input { 
    border: none; 
    background: transparent; 
    width: 100%; 
    outline: none; 
    font-size: 0.85rem; 
    margin-right: 10px;
}

/* تعديل الديف floating-banner فقط كما طلبت */
.floating-banner {
    background: #2d2d2d;
    color: #fff;
    margin: 15px;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.floating-banner a {
    background: #28a745;
    color: #fff !important;
    padding: 6px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
}

/* --- 3. البروفايل (إصلاح النجوم والهوية) --- */
.profile-card { background: #fff; padding: 30px 20px 15px; text-align: center; }
.avatar-container { 
    width: 85px; 
    height: 85px; 
    margin: 0 auto 12px; 
    border: 2px solid #28a745; 
    border-radius: 50%; 
    padding: 3px; 
    overflow: hidden; 
}
.profile-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.user-display-name { font-size: 1.2rem; font-weight: 800; display: flex; justify-content: center; align-items: center; gap: 5px; }
.verified-blue { color: #1da1f2; font-size: 0.9rem; }

.user-rating { margin: 5px 0; font-size: 0.8rem; }
.user-rating .fas.fa-star, .user-rating .fas.fa-star-half-alt { color: #28a745; } 
.user-rating .far.fa-star { color: #ccc; }

.edit-profile-link { color: #0056b3; text-decoration: underline; font-size: 0.85rem; font-weight: bold; display: block; margin-top: 10px; }

/* --- 4. شبكة المنتجات (إصلاح تساوي الطول) --- */
.products-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
    padding: 15px; 
}

.grid-card { 
    background: #fff; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    display: flex; 
    flex-direction: column; 
    border: 1px solid #f0f0f0; 
}

.img-wrapper { 
    width: 100%; 
    aspect-ratio: 1 / 1; 
    background-color: #f9f9f9; 
    overflow: hidden;
}

.img-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}

.product-details { padding: 10px; text-align: center; }
.product-title { 
    font-size: 0.75rem; 
    color: #333; 
    font-weight: bold; 
    margin-bottom: 8px; 
    height: 2.4rem; 
    overflow: hidden; 
}

.price-green-outline { 
    display: block; 
    border: 1px solid #28a745; 
    color: #28a745; 
    padding: 4px 0; 
    border-radius: 8px; 
    font-size: 0.8rem; 
    font-weight: 900; 
    background: #f0fdf4; 
    width: 100%; 
}

/* --- 5. صفحة إضافة خدمة (إصلاح الزر) --- */
.add-product-container { padding: 20px; }
.upload-label {
    display: flex; flex-direction: column; align-items: center;
    border: 2px dashed #28a745; background: #f0fdf4;
    padding: 30px; border-radius: 15px; color: #28a745;
    cursor: pointer; margin-bottom: 20px;
}

.input-field { margin-bottom: 15px; }
.input-field label { display: block; font-size: 0.85rem; font-weight: bold; margin-bottom: 5px; color: #444; }
.input-field input, .input-field select, .input-field textarea {
    width: 100%; padding: 12px; border: 1px solid #eee; border-radius: 10px; font-size: 0.85rem; outline: none;
}

.btn-publish {
    background: #28a745;
    color: #fff;
    width: 100%;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 10px;
    cursor: pointer;
}

/* --- 6. الفوتر وزر الإضافة --- */
.bottom-navigation { 
    position: fixed; bottom: 0; width: 100%; max-width: 480px; 
    background: #ffffff; padding: 10px 0; border-top: 1px solid #f0f0f0; z-index: 1000; 
}
.nav-bar { display: flex; justify-content: space-around; align-items: center; }
.nav-link { color: #bbb; font-size: 1.2rem; text-decoration: none; }
.nav-link.active { color: #28a745; }

.plus-btn { 
    background: #28a745; width: 55px; height: 55px; border-radius: 50%; 
    display: flex; justify-content: center; align-items: center; 
    color: #fff; font-size: 1.5rem; margin-top: -45px; 
    border: 5px solid #fcfcfc; box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3); text-decoration: none;
}

/* --- 7. صفحات الدخول والتسجيل --- */
.auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: #fff; }
.auth-card { width: 100%; text-align: center; }
.auth-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 20px; }
.input-group { 
    display: flex; align-items: center; background: #f8f8f8; 
    border-radius: 12px; padding: 12px; margin-bottom: 15px; border: 1px solid #eee; 
}
.input-group input { border: none; background: transparent; width: 100%; outline: none; font-size: 0.9rem; text-align: right; }
.btn-auth-submit { background: #28a745; color: #fff; width: 100%; border: none; padding: 14px; border-radius: 12px; font-weight: bold; font-size: 1rem; margin-top: 10px; }
