
:root{
--primary:#2563eb;
--dark:#111827;
--light:#f9fafb;
--accent:#10b981;
}

/* Reset */

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


/* Header */

header{
display:flex;
justify-content:space-between;
align-items:center;
padding:20px;
background:var(--dark);
color:white;
}

.cart-btn{
background:var(--accent);
padding:10px 15px;
color:white;
text-decoration:none;
border-radius:6px;
}


/* Product Grid */

.product-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:25px;
padding:40px;
background:var(--light);
}


/* Product Card */

.product-card{
background:white;
border-radius:10px;
padding:15px;
text-align:center;
transition:transform .3s, box-shadow .3s;
}

.product-card:hover{
transform:translateY(-10px);
box-shadow:0 10px 20px rgba(0,0,0,0.15);
}

.product-card img{
width:100%;
border-radius:8px;
}

.price{
color:var(--primary);
font-weight:bold;
margin:8px 0;
}

.stars{
color:gold;
}

button{
margin-top:10px;
padding:10px;
border:none;
background:var(--primary);
color:white;
border-radius:6px;
cursor:pointer;
transition:background .3s;
}

button:hover{
background:#1d4ed8;
}



/* MODAL */

.modal{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.6);
display:none;
justify-content:center;
align-items:center;
}

.modal:target{
display:flex;
}

.modal-content{
background:white;
padding:30px;
border-radius:10px;
max-width:500px;
text-align:center;
}

.modal img{
width:100%;
border-radius:10px;
}

.close{
position:absolute;
top:20px;
right:20px;
background:red;
color:white;
padding:5px 10px;
text-decoration:none;
}



/* CART SIDEBAR */

.cart-sidebar{
position:fixed;
right:-400px;
top:0;
width:300px;
height:100%;
background:white;
padding:30px;
box-shadow:-3px 0 10px rgba(0,0,0,0.2);
transition:.4s;
}

.cart-sidebar:target{
right:0;
}

.checkout{
margin-top:20px;
background:var(--accent);
}


/* Footer */

footer{
text-align:center;
padding:20px;
background:var(--dark);
color:white;
}


/* Dark Mode */

@media (prefers-color-scheme: dark){

body{
background:#111;
color:white;
}

.product-card{
background:#1f2937;
}

.modal-content{
background:#1f2937;
}

.cart-sidebar{
background:#1f2937;
}

}


/* Mobile */

@media(max-width:768px){

header{
flex-direction:column;
gap:10px;
}

.product-grid{
padding:20px;
}

}