*{box-sizing:border-box}
body{margin:0;font-family:Arial;background:#f5f5f5}
h2{margin:16px}

/* category cards */

.catgrid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
gap:16px;
padding:16px
}

.catcard{
display:block;
padding:36px 20px;
background:#fff;
border-radius:12px;
text-align:center;
font-size:18px;
font-weight:600;
text-decoration:none;
color:#111;
border:1px solid #e3e3e3
}

/* grid */

#grid{
display:grid;
gap:8px;
padding:0 8px 90px;
grid-template-columns:repeat(4,1fr)
}

@media(max-width:1024px){#grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:640px){#grid{grid-template-columns:repeat(1,1fr)}}

.card{
aspect-ratio:1/1;
background:#fff;
border-radius:10px;
overflow:hidden;
border:1px solid #e6e6e6
}

.card img{width:100%;height:100%;object-fit:cover}

/* sticky button */

.filterSticky{
position:fixed;
bottom:18px;
left:18px;
padding:12px 18px;
border-radius:999px;
border:none;
background:#2563eb;
color:#fff;
font-weight:600;
cursor:pointer;
z-index:20
}

/* offcanvas */

.filterPanel{
position:fixed;
top:0;
left:-320px;
width:300px;
height:100%;
background:#fff;
z-index:40;
transition:left .25s;
padding:16px;
overflow:auto;
box-shadow:4px 0 20px rgba(0,0,0,.15)
}

.filterPanel.open{left:0}

.filterOverlay{
position:fixed;
inset:0;
background:rgba(0,0,0,.35);
opacity:0;
pointer-events:none;
z-index:30
}

.filterOverlay.show{
opacity:1;
pointer-events:auto
}

.filterHead{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:12px;
font-weight:bold
}

.filterHeadBtns{display:flex;gap:8px}

.clearBtn{
background:#f1f1f1;
border:1px solid #dcdcdc;
padding:8px 12px;
border-radius:8px;
font-size:13px;
font-weight:600;
cursor:pointer
}

.iconBtn{
width:36px;height:36px;
border-radius:8px;
border:1px solid #dcdcdc;
background:#f1f1f1;
font-size:20px;
cursor:pointer
}

/* chips */

.brandCloud{
display:flex;
flex-wrap:wrap;
gap:8px
}

.chip{
padding:6px 10px;
border-radius:999px;
background:#e9e9e9;
font-size:12px;
cursor:pointer
}

.chip.active{
background:#000;
color:#fff
}

.filterGroupTitle{
width:100%;
font-size:12px;
font-weight:700;
margin:10px 0 4px;
color:#666
}

.loading{padding:40px;text-align:center}