*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial,sans-serif;
}

body{
    background:#f5f5f5;
    direction:rtl;
}

header{
    background:#0d6efd;
    color:white;
    padding:25px;
    text-align:center;
}

.container{
    width:90%;
    max-width:500px;
    margin:40px auto;
    background:white;
    padding:25px;
    border-radius:12px;
    box-shadow:0 0 10px rgba(0,0,0,.15);
    text-align:center;
}

h2{
    margin-bottom:15px;
}

p{
    color:#555;
    margin-bottom:20px;
}

button{
    width:100%;
    padding:15px;
    border:none;
    border-radius:8px;
    background:#0d6efd;
    color:white;
    font-size:18px;
    cursor:pointer;
    transition:.3s;
}

button:hover{
    background:#0b5ed7;
}

input{
    width:100%;
    padding:12px;
    margin:10px 0;
    border:1px solid #ccc;
    border-radius:8px;
}

a{
    text-decoration:none;
}
.product-image{
    width:100%;
    height:220px;
    object-fit:cover;
    border-radius:10px;
    margin-bottom:15px;
}

.card{
    background:#fff;
    border-radius:12px;
    padding:15px;
    margin-bottom:20px;
    box-shadow:0 2px 10px rgba(0,0,0,.1);
}
.my-msg{
    background:#2d6cdf;
    color:white;
    padding:10px;
    margin:8px;
    border-radius:12px;
    width:fit-content;
    margin-right:auto;
    max-width:70%;
}

.other-msg{
    background:#eeeeee;
    color:#222;
    padding:10px;
    margin:8px;
    border-radius:12px;
    width:fit-content;
    margin-left:auto;
    max-width:70%;
}
.chat-header{
display:flex;
align-items:center;
justify-content:center;
gap:15px;
padding:10px;
}

.chat-header img{
width:60px;
height:60px;
border-radius:50%;
object-fit:cover;
border:3px solid white;
}

.chat-header h2{
color:white;
margin:0;
font-size:28px;
}
.badge{
    background:red;
    color:white;
    border-radius:50%;
    padding:5px 10px;
    font-size:14px;
    margin-right:10px;
}
.notification{
    position:fixed;
    top:20px;
    left:20px;
    background:#2563eb;
    color:white;
    padding:12px 20px;
    border-radius:10px;
    box-shadow:0 4px 15px rgba(0,0,0,.2);
    z-index:9999;
    font-weight:bold;
}
.badge{
    display:none;
    background:red;
    color:white;
    border-radius:50%;
    padding:3px 8px;
    font-size:12px;
    margin-right:8px;
    font-weight:bold;
}
.search-box{
    width:90%;
    max-width:700px;
    margin:25px auto;
}

.search-box input{

    width:100%;
    padding:15px;

    border:none;
    border-radius:12px;

    font-size:18px;

    box-shadow:0 3px 10px rgba(0,0,0,.1);

    outline:none;

    transition:.2s;
}

.search-box input:focus{

    box-shadow:0 0 0 3px #2563eb55;

}
label{
    display:block;
    margin-top:15px;
    margin-bottom:8px;
    font-weight:bold;
}

select{
    width:100%;
    padding:12px;
    border-radius:10px;
    border:1px solid #ccc;
    margin-bottom:15px;
}
textarea{
    width:100%;
    padding:12px;
    border:1px solid #ccc;
    border-radius:10px;
    box-sizing:border-box;
    resize:vertical;
}

/* ================================
   الفئات
================================ */

#categories{
    width:92%;
    max-width:1100px;
    margin:25px auto;
    
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:14px;
}

/* زر الفئة */
#categories .cat-btn{
    width:100%;
    min-height:90px;
    
    border:1px solid #e5e7eb;
    background:white;
    color:#222;
    
    border-radius:14px;
    
    padding:15px 8px;
    
    font-size:16px;
    font-weight:bold;
    
    cursor:pointer;
    
    box-shadow:0 2px 8px rgba(0,0,0,.06);
    
    transition:.2s;
}

/* عند المرور */
#categories .cat-btn:hover{
    transform:translateY(-3px);
    box-shadow:0 5px 15px rgba(0,0,0,.12);
    border-color:#2563eb;
}

/* الفئة المختارة */
#categories .cat-btn.active{
    background:#2563eb;
    color:white;
    border-color:#2563eb;
}


/* الهاتف */
@media(max-width:700px){

    #categories{
        grid-template-columns:repeat(2,1fr);
        gap:10px;
    }

    #categories .cat-btn{
        min-height:75px;
        font-size:14px;
    }

}
.image-modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.9);
    z-index:9999;
    justify-content:center;
    align-items:center;
}

.image-modal img{
    max-width:95%;
    max-height:95%;
    border-radius:12px;
}

.image-modal span{
    position:absolute;
    top:20px;
    right:30px;
    color:white;
    font-size:45px;
    cursor:pointer;
}
.image-modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.9);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.image-modal img{
    max-width:95%;
    max-height:95%;
    border-radius:12px;
}

.image-modal span{
    position:absolute;
    top:20px;
    right:30px;
    color:white;
    font-size:45px;
    cursor:pointer;
}
.stars{

    display:flex;

    justify-content:center;

    gap:10px;

    font-size:40px;

    margin:20px 0;

}

.stars span{

    cursor:pointer;

    transition:.2s;

}
/* =====================================================
   🛒 SOUQ - NEW MODERN HOME DESIGN
   ===================================================== */


/* ================= GLOBAL HOME ================= */

body{
    background:#f6f7fb;
    color:#172033;
}


/* ================= HEADER ================= */

.main-header{
    background:#ffffff;
    color:#172033;
    padding:0;
    position:sticky;
    top:0;
    z-index:1000;
    box-shadow:0 2px 15px rgba(0,0,0,.06);
}

.header-content{
    width:min(1200px,92%);
    height:72px;
    margin:auto;

    display:flex;
    align-items:center;
    justify-content:space-between;
}

.logo{
    display:flex;
    align-items:center;
    gap:8px;

    color:#1769ff;
    font-size:27px;
    font-weight:800;
}

.logo span{
    color:#172033;
}

.header-actions{
    display:flex;
    align-items:center;
    gap:10px;
}

.header-icon{
    width:44px;
    height:44px;

    display:flex;
    align-items:center;
    justify-content:center;

    position:relative;

    background:#f3f6fb;
    border-radius:50%;

    font-size:20px;
    color:#172033;

    transition:.2s;
}

.header-icon:hover{
    background:#e8efff;
    transform:translateY(-2px);
}

.header-icon .badge{
    display:flex;
    position:absolute;

    top:-3px;
    right:-3px;

    width:19px;
    height:19px;

    padding:0;
    margin:0;

    align-items:center;
    justify-content:center;

    font-size:10px;
}


/* ================= MAIN ================= */

.home-container{
    width:min(1200px,92%);
    margin:0 auto;
    padding:25px 0 100px;
}


/* ================= HERO ================= */

.hero{
    min-height:280px;

    border-radius:24px;

    margin-bottom:30px;

    background:
        linear-gradient(
            135deg,
            #1769ff,
            #4f8cff
        );

    display:flex;
    align-items:center;

    padding:45px;

    overflow:hidden;

    position:relative;

    box-shadow:
        0 15px 35px rgba(23,105,255,.20);
}

.hero::after{
    content:"🛍️";

    position:absolute;

    left:55px;
    bottom:-30px;

    font-size:180px;

    opacity:.12;
}

.hero-content{
    position:relative;
    z-index:2;

    width:100%;
}

.hero h1{
    color:white;
    font-size:38px;
    margin-bottom:12px;
}

.hero p{
    color:rgba(255,255,255,.9);
    font-size:17px;
    margin-bottom:25px;
}

.hero .search-box{
    width:100%;
    max-width:700px;
    margin:0;

    position:relative;
}

.hero .search-box span{
    position:absolute;

    right:18px;
    top:50%;

    transform:translateY(-50%);

    font-size:20px;
}

.hero .search-box input{
    height:58px;

    margin:0;

    padding:0 52px 0 20px;

    border:none;

    border-radius:16px;

    font-size:16px;

    box-shadow:0 8px 25px rgba(0,0,0,.12);
}


/* ================= SECTIONS ================= */

.section{
    margin-bottom:30px;
}

.section-title{
    display:flex;
    align-items:center;
    justify-content:space-between;

    margin-bottom:16px;
}

.section-title h2{
    margin:0;

    font-size:22px;
    color:#172033;
}


/* ================= CATEGORIES ================= */

.categories{
    display:flex;
    gap:12px;

    overflow-x:auto;

    padding:5px 2px 12px;

    scrollbar-width:none;
}

.categories::-webkit-scrollbar{
    display:none;
}

.categories .cat-btn{
    min-width:100px;
    height:90px;

    flex-shrink:0;

    padding:10px;

    border:1px solid #e8ebf2;

    background:white;

    color:#172033;

    border-radius:16px;

    display:flex;
    flex-direction:column;

    align-items:center;
    justify-content:center;

    gap:7px;

    font-size:14px;

    box-shadow:0 3px 12px rgba(0,0,0,.04);

    transition:.2s;
}

.categories .cat-btn:first-letter{
    font-size:25px;
}

.categories .cat-btn:hover{
    transform:translateY(-3px);

    border-color:#1769ff;

    color:#1769ff;

    box-shadow:0 8px 20px rgba(23,105,255,.10);
}

.categories .cat-btn.active{
    background:#1769ff;
    border-color:#1769ff;
    color:white;

    box-shadow:0 8px 20px rgba(23,105,255,.20);
}


/* ================= FILTERS ================= */

.filters-section{
    background:white;

    border:1px solid #edf0f5;

    border-radius:20px;

    padding:22px;

    margin-bottom:35px;

    box-shadow:0 5px 20px rgba(0,0,0,.04);
}

.filters{
    display:grid;

    grid-template-columns:
        repeat(3,1fr);

    gap:15px;
}

.filter-item label{
    margin:0 0 7px;

    color:#586174;

    font-size:14px;
}

.filter-item select{
    margin:0;

    height:48px;

    background:#f8f9fc;

    border:1px solid #e2e6ee;

    color:#172033;

    font-size:15px;

    outline:none;
}

.filter-item select:focus{
    border-color:#1769ff;

    box-shadow:0 0 0 3px rgba(23,105,255,.10);
}


/* ================= ADS HEADER ================= */

.ads-header{
    display:flex;

    align-items:center;
    justify-content:space-between;

    gap:20px;

    margin-bottom:18px;
}

.ads-header h2{
    margin:0 0 5px;

    font-size:24px;
}

.ads-header p{
    margin:0;

    color:#7a8394;
    font-size:14px;
}

.publish-btn{
    display:inline-flex;

    align-items:center;
    justify-content:center;

    min-width:150px;
    height:48px;

    padding:0 20px;

    background:#1769ff;

    color:white;

    border-radius:12px;

    font-weight:bold;

    transition:.2s;

    box-shadow:0 6px 15px rgba(23,105,255,.18);
}

.publish-btn:hover{
    background:#0958e8;

    transform:translateY(-2px);
}


/* ================= PRODUCTS GRID ================= */

.products-grid{
    display:grid;

    grid-template-columns:
        repeat(4,1fr);

    gap:18px;
}


/* ================= PRODUCT CARD ================= */

.products-grid .card{
    background:white;

    border:1px solid #edf0f4;

    border-radius:18px;

    padding:0;

    margin:0;

    overflow:hidden;

    box-shadow:0 4px 15px rgba(0,0,0,.05);

    transition:
        transform .2s,
        box-shadow .2s;

    text-align:right;
}

.products-grid .card:hover{
    transform:translateY(-5px);

    box-shadow:
        0 12px 28px rgba(0,0,0,.10);
}


/* IMAGE */

.products-grid .card .product-image,
.products-grid .card img{
    width:100%;

    height:210px;

    object-fit:cover;

    display:block;

    border-radius:0;

    margin:0;
}


/* CARD CONTENT */

.products-grid .card h3{
    font-size:17px;

    color:#172033;

    margin:14px 15px 7px;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
}

.products-grid .card p{
    margin:5px 15px;

    color:#737c8e;

    font-size:14px;
}

.products-grid .card p:first-of-type{
    color:#1769ff;

    font-size:18px;

    font-weight:800;
}


/* CARD BUTTONS */

.products-grid .card button{
    width:calc(100% - 30px);

    margin:8px 15px;

    padding:11px;

    font-size:14px;

    border-radius:10px;
}

.products-grid .card a{
    display:block;
}


/* ================= BOTTOM NAV ================= */

.bottom-nav{
    display:none;
}


/* ================= MOBILE ================= */

@media(max-width:900px){

    .products-grid{
        grid-template-columns:
            repeat(3,1fr);
    }

}


@media(max-width:700px){

    .home-container{
        width:94%;

        padding-top:15px;
        padding-bottom:90px;
    }


    .header-content{
        height:62px;
    }

    .logo{
        font-size:23px;
    }

    .header-icon{
        width:40px;
        height:40px;
    }


    .hero{
        min-height:250px;

        padding:30px 22px;

        border-radius:20px;
    }

    .hero h1{
        font-size:28px;
    }

    .hero p{
        font-size:14px;
    }


    .filters{
        grid-template-columns:1fr;
    }


    .ads-header{
        align-items:flex-start;
        flex-direction:column;
    }

    .publish-btn{
        width:100%;
    }


    .products-grid{
        grid-template-columns:
            repeat(2,1fr);

        gap:12px;
    }


    .products-grid .card img,
    .products-grid .card .product-image{
        height:170px;
    }

    .products-grid .card h3{
        font-size:15px;
        margin:10px 10px 5px;
    }

    .products-grid .card p{
        margin:4px 10px;
        font-size:12px;
    }

    .products-grid .card p:first-of-type{
        font-size:16px;
    }


    .products-grid .card button{
        width:calc(100% - 20px);

        margin:6px 10px;

        padding:9px;

        font-size:12px;
    }


    /* MOBILE BOTTOM NAV */

    .bottom-nav{
        position:fixed;

        display:flex;

        bottom:0;
        right:0;
        left:0;

        height:68px;

        background:white;

        border-top:1px solid #e8ebf0;

        box-shadow:
            0 -5px 20px rgba(0,0,0,.08);

        z-index:2000;

        align-items:center;

        justify-content:space-around;

        padding:5px 10px;
    }

    .nav-item{
        flex:1;

        display:flex;

        flex-direction:column;

        align-items:center;
        justify-content:center;

        gap:3px;

        color:#737c8e;

        font-size:20px;
    }

    .nav-item span{
        font-size:10px;
    }

    .nav-item.active{
        color:#1769ff;
    }

    .nav-add{
        width:50px;
        height:50px;

        margin-top:-25px;

        border-radius:50%;

        display:flex;

        align-items:center;
        justify-content:center;

        background:#1769ff;

        color:white;

        font-size:30px;

        border:5px solid #f6f7fb;

        box-shadow:
            0 5px 15px rgba(23,105,255,.30);
    }

}


@media(max-width:420px){

    .products-grid{
        grid-template-columns:
            repeat(2,1fr);
    }

    .products-grid .card img,
    .products-grid .card .product-image{
        height:145px;
    }

    .categories .cat-btn{
        min-width:85px;
        height:80px;
    }

}
.stars span:hover{

    transform:scale(1.2);

}
/* =========================================
   🛒 SOUQ - HOME FINAL TOUCH
   ========================================= */

/* الفئات: حجم موحد وصغير */
.categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 2px 12px;
    scrollbar-width: none;
}

.categories::-webkit-scrollbar {
    display: none;
}

.categories .cat-btn {
    min-width: 88px;
    width: 88px;
    height: 78px;
    flex-shrink: 0;

    padding: 8px 5px;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    background: #fff;
    color: #172033;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;

    font-size: 13px;
    font-weight: bold;

    box-shadow: 0 2px 8px rgba(0,0,0,.05);

    transition: .2s;
}

.categories .cat-btn:hover {
    transform: translateY(-2px);
    border-color: #1769ff;
    color: #1769ff;
}

.categories .cat-btn.active {
    background: #1769ff;
    color: #fff;
    border-color: #1769ff;
}

/* المنتجات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.products-grid .card {
    min-width: 0;
}

/* صور المنتجات */
.products-grid .card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

/* الهاتف */
@media (max-width: 700px) {

    .categories .cat-btn {
        min-width: 82px;
        width: 82px;
        height: 72px;
        font-size: 12px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .products-grid .card img {
        height: 165px;
    }
}

/* الهاتف الصغير */
@media (max-width: 420px) {

    .categories {
        gap: 8px;
    }

    .categories .cat-btn {
        min-width: 78px;
        width: 78px;
        height: 68px;
        font-size: 11px;
    }

    .products-grid .card img {
        height: 145px;
    }
}
/* =========================================
   🛒 SOUQ - PROFESSIONAL FOOTER
   ========================================= */

.site-footer {
    margin-top: 50px;
    background: #172033;
    color: white;
    padding: 45px 25px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: auto;

    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
}

.footer-brand h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.footer-brand p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
    max-width: 500px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    padding: 8px 0;
    transition: .2s;
}

.footer-links a:hover {
    color: #5b9cff;
    transform: translateX(-3px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 35px auto 0;
    padding-top: 20px;

    border-top: 1px solid rgba(255,255,255,.12);

    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
}


/* ================= MOBILE FOOTER ================= */

@media (max-width: 700px) {

    .site-footer {
        margin-top: 35px;
        padding: 35px 20px 90px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-brand p {
        margin: auto;
        font-size: 14px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links a {
        padding: 10px;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

}
/* ============================= */
/* PRODUCT DETAILS - RESPONSIVE */
/* ============================= */

#productDetails {
    max-width: 850px;
    margin: 30px auto;
}

#productDetails .card {
    max-width: 850px;
    margin: auto;
}

#productDetails img {
    max-width: 100%;
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    display: block;
    margin: auto;
    border-radius: 12px;
}

/* الأزرار داخل تفاصيل الإعلان */
#productDetails button {
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
}

/* الهاتف */
@media (max-width: 600px) {

    #productDetails {
        width: 100%;
        margin: 15px auto;
    }

    #productDetails .card {
        padding: 15px;
    }

    #productDetails img {
        max-height: 280px;
    }
}
/* ============================= */
/* LOGO ديال سوق */
/* ============================= */

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    display: block;
}
.logo img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    display: block;
}
/* =========================================
   FIX HEADER ICONS
   ========================================= */

.header-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.header-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: auto !important;
    height: auto !important;
    position: static !important;
}

.header-icon {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    position: relative !important;
}
.logo img{
    width: 55px;
    height: 55px;
    object-fit: contain;
}
@media (min-width: 601px) {
    .logo img {
        width: 45px !important;
        height: 45px !important;
    }
}