*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:tahoma;
}

body{
background:#f4f4f4;
direction:rtl;
overflow-x:hidden;
}


.auth-page{
width:100%;
min-height:100vh;
display:flex;
justify-content:center;
align-items:center;
padding:20px;
}

.auth-box{
width:100%;
max-width:350px;
background:white;
padding:30px;
border-radius:12px;
box-shadow:0 0 15px rgba(0,0,0,0.1);
text-align:center;
}

.auth-box h2{
margin-bottom:20px;
font-size:24px;
}

.auth-box input{
width:100%;
padding:12px;
margin:10px 0;
border:1px solid #ccc;
border-radius:8px;
font-size:15px;
}

.auth-box button{
width:100%;
padding:12px;
border:none;
background:#2196f3;
color:white;
border-radius:8px;
cursor:pointer;
font-size:15px;
}

.switch{
margin-top:10px;
font-size:14px;
}

.switch a{
color:#2196f3;
text-decoration:none;
}

.error{
color:red;
font-size:14px;
margin-bottom:10px;
}


.navbar{
background:white;
padding:15px 20px;
display:flex;
justify-content:space-between;
align-items:center;
box-shadow:0 2px 8px rgba(0,0,0,0.1);
gap:15px;
flex-wrap:wrap;
}

.filters{
display:flex;
gap:10px;
flex-wrap:wrap;
}

.filters select{
padding:10px;
border:1px solid #ccc;
border-radius:8px;
min-width:140px;
}

.leftNav{
display:flex;
gap:10px;
align-items:center;
flex-wrap:wrap;
}

.leftNav button{
padding:10px 15px;
border:none;
background:#333;
color:white;
border-radius:8px;
cursor:pointer;
}


#products{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
gap:20px;
padding:20px;
}

.card{
background:white;
padding:15px;
border-radius:10px;
box-shadow:0 0 10px rgba(0,0,0,0.1);
text-align:center;

display:flex;
flex-direction:column;
height:100%;
transition:0.3s;
}

.card:hover{
transform:translateY(-5px);
}

.card img{
width:100%;
height:220px;
object-fit:contain;
}

.card h3{
font-size:16px;
margin:10px 0;
min-height:48px;
line-height:1.5;
}

.card p{
margin-top:auto;
font-weight:bold;
margin-bottom:10px;
font-size:18px;
}

.card button{
padding:10px 15px;
border:none;
background:#4caf50;
color:white;
border-radius:8px;
cursor:pointer;
font-size:15px;
}


#cartDrawer{
position:fixed;
top:0;
left:-400px;
width:400px;
max-width:100%;
height:100%;
background:white;
box-shadow:2px 0 10px rgba(0,0,0,0.2);
padding:20px;
transition:0.3s;
display:flex;
flex-direction:column;
z-index:1000;
overflow-y:auto;
}

#cartDrawer.open{
left:0;
}

.cart-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:20px;
}

.cart-header h2{
font-size:22px;
}

.cart-item{
background:#f9f9f9;
padding:10px;
margin-bottom:10px;
border-radius:8px;
display:flex;
justify-content:space-between;
align-items:center;
gap:10px;
}

.cart-item h4{
font-size:14px;
line-height:1.5;
}

.cart-item button{
cursor:pointer;
}

.cart-footer{
margin-top:auto;
padding-top:15px;
}

.cart-footer button{
width:100%;
padding:12px;
border:none;
background:#4caf50;
color:white;
border-radius:8px;
cursor:pointer;
margin-top:10px;
font-size:15px;
}

.cartBtn{
position:relative;
}

#cartBadge{
position:absolute;
top:-8px;
left:-8px;
background:red;
color:white;
width:22px;
height:22px;
border-radius:50%;
display:flex;
justify-content:center;
align-items:center;
font-size:12px;
}


@media(max-width:768px){

.navbar{
flex-direction:column;
align-items:stretch;
}

.filters{
width:100%;
}

.filters select{
flex:1;
width:100%;
}

.leftNav{
justify-content:space-between;
width:100%;
}

#products{
grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
padding:15px;
gap:15px;
}

.card img{
height:180px;
}

}


@media(max-width:480px){

.auth-box{
padding:20px;
}

.auth-box h2{
font-size:20px;
}

.navbar{
padding:15px;
}

.filters{
flex-direction:column;
}

.filters select{
width:100%;
}

.leftNav{
flex-direction:column;
align-items:stretch;
}

.leftNav button{
width:100%;
}

#products{
grid-template-columns:1fr;
padding:10px;
}

.card{
padding:12px;
}

.card img{
height:160px;
}

.card h3{
font-size:14px;
min-height:auto;
}

.card p{
font-size:16px;
}

.card button{
font-size:14px;
}

#cartDrawer{
width:100%;
left:-100%;
padding:15px;
}

.cart-header h2{
font-size:18px;
}

.cart-item{
flex-direction:column;
align-items:flex-start;
}

.cart-item div{
width:100%;
}

.cart-footer button{
font-size:14px;
}

}
