:root{
    --primary:#e31e24;
    --primaryLight:#fff1f1;
    --bg:#f6f7fb;
    --text:#222;
    --sub:#666;
    --border:#e9e9e9;
}
*{
    box-sizing:border-box;
    -webkit-tap-highlight-color:transparent;
}
@media screen and (min-width:769px){
body{display:none;}
html::after{
content:"التطبيق مخصص للهواتف فقط";
display:flex;
justify-content:center;
align-items:center;
height:100vh;
font-family:sans-serif;
direction:rtl;
}
}

body{
margin:0;
padding:0;
font-family:'Segoe UI',Tahoma,sans-serif;
background:#fff;
padding-bottom:90px;
}

header{
display:flex;
justify-content:space-between;
align-items:center;
padding:15px 10px;
}

header a{
text-decoration:none;
color:inherit;
  font-size:25px;
}

.login-btn,.logout-btn{
display:flex;
align-items:center;
gap:5px;
font-weight:bold;
background:none;
border:none;
font-size:16px;
}

.red-icon{color:#e31e24;}

.hero{
text-align:center;
padding:10px 10px;
  
}

.logo{
font-size:35px;
font-weight:900;
margin-bottom:0px;
  background: white;
}

.logo span{color:#e31e24;}

.search-form{
width:100%;
position:relative;
}

.search-box{
position:relative;
width:100%;
}

.search-box input{
width:100%;
padding:14px 45px 14px 15px;
border:2px solid #e31e24;
border-radius:30px;
font-size:16px;
outline:none;
box-sizing:border-box;
background:#fff;
cursor:pointer;
}

.search-box button{
position:absolute;
right:10px;
top:50%;
transform:translateY(-50%);
background:none;
border:none;
color:#999;
}

.banner-section{
padding:10px;
display:none;
}

.ad-card{
width:100%;
height:140px;
border-radius:18px;
overflow:hidden;
display:block;
position:relative;
box-shadow:0 4px 15px rgba(0,0,0,0.10);
text-decoration:none;
background:#f1f1f1;
}

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

.ad-badge{
position:absolute;
top:10px;
right:10px;
background:#e31e24;
color:#fff;
padding:5px 12px;
border-radius:20px;
font-size:12px;
font-weight:bold;
}
.header-title{font-size:18px;font-weight:bold;flex-grow:1;text-align:center}

.logo{
    display:flex;
    justify-content:center;
    align-items:center;
    
}

  .logo img{
    width:90%;
    height:auto;
    object-fit:contain;
  }
.notif-link{
    position:relative;
    display:flex;
    align-items:center;
}

.notif-count{
    display:none;

    position:absolute;
    top:-5px;
    right:-8px;

    min-width:18px;
    height:18px;

    padding:0 5px;

    background:#e31e24;
    color:#fff;

    border-radius:20px;

    font-size:11px;
    font-weight:bold;

    display:flex;
    align-items:center;
    justify-content:center;

    border:2px solid #fff;
  }
.error-box{
display:none;
}

/* استايل الفوتر - ثابت ولا يمس */
nav.bottom-bar { position: fixed; bottom: 0; width: 100%; background: #fff; display: flex; justify-content: space-around; align-items: center; height: 70px; border-top: 1px solid #eee; z-index: 1000; }
.nav-link { text-decoration: none; color: #777; display: flex; flex-direction: column; align-items: center; font-size: 16px; font-weight: 600; flex: 1; }
.nav-link.active { color: #e31e24; }
.center-btn-link { text-decoration: none; margin-top: -45px; z-index: 1010; }
.center-btn { background-color: #e31e24; width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 4px solid #fff; box-shadow: 0 4px 10px rgba(227, 30, 36, 0.3); }
.center-btn .material-icons-round { color: #fff; font-size: 28px; }
  .sponsored-service{
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 4px 15px rgba(0,0,0,.08);
    position:relative;
    cursor:pointer;
}

.service-image{
    width:100%;
    height:180px;
    object-fit:cover;
    display:block;
}

.service-info{
    padding:12px;
}

.service-info h3{
    margin:0;
    font-size:16px;
    font-weight:700;
    color:#222;
}

.service-owner{
    margin-top:6px;
    color:#777;
    font-size:13px;
}

.sponsored-badge{
    position:absolute;
    top:10px;
    right:10px;
    background:#e31e24;
    color:#fff;
    padding:5px 12px;
    border-radius:20px;
    font-size:12px;
    font-weight:bold;
    z-index:2;
  }
.add-question{
    display:flex;
    align-items:center;
    gap:5px;
    color:#e31e24;
    text-decoration:none;
    font-weight:bold;
    font-size:14px;
    border:1px solid #e31e24;
    padding:8px 15px;
    border-radius:25px;
    background:#fff;
}

.icon-btn{
    color:#444;
    text-decoration:none;
}

.feed{
    padding:0;
}

.post-card{
    background:#fff;
    padding:14px 12px;
    margin-bottom:8px;
    border-bottom:1px solid #ddd;
}

.post-header{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin-bottom:10px;
      cursor:pointer;
}

.user-avatar-wrap{
    position:relative;
    width:45px;
    height:45px;
    flex-shrink:0;
}

.user-img{
    width:52px;
    height:52px;
    border-radius:50%;
    object-fit:cover;
    background:#eee;
    flex-shrink:0;
}

.user-verify-badge{
    position:absolute;
    bottom:-7px;
    left:-8px;
    width:18px;
    height:18px;
    border-radius:50%;
    background:linear-gradient(135deg,#ff4d4d,#e31e24);
    display:flex;
    align-items:center;
    justify-content:center;
    border:2px solid #fff;
    box-shadow:0 2px 6px rgba(227,30,36,.4);
}

.user-verify-badge .material-icons-round{
    font-size:14px;
    color:#fff;
}

.user-info{
    flex:1;
}

.user-name{
    font-size:17px;
    font-weight:800;
    color:#111;
    display:block;
    line-height:1.4;
}

.post-date{
    font-size:12px;
    color:#777;
    display:flex;
    align-items:center;
    gap:4px;
    margin-top:2px;
}

.menu-dots{
    color:#666;
    font-size:26px;
}

.post-title{
    font-size:25px;
    font-weight:700;
    color:#111;
    line-height:1.5;
    margin-bottom:10px;
}

.post-details{
    font-size:17px;
    line-height:1.8;
    color:#222;
    margin-bottom:14px;
    display:-webkit-box;
    -webkit-line-clamp:4;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.post-meta{
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:14px;
    color:#777;
    padding-bottom:10px;
}

.reactions{
    display:flex;
    align-items:center;
    gap:5px;
    min-height:22px;
}

.reaction-mini{
    font-size:17px;
    margin-left:-3px;
}

.reaction-count{
    font-size:13px;
    color:#666;
    margin-right:4px;
}

.post-footer{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:8px;
    border-top:1px solid #eee;
    padding-top:10px;
}

.stat-item{
    background:#f0f2f5;
    border-radius:22px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    color:#444;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:.15s;
}

.stat-item:active{
    transform:scale(.96);
}

.stat-item.active-reaction{
    color:#e31e24;
    background:#fff1f1;
}

.empty-box{
    text-align:center;
    padding:60px 20px;
    color:#777;
}

.error-box{
    text-align:center;
    padding:60px 20px;
    color:#e31e24;
}

.follow-btn{
    border:none;
    border-radius:20px;
    padding:7px 7px;
    font-size:12px;
    font-weight:bold;
    cursor:pointer;
}

.follow-btn.active{
    background:#f1f1f1;
    color:#333;
}

.follow-btn.normal{
    background:#e31e24;
    color:#fff;
}

.create-post-box{
    background:#fff;
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px;
    border-bottom:1px solid #ddd;
    cursor:pointer;
}


.create-post-input{
    flex:1;
    background:#f0f2f5;
    border-radius:25px;
    padding:13px 18px;
    color:#333;
    font-size:16px;
}

.create-post-icon{
    color:#e31e24;
    display:flex;
    flex-direction:column;
    align-items:center;
    font-size:11px;
    font-weight:bold;
}

.create-post-icon .material-icons-round{
    font-size:25px;
}

.reaction-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.08);
    z-index:1999;
    display:none;
}

.reaction-picker{
    position:absolute;
    background:#fff;
    border-radius:22px;
    padding:10px 12px;
    display:none;
    align-items:center;
    flex-direction:row;
    gap:10px;
    z-index:2000;
    box-shadow:0 10px 35px rgba(0,0,0,.22);
    animation:showReaction .18s ease;
}

@keyframes showReaction{
    from{
        opacity:0;
        transform:scale(.9);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}

.reaction-option{
    width:38px;
    height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    border-radius:50%;
    transition:.15s;
}

.reaction-option:hover{
    background:#f3f3f3;
    transform:scale(1.15);
}

.reaction-option .emoji{
    font-size:28px;
    line-height:1;
}
.hashtags-row{
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding:10px;
    background:#fff;
    border-bottom:1px solid #eee;
    scrollbar-width:none;
}

.hashtags-row::-webkit-scrollbar{
    display:none;
}

.hashtag-chip{
    flex-shrink:0;
    padding:8px 14px;
    border-radius:20px;
    background:#f0f2f5;
    font-size:18px;
    cursor:pointer;
    white-space:nowrap;
}

.hashtag-chip.active{
    background:#e31e24;
    color:#fff;
}
  .hashpost{
  color:#e31e24;
  font-size:20px;
  font-weight:600;
  margin-left:10px;
  }
.back-btn{
    color:#444;
    text-decoration:none;
    display:flex;
    align-items:center;
    justify-content:center;
}

.form-container{
    padding:18px;
}

.hero-card{
    background:linear-gradient(135deg,#e31e24,#ff565b);
    color:#fff;
    border-radius:26px;
    padding:24px 20px;
    margin-bottom:18px;
    box-shadow:0 12px 28px rgba(227,30,36,.2);
}

.hero-card h2{
    margin:0 0 12px;
    font-size:24px;
    font-weight:900;
}

.hero-card p{
    margin:0;
    line-height:1.9;
    font-size:14px;
    opacity:.95;
}

.form-box{
    background:#fff;
    border-radius:26px;
    padding:18px;
    box-shadow:0 5px 18px rgba(0,0,0,.04);
}

.input-group{
    margin-bottom:22px;
}

.input-group label{
    display:block;
    margin-bottom:10px;
    font-size:14px;
    font-weight:800;
    color:#444;
}

.input-group input,
.input-group select,
.input-group textarea{
    width:100%;
    border:1px solid var(--border);
    border-radius:18px;
    padding:14px;
    font-size:15px;
    outline:none;
    transition:.2s;
    background:#fff;
    font-family:inherit;
}

.input-group textarea{
    resize:none;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(227,30,36,.08);
}

.char-counter{
    display:block;
    margin-top:6px;
    text-align:left;
    font-size:11px;
    color:#999;
}

.image-upload{
    border:2px dashed #ddd;
    border-radius:22px;
    background:#fafafa;
    padding:24px 18px;
    text-align:center;
    cursor:pointer;
    transition:.25s;
}

.image-upload.success{
    border-color:#27ae60;
    background:#f8fff9;
}

.image-upload .material-icons-round{
    font-size:54px;
    color:var(--primary);
}

.image-upload p{
    margin:10px 0 0;
    color:#666;
    font-size:14px;
}

.preview-img{
    width:100%;
    max-height:260px;
    object-fit:cover;
    border-radius:18px;
    display:none;
    margin-top:14px;
}

.price-row{
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:12px;
}

.price-row input{
    width:auto;
}

.price-row label{
    margin:0;
    font-size:13px;
    color:#666;
    font-weight:600;
}

.submit-bar{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    background:#fff;
    border-top:1px solid #eee;
    padding:14px;
    z-index:1000;
}

.submit-btn{
    width:100%;
    border:none;
    background:var(--primary);
    color:#fff;
    padding:16px;
    border-radius:18px;
    font-size:16px;
    font-weight:900;
    cursor:pointer;
    box-shadow:0 10px 22px rgba(227,30,36,.2);
}

.submit-btn:disabled{
    opacity:.6;
    cursor:not-allowed;
}
.header-center{
    font-size:20px;
    font-weight:bold;
}

.header-icons{
    display:flex;
    gap:15px;
    align-items:center;
}

.material-icons-round{
    font-size:24px;
    color:#555;
}

.red-icon{
    color:#e31e24;
}

/* التصنيفات */

.categories-bar{
    background:#fca311;
    padding:12px 10px;
    color:#fff;
    font-size:14px;
    display:flex;
    align-items:center;
    gap:8px;
    overflow-x:auto;
    white-space:nowrap;
}

.categories-bar::-webkit-scrollbar{
    display:none;
}

.cat-chip{
    border:none;
    background:rgba(255,255,255,.22);
    color:#fff;
    padding:7px 13px;
    border-radius:20px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    font-family:inherit;
    white-space:nowrap;
}

.cat-chip.active{
    background:#fff;
    color:#e31e24;
}

/* المتجر */

.store-feed{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:15px;
    padding:15px;
}

.store-card{
    border-radius:15px;
    overflow:hidden;
    position:relative;
    aspect-ratio:9/16;
    background:#eee;
    box-shadow:0 4px 15px rgba(0,0,0,.1);
    cursor:pointer;
}

.store-card img{
    width:100%;
    height:100%;
    object-fit:cover;
    position:absolute;
    inset:0;
}

.card-overlay{
    position:absolute;
    bottom:0;
    left:0;
    right:0;
    padding:25px 10px 10px;
    background:linear-gradient(to top,rgba(0,0,0,.8),transparent);
    color:#fff;
    z-index:2;
}

.card-category{
    display:inline-block;
    background:rgba(255,255,255,.18);
    backdrop-filter:blur(8px);
    padding:4px 10px;
    border-radius:20px;
    font-size:11px;
    margin-bottom:8px;
}

.card-title{
    font-size:13px;
    font-weight:bold;
    line-height:1.5;
}

.card-price{
    font-size:12px;
    margin-top:5px;
    color:#ffd166;
}

.loader-box{
    grid-column:1/3;
    text-align:center;
    padding:60px 0;
}

.loader{
    width:45px;
    height:45px;
    border:4px solid #eee;
    border-top:4px solid #e31e24;
    border-radius:50%;
    margin:auto;
    animation:spin 1s linear infinite;
}

@keyframes spin{
    100%{
        transform:rotate(360deg)
    }
}

.empty-box{
    grid-column:1/3;
    text-align:center;
    color:#999;
    padding:70px 20px;
}

.empty-box .material-icons-round{
    font-size:60px;
    color:#ddd;
    margin-bottom:10px;
}

.profile-main{text-align:center;padding:20px 0 10px}
.avatar-container{width:120px;height:120px;background:#f0f0f0;border-radius:50%;margin:0 auto 15px;display:flex;justify-content:center;align-items:center;overflow:hidden;border:2px solid #eee}
.avatar-container img{width:100%;height:100%;object-fit:cover}

.username-row{display:flex;justify-content:center;align-items:center;gap:7px}
.username-badge{background:#f0f0f0;padding:5px 20px;border-radius:20px;font-size:14px;font-weight:bold;display:inline-block;direction:ltr;min-height:20px}
.profile-verify-badge{width:21px;height:21px;border-radius:50%;background:linear-gradient(135deg,#ff4d4d,#e31e24);display:none;align-items:center;justify-content:center;color:#fff;box-shadow:0 2px 6px rgba(227,30,36,.35);flex-shrink:0}
.profile-verify-badge .material-icons-round{font-size:15px}

.profile-description{margin:10px auto;padding:0 30px;font-size:14px;color:#666;line-height:1.5;min-height:20px}
.stats-bar{display:flex;justify-content:center;gap:30px;margin:15px 0;flex-wrap:wrap}
.stat-item{text-align:center}
.stat-value{font-weight:900;font-size:18px;display:block}
.stat-label{font-size:13px;color:#555;display:flex;align-items:center;gap:4px}
.stat-label .material-icons-round{font-size:16px}

.tabs{display:flex;border-bottom:1px solid #eee;margin-top:15px}
.tab{flex:1;text-align:center;padding:12px 6px;font-weight:bold;color:#888;cursor:pointer;font-size:14px}
.tab.active{color:#e31e24;border-bottom:2px solid #e31e24}
.tab-content{display:none;padding:15px}
.tab-content.active{display:block}

.gallery{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.gallery-item{aspect-ratio:9/16;background:#eee;position:relative;overflow:hidden;border-radius:12px;cursor:pointer}
.gallery-item img{width:100%;height:100%;object-fit:cover}
.item-overlay{position:absolute;bottom:0;left:0;right:0;padding:25px 10px 10px;background:linear-gradient(to top,rgba(0,0,0,.8),transparent);color:#fff;font-size:11px;z-index:2}
.pending-badge{position:absolute;top:8px;right:8px;color:#fff;font-size:11px;font-weight:bold;padding:5px 8px;border-radius:12px;z-index:3}
.gallery-item.pending{opacity:.75}
.gallery-item.pending::after{content:'';position:absolute;inset:0;background:rgba(0,0,0,.25);z-index:1}

.posts-list{display:flex;flex-direction:column;gap:8px}
.post-card{background:#fff;padding:14px 12px;border-bottom:1px solid #ddd;cursor:pointer}
.post-title{font-size:22px;font-weight:700;color:#111;line-height:1.5;margin-bottom:10px}
.post-desc{font-size:16px;line-height:1.8;color:#222;margin-bottom:14px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.post-meta{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#777;padding-bottom:10px}
.reactions{display:flex;align-items:center;gap:5px;min-height:22px}
.reaction-mini{font-size:17px;margin-left:-3px}
.reaction-count{font-size:13px;color:#666;margin-right:4px}
.post-footer{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;border-top:1px solid #eee;padding-top:10px}
.post-action{background:#f0f2f5;border-radius:22px;height:40px;display:flex;align-items:center;justify-content:center;gap:6px;color:#444;font-size:13px;font-weight:600;cursor:pointer}
.post-action.active-reaction{color:#e31e24;background:#fff1f1}

.about-item{margin-bottom:20px;padding:10px}
.about-item h3{margin:0 0 5px 0;font-size:16px;color:#e31e24;display:flex;align-items:center;gap:8px}
.about-item p{margin:0;font-size:14px;color:#666}
.empty-box{grid-column:1/3;text-align:center;color:#ccc;padding:30px 10px}

.reaction-overlay{position:fixed;inset:0;background:rgba(0,0,0,.08);z-index:1999;display:none}
.reaction-picker{position:absolute;background:#fff;border-radius:22px;padding:10px 12px;display:none;align-items:center;flex-direction:row;gap:10px;z-index:2000;box-shadow:0 10px 35px rgba(0,0,0,.22)}
.reaction-option{width:38px;height:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:50%}
.reaction-option .emoji{font-size:28px;line-height:1}
