/* -------------------------------------------------------------------------
   9MX Category Blocks - Frontend Grid
   ------------------------------------------------------------------------- */

.nmx-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.nmx-category {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    border-radius: 0;
    contain: layout style;
}

.nmx-category a {
    display: block;
    color: #fff;
    text-decoration: none;
    height: 100%;
    outline: none;
}

.nmx-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: #333;
    transition: transform 0.8s ease;
    will-change: transform;
}

.nmx-category:hover .nmx-bg {
    transform: scale(1.12);
}

.nmx-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 2;
    background: rgba(0, 0, 0, 0.45);
    padding: 20px;
    box-sizing: border-box;
}

.nmx-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    text-align: center;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.2;
}

.nmx-count {
    display: block;
    margin-top: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .nmx-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nmx-title {
        font-size: 26px;
    }

    .nmx-category {
        min-height: 260px;
    }
}

@media (max-width: 480px) {
    .nmx-grid {
        grid-template-columns: 1fr;
    }

    .nmx-title {
        font-size: 26px;
    }
}
