:root{
    --bg:#f8fafc;
    --card:#ffffff;
    --primary:#2563eb;
    --secondary:#7c3aed;
    --green:#22c55e;
    --text:#0b132b;
    --muted:#64748b;
    --border:#e2e8f0;
}
*{box-sizing:border-box;}
body{margin:0;font-family:system-ui;background:var(--bg);color:var(--text);}

header{background:#fff;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:1000}
.nav{max-width:1200px;margin:auto;padding:14px 20px;display:flex;justify-content:space-between;align-items:center}
.brand{display:flex;align-items:center;gap:10px;font-weight:900}
.brand img{width:34px;height:34px}
.accent{color:var(--primary)}
.nav a{text-decoration:none;font-weight:600}

.btn{padding:10px 18px;border-radius:999px;background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;border:none;cursor:pointer}
.btn.green{background:linear-gradient(135deg,#22c55e,#16a34a)}

main{max-width:1200px;margin:auto;padding:30px 20px}
h1{margin-bottom:10px}

.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}
.filter{padding:8px 14px;border-radius:999px;border:1px solid var(--border);cursor:pointer;background:#fff}
.filter.active{background:var(--primary);color:#fff}

.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.card{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:14px;display:flex;flex-direction:column}
.card img{width:100%;height:140px;object-fit:contain}
.price{font-weight:800;margin:6px 0}
.card button{margin-top:auto}

.cart-btn{position:fixed;bottom:24px;right:24px;background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;border-radius:50%;width:60px;height:60px;display:grid;place-items:center;font-size:20px;cursor:pointer}
.badge{position:absolute;top:-6px;right:-6px;background:#ef4444;color:#fff;border-radius:50%;font-size:12px;padding:3px 7px}

.modal{position:fixed;inset:0;background:rgba(0,0,0,.5);display:none;align-items:center;justify-content:center}
.modal-content{background:#fff;width:100%;max-width:420px;border-radius:16px;padding:20px;max-height:90vh;overflow:auto}
.cart-item{
    display: grid;
    grid-template-columns: 46% 40% 10%;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.qty button{padding:2px 8px}

footer{margin-top:60px;padding:20px;background:#f1f5f9;border-top:1px solid var(--border)}
.carousel{display:flex;gap:14px;overflow-x:auto}
.thumb{min-width:160px;height:100px;background:#e2e8f0;border-radius:12px;display:grid;place-items:center;color:var(--muted)}
.add-btn.added {
  transform: scale(1.08);
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
