*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Cairo', Tahoma, Arial, sans-serif;
}

body{
    background:#f7f8f6;
    color:#222;
    direction:rtl;
}

.page-header{
    max-width:1140px;
    margin:0 auto;
    position:relative;
    background:#fff;
    padding:20px 24px 18px;
    border-bottom:1px solid #e5e7eb;
}

.brand{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    text-align:center;
}

.brand-icon{
    font-size:38px;
}

.brand h1{
    font-size:34px;
    color:#2E7D32;
}

.brand p{
    font-size:14px;
    color:#666;
}

.back-btn{
    position:absolute;
    right:24px;
    top:50%;
    transform:translateY(-50%);
    background:#f1f3f2;
    color:#222;
    text-decoration:none;
    padding:10px 16px;
    border-radius:12px;
    font-size:14px;
    font-weight:bold;
}

.page{
    max-width:1200px;
    margin:0 auto;
    padding:18px 24px 40px;
}

.hidden{
    display:none !important;
}

/* Tabs */

.favorites-tabs{
    display:flex;
    justify-content:center;
    gap:10px;
    margin-bottom:18px;
}

.favorites-tabs button{
    width:160px;
    height:42px;
    border:1px solid #dfe3df;
    background:#fff;
    color:#222;
    border-radius:999px;
    font-size:15px;
    font-weight:bold;
    cursor:pointer;
}

.favorites-tabs button.active{
    background:#2E7D32;
    color:#fff;
    border-color:#2E7D32;
}

/* Products */

.products-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    align-items:stretch;
}

.product-card{
    height:360px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:20px;
    overflow:hidden;
    text-decoration:none;
    color:#222;
    box-shadow:0 2px 12px rgba(0,0,0,.06);
    transition:.2s;
    display:flex;
    flex-direction:column;
}

.product-card:hover{
    transform:translateY(-3px);
}

.image-wrap{
    position:relative;
    height:200px;
    min-height:200px;
    max-height:200px;
    background:#ddd;
    overflow:hidden;
}

.image-wrap img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.fav-btn{
    position:absolute;
    top:10px;
    left:10px;
    width:40px;
    height:40px;
    border:none;
    border-radius:50%;
    background:#fff;
    color:#777;
    font-size:23px;
    cursor:pointer;
    box-shadow:0 2px 8px rgba(0,0,0,.12);
    z-index:2;
}

.fav-btn.active{
    color:#e53935;
}

.product-info{
    height:160px;
    min-height:160px;
    max-height:160px;
    padding:12px 14px 13px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

.product-info h3,
.store-link,
.location{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.product-info h3{
    font-size:16px;
    margin-bottom:4px;
    line-height:1.35;
    font-weight:700;
}

.product-category{
    display:none;
}

.store-link{
    display:block;
    color:#2E7D32;
    font-size:13px;
    font-weight:700;
    margin-bottom:3px;
    cursor:pointer;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    transition:.2s;
    line-height:1.4;
}

.store-link:hover{
    color:#256b2a;
    text-decoration:underline;
}

.location{
    color:#777;
    font-size:12px;
    margin-bottom:5px;
    line-height:1.4;
}

.badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:max-content;
    max-width:100%;
    margin-bottom:4px;
    padding:2px 7px;
    border-radius:14px;
    font-size:9px;
    font-weight:bold;
    color:#fff;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    line-height:1.3;
}

.badge.ready{
    background:#2E7D32;
}

.badge.order{
    background:#8B6F2A;
}

.price{
    color:#2E7D32;
    font-size:18px;
    font-weight:800;
    text-align:left;
    width:100%;
    margin-top:auto;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    line-height:1.2;
}

/* Stores */

.stores-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    align-items:stretch;
}

/* Empty */

.empty-message{
    grid-column:1 / -1;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:40px 20px;
    text-align:center;
    color:#777;
    font-size:17px;
    font-weight:bold;
}

/* Mobile */

@media(max-width:768px){
    .page-header{
        max-width:100%;
        padding:12px;
    }

    .brand-icon{
        font-size:30px;
    }

    .brand h1{
        font-size:24px;
    }

    .brand p{
        font-size:11px;
    }

    .back-btn{
        right:12px;
        padding:8px 12px;
        font-size:12px;
    }

    .page{
        padding:10px 0 40px;
    }

    .favorites-tabs{
        padding:0 12px;
        gap:8px;
        margin-bottom:14px;
    }

    .favorites-tabs button{
        width:120px;
        height:38px;
        font-size:13px;
    }

    .products-grid,
    .stores-grid{
        grid-template-columns:1fr;
        gap:14px;
        padding:0 12px;
    }

    .product-card{
        height:130px;
        display:grid;
        grid-template-columns:45% 55%;
        width:100%;
        border-radius:16px;
        align-items:stretch;
        box-shadow:0 3px 14px rgba(0,0,0,.08);
    }

    .image-wrap{
        order:2;
        height:130px;
        min-height:130px;
        max-height:130px;
    }

    .product-info{
        order:1;
        height:130px;
        min-height:130px;
        max-height:130px;
        padding:9px 10px;
        display:flex;
        flex-direction:column;
        justify-content:flex-start;
        overflow:hidden;
    }

    .fav-btn{
        width:34px;
        height:34px;
        font-size:18px;
    }

    .product-info h3{
        font-size:15px;
        margin-bottom:3px;
        line-height:1.35;
        font-weight:700;
    }

    .store-link{
        font-size:12px;
        margin-bottom:3px;
    }

    .location{
        font-size:11px;
        margin-bottom:5px;
    }

    .badge{
        margin-bottom:3px;
        padding:2px 7px;
        border-radius:14px;
        font-size:9px;
    }

    .price{
        font-size:17px;
        margin-top:auto;
        text-align:right;
        line-height:1.2;
    }
}