*{box-sizing:border-box}
body{
margin:0;
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial;
background:#f6f6f6;
color:#111;
}

/* category */

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

.catcard{
display:block;
padding:36px 20px;
background:#fff;
border-radius:14px;
text-align:center;
font-weight:600;
text-decoration:none;
color:#111;
border:1px solid #e8e8e8;
transition:.2s ease;
}

.catcard:hover{
transform:translateY(-3px);
box-shadow:0 8px 20px rgba(0,0,0,0.06);
}

/* grid */

#grid{
display:grid;
gap:10px;
padding:10px 10px 100px;
grid-template-columns:repeat(4,1fr);
max-width:1360px;
margin:auto;
}

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

/* card */

.card{
aspect-ratio:1/1;
background:#fff;
border-radius:14px;
overflow:hidden;
position:relative;
transition:.2s ease;
}

.card:hover{
transform:translateY(-2px);
box-shadow:0 6px 18px rgba(0,0,0,0.08);
}

.imgbg{
position:absolute;
inset:0;
background-size:cover;
background-position:center;
}

/* filter button */

.filterSticky{
position:fixed;
bottom:18px;
left:18px;
padding:12px 18px;
border-radius:999px;
border:none;
background:#111;
color:#fff;
font-weight:600;
cursor:pointer;
z-index:50;
box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

/* panel */

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

.filterPanel.open{left:0}

.filterOverlay{
position:fixed;
inset:0;
background:rgba(0,0,0,.4);
opacity:0;
pointer-events:none;
z-index:90;
transition:.2s;
}

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

/* filter head */

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

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

.clearBtn{
background:#f5f5f5;
border:1px solid #e0e0e0;
padding:8px 12px;
border-radius:8px;
font-size:13px;
cursor:pointer;
transition:.2s;
}

.clearBtn:hover{
background:#eaeaea;
}

.iconBtn{
width:36px;height:36px;
border-radius:8px;
border:1px solid #e0e0e0;
background:#f5f5f5;
font-size:18px;
cursor:pointer;
}

/* filter group */

.filterGroup{
margin-bottom:22px;
}

.filterGroupTitle{
font-size:12px;
font-weight:700;
margin-bottom:10px;
color:#777;
letter-spacing:.5px;
text-transform:uppercase;
}

.chipWrap{
display:flex;
flex-wrap:wrap;
gap:10px;
}

/* 🔥 FIXED CHIP UI (MAIN ISSUE) */

.chip{
padding:7px 14px;
border-radius:999px;
background:#f3f3f3;
font-size:12px;
cursor:pointer;
white-space:nowrap;
border:1px solid transparent;
transition:.2s ease;
}

.chip:hover{
background:#e9e9e9;
}

.chip.active{
background:#111;
color:#fff;
border-color:#111;
}

/* var strip */

.varStrip{
position:absolute;
bottom:0;
left:0;
right:0;
display:flex;
flex-wrap:wrap;
gap:4px;
padding:6px;
background:linear-gradient(to top,rgba(0,0,0,.65),transparent);
}

.varStrip span{
background:#fff;
padding:2px 6px;
border-radius:6px;
font-size:11px;
}

/* loading */

.loading{
padding:40px;
text-align:center;
color:#666;
font-size:14px;
}