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

body{
    background:#f7f8f6;
    color:#222;
    direction:rtl;
}

.stores-header{
    max-width:1140px;
    margin:0 auto;
    position:relative;
    background:#fff;
    padding:20px 24px 18px;
    border-bottom:1px solid #e5e7eb;
}

.back-btn{
    position:absolute;
    right:24px;
    top:50%;
    transform:translateY(-50%);
    text-decoration:none;
    color:#222;
    background:#f1f3f2;
    padding:10px 16px;
    border-radius:12px;
}

.brand{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    text-align:center;
}

.brand-icon{
    font-size:42px;
}

.brand h1{
    font-size:36px;
    color:#2E7D32;
}

.brand p{
    font-size:14px;
    color:#666;
}

.stores-page{
    max-width:1200px;
    margin:0 auto;
    padding:20px 24px 40px;
}

/* ===== Filters ===== */

.stores-filters{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
    margin-bottom:14px;
}

.smart-field{
    position:relative;
}

.smart-field input{
    width:100%;
    height:48px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#fff;
    padding:0 14px;
    font-size:14px;
    outline:none;
}

.smart-field input:disabled{
    background:#fff;
    color:#777;
    opacity:1;
    cursor:not-allowed;
    border:1px solid #e5e7eb;
}

.smart-results{
    position:absolute;
    top:54px;
    right:0;
    left:0;
    background:#fff;
    border:1px solid #ddd;
    border-radius:12px;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
    max-height:220px;
    overflow-y:auto;
    display:none;
    z-index:50;
}

.smart-results button{
    width:100%;
    border:none;
    background:#fff;
    padding:12px;
    text-align:right;
    font-size:14px;
    cursor:pointer;
}

.smart-results button:hover{
    background:#f7f8f6;
}

.city-location-field{
    position:relative;
}

.city-location-field input{
    padding-left:45px;
}

.location-btn{
    position:absolute;
    left:10px;
    top:50%;
    transform:translateY(-50%);
    border:none;
    background:transparent;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:4px;
    padding:0;
    z-index:5;
}

.location-btn span{
    font-size:10px;
    color:#666;
    font-weight:700;
    white-space:nowrap;
}

/* ===== Search ===== */

.stores-search-box{
    margin-bottom:20px;
}

.stores-search-box input{
    width:100%;
    height:54px;
    border:1px solid #e5e7eb;
    border-radius:16px;
    background:#fff;
    padding:0 16px;
    font-size:15px;
    outline:none;
}

/* ===== Stores Grid ===== */

.stores-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    align-items:stretch;
}

.store-card{
    height:360px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:22px;
    overflow:hidden;
    text-decoration:none;
    color:#222;
    box-shadow:0 2px 12px rgba(0,0,0,.06);
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    padding:18px 16px 16px;
    transition:.2s;
}

.store-card:hover{
    transform:translateY(-3px);
}

.store-image{
    width:128px;
    height:128px;
    min-width:128px;
    min-height:128px;
    max-width:128px;
    max-height:128px;
    border-radius:50%;
    overflow:hidden;
    border:2px solid #d9f0dc;
    background:#f1f1f1;
    margin-bottom:8px;
    flex-shrink:0;
}

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

.store-info{
    width:100%;
    height:190px;
    display:flex;
    flex-direction:column;
    align-items:center;
    overflow:hidden;
}

.store-status{
    order:1;
    height:26px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:max-content;
    padding:4px 13px;
    border-radius:999px;
    font-size:12px;
    font-weight:bold;
    white-space:nowrap;
    margin-bottom:8px;
    flex-shrink:0;
}

.store-name{
    order:2;
    width:100%;
    height:29px;
    font-size:20px;
    font-weight:bold;
    line-height:1.45;
    margin-bottom:4px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.store-number{
    order:3;
    width:100%;
    height:22px;
    color:#666;
    font-size:13px;
    line-height:1.6;
    margin-bottom:7px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.store-location{
    order:4;
    width:100%;
    height:24px;
    color:#666;
    font-size:14px;
    line-height:1.6;
    margin-bottom:10px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}


.store-description{
    order:5;
    width:100%;
    height:52px;
    min-height:52px;
    max-height:52px;
    color:#555;
    font-size:13px;
    line-height:1.6;
    padding-top:10px;
    border-top:1px solid #edf0ed;

    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.store-status.open{
    background:#e8f5e9;
    color:#2E7D32;
}

.store-status.closed{
    background:#fdecea;
    color:#d32f2f;
}

.no-results{
    grid-column:1 / -1;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:35px 20px;
    text-align:center;
    color:#777;
    font-size:17px;
    font-weight:bold;
    box-shadow:0 2px 8px rgba(0,0,0,.05);
}

/* ===== Mobile ===== */

@media(max-width:768px){

    .stores-page{
        padding:10px 0 30px;
    }

    .stores-filters{
        grid-template-columns:1fr;
        gap:8px;
        padding:0 8px;
        margin-bottom:10px;
    }

    .smart-field input{
        height:40px;
        border-radius:10px;
        font-size:13px;
    }

    .smart-results{
        top:46px;
    }

    .stores-search-box{
        padding:0 8px;
        margin-bottom:14px;
    }

    .stores-search-box input{
        height:44px;
        border-radius:12px;
        font-size:13px;
    }

    .stores-grid{
        grid-template-columns:1fr;
        gap:14px;
        padding:0 8px;
    }

    .store-card{
        height:330px;
        border-radius:18px;
        padding:16px 14px 14px;
    }

    .store-image{
        width:112px;
        height:112px;
        min-width:112px;
        min-height:112px;
        max-width:112px;
        max-height:112px;
        margin-bottom:8px;
    }

    .store-info{
        height:180px;
    }

    .store-status{
        height:25px;
        font-size:12px;
        padding:3px 12px;
        margin-bottom:7px;
    }

    .store-name{
        height:27px;
        font-size:18px;
        margin-bottom:4px;
    }

    .store-number{
        height:21px;
        font-size:13px;
        margin-bottom:6px;
    }

    .store-location{
        height:22px;
        font-size:13px;
        margin-bottom:8px;
    }

    .store-description{
        height:50px;
        min-height:50px;
        max-height:50px;
        font-size:13px;
        line-height:1.55;
        padding-top:9px;
    }

    .brand-icon{
        font-size:30px;
    }

    .brand h1{
        font-size:24px;
    }

    .brand p{
        font-size:11px;
    }

    .back-btn{
        right:10px;
        padding:8px 12px;
        font-size:12px;
    }
}

.store-image{
    position:relative;
}

.store-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:5;
}

.store-fav-btn.active{
    color:#e53935;
}

.location-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    z-index:9999;
}

.location-modal.show{
    display:flex;
}

.location-modal-box{
    width:100%;
    max-width:360px;
    background:#fff;
    border-radius:22px;
    padding:24px 20px;
    text-align:center;
    box-shadow:0 12px 35px rgba(0,0,0,.18);
}

.location-modal-icon{
    font-size:42px;
    margin-bottom:10px;
}

.location-modal-box h3{
    font-size:21px;
    color:#2E7D32;
    margin-bottom:10px;
}

.location-modal-box p{
    font-size:14px;
    color:#555;
    line-height:1.8;
    margin-bottom:18px;
}

#allowLocationBtn{
    width:100%;
    height:46px;
    border:none;
    border-radius:14px;
    background:#2E7D32;
    color:#fff;
    font-size:15px;
    font-weight:800;
    cursor:pointer;
    margin-bottom:10px;
}

#cancelLocationBtn{
    width:100%;
    height:42px;
    border:none;
    background:#f1f3f2;
    color:#555;
    border-radius:14px;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}
