/* GRID */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: clamp(8px, 1vw, 10px);
}

/* ITEM */
.categories-grid .cat-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    border: 1px solid var(--color-gray-500);
    background: var(--color-gray-100);
}

/* IMAGE */
.categories-grid .cat-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: transform 0.6s ease, filter 0.6s ease;
}

/* HOVER IMAGE */
.categories-grid .cat-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* OVERLAY */
.categories-grid .cat-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0.5) 40%,
            rgba(0, 0, 0, 0) 100%
    );
    transition: opacity 0.4s ease;
    z-index: 1;
}

.categories-grid .cat-item:hover .overlay {
    opacity: 0;
}

/* CONTENT */
.categories-grid .cat-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: clamp(16px, 2vw, 20px);
    color: #fff;
    z-index: 2;
}

.categories-grid .cat-content h3 {
    font-size: clamp(16px, 1.8vw, 24px);
    font-weight: 600;
    margin-bottom: clamp(4px, 0.5vw, 8px);
    text-transform: capitalize;
}

.categories-grid .cat-content p {
    font-size: clamp(10px, 0.9vw, 13px);
    opacity: 0.8;
    letter-spacing: clamp(1px, 0.2vw, 2px);
}

/* RESPONSIVE */
/* Tablet */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile nhỏ */
/*@media (max-width: 480px) {*/
/*    .categories-grid {*/
/*        grid-template-columns: 1fr;*/
/*    }*/
/*}*/