.categories {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 15px;
padding: 20px;
}
.cat-card {
position: relative;
height: 180px;
border-radius: 15px;
overflow: hidden;
text-decoration: none;
}
.cat-card img {
width: 100%;
height: 100%;
object-fit: cover;
transition: 0.4s;
}
.cat-card .overlay {
position: absolute;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.4);
}
.cat-card h2 {
position: absolute;
bottom: 15px;
right: 15px;
color: #fff;
font-size: 22px;
z-index: 2;
}
.cat-card:hover img {
transform: scale(1.1);
}
.cat-card:hover .overlay {
background: rgba(0,0,0,0.6);
}