.ns-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ns-products-grid li.product {
    list-style: none;
}

/* Horizontal list */
.ns-products-horizontal {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.ns-products-horizontal li.product {
    flex: 0 0 calc(20% - 16px); /* roughly 5 items visible */
    max-width: calc(20% - 16px);
    list-style: none;
}

/* responsive adjustments */
@media (max-width: 1024px) {
    .ns-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .ns-products-horizontal li.product {
        flex: 0 0 calc(25% - 16px); /* 4 items */
        max-width: calc(25% - 16px);
    }
}

@media (max-width: 768px) {
    .ns-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ns-products-horizontal li.product {
        flex: 0 0 calc(50% - 16px); /* 2 items */
        max-width: calc(50% - 16px);
    }
}

/* sentinel styles (invisible) */
.ns-vertical-sentinel, .ns-horizontal-sentinel {
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
